File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -2352,14 +2352,16 @@ cfg80211_inform_single_bss_frame_data(struct wiphy *wiphy,
2352
2352
return NULL ;
2353
2353
2354
2354
if (ext ) {
2355
- struct ieee80211_s1g_bcn_compat_ie * compat ;
2356
- u8 * ie ;
2355
+ const struct ieee80211_s1g_bcn_compat_ie * compat ;
2356
+ const struct element * elem ;
2357
2357
2358
- ie = (void * )cfg80211_find_ie (WLAN_EID_S1G_BCN_COMPAT ,
2359
- variable , ielen );
2360
- if (!ie )
2358
+ elem = cfg80211_find_elem (WLAN_EID_S1G_BCN_COMPAT ,
2359
+ variable , ielen );
2360
+ if (!elem )
2361
+ return NULL ;
2362
+ if (elem -> datalen < sizeof (* compat ))
2361
2363
return NULL ;
2362
- compat = (void * )( ie + 2 ) ;
2364
+ compat = (void * )elem -> data ;
2363
2365
bssid = ext -> u .s1g_beacon .sa ;
2364
2366
capability = le16_to_cpu (compat -> compat_info );
2365
2367
beacon_int = le16_to_cpu (compat -> beacon_int );
You can’t perform that action at this time.
0 commit comments