@@ -39,7 +39,7 @@ use netlink_packet_core::{
3939
4040use crate :: {
4141 bytes:: { write_i32, write_u16, write_u32, write_u64} ,
42- Nl80211Element , Nl80211Elements ,
42+ RawNl80211Elements ,
4343} ;
4444
4545bitflags:: bitflags! {
@@ -155,15 +155,15 @@ pub enum Nl80211BssInfo {
155155 /// Beacon interval of the (I)BSS
156156 BeaconInterval ( u16 ) ,
157157 Capability ( Nl80211BssCapabilities ) ,
158- InformationElements ( Vec < Nl80211Element > ) ,
158+ InformationElements ( RawNl80211Elements ) ,
159159 SignalMbm ( i32 ) ,
160160 SignalUnspec ( u8 ) ,
161161 Status ( u32 ) ,
162162 SeenMsAgo ( u32 ) ,
163- BeaconInformationElements ( Vec < Nl80211Element > ) ,
163+ BeaconInformationElements ( RawNl80211Elements ) ,
164164 ChanWidth ( u32 ) ,
165165 BeaconTsf ( u64 ) ,
166- ProbeResponseInformationElements ( Vec < Nl80211Element > ) ,
166+ ProbeResponseInformationElements ( RawNl80211Elements ) ,
167167 /// `CLOCK_BOOTTIME` timestamp when this entry was last updated by a
168168 /// received frame. The value is expected to be accurate to about 10ms.
169169 /// (u64, nanoseconds)
@@ -189,9 +189,7 @@ impl Nla for Nl80211BssInfo {
189189 Self :: BeaconTsf ( _) | Self :: Tsf ( _) | Self :: LastSeenBootTime ( _) => 8 ,
190190 Self :: InformationElements ( v)
191191 | Self :: BeaconInformationElements ( v)
192- | Self :: ProbeResponseInformationElements ( v) => {
193- Nl80211Elements :: from ( v) . buffer_len ( )
194- }
192+ | Self :: ProbeResponseInformationElements ( v) => v. buffer_len ( ) ,
195193 Self :: Capability ( _) => Nl80211BssCapabilities :: LENGTH ,
196194 Self :: UseFor ( _) => Nl80211BssUseFor :: LENGTH ,
197195 Self :: Other ( attr) => attr. value_len ( ) ,
@@ -237,9 +235,7 @@ impl Nla for Nl80211BssInfo {
237235 }
238236 Self :: InformationElements ( v)
239237 | Self :: BeaconInformationElements ( v)
240- | Self :: ProbeResponseInformationElements ( v) => {
241- Nl80211Elements :: from ( v) . emit ( buffer)
242- }
238+ | Self :: ProbeResponseInformationElements ( v) => v. emit ( buffer) ,
243239 Self :: Capability ( v) => v. emit ( buffer) ,
244240 Self :: UseFor ( v) => v. emit ( buffer) ,
245241 Self :: Other ( ref attr) => attr. emit ( buffer) ,
@@ -284,13 +280,13 @@ impl<'a, T: AsRef<[u8]> + ?Sized> Parseable<NlaBuffer<&'a T>>
284280 Self :: Capability ( Nl80211BssCapabilities :: parse ( payload) ?)
285281 }
286282 NL80211_BSS_BEACON_IES => Self :: BeaconInformationElements (
287- Nl80211Elements :: parse ( payload) ?. into ( ) ,
288- ) ,
289- NL80211_BSS_INFORMATION_ELEMENTS => Self :: InformationElements (
290- Nl80211Elements :: parse ( payload) ?. into ( ) ,
283+ RawNl80211Elements :: parse ( payload) ?,
291284 ) ,
285+ NL80211_BSS_INFORMATION_ELEMENTS => {
286+ Self :: InformationElements ( RawNl80211Elements :: parse ( payload) ?)
287+ }
292288 NL80211_BSS_PRESP_DATA => Self :: ProbeResponseInformationElements (
293- Nl80211Elements :: parse ( payload) ?. into ( ) ,
289+ RawNl80211Elements :: parse ( payload) ?,
294290 ) ,
295291 NL80211_BSS_SIGNAL_MBM => {
296292 let err_msg =
0 commit comments