Skip to content

Commit 6d30bb8

Browse files
ccpalexKalle Valo
authored andcommitted
wifi: wfx: repair open network AP mode
RSN IE missing in beacon is normal in open networks. Avoid returning -EINVAL in this case. Steps to reproduce: $ cat /etc/wpa_supplicant.conf network={ ssid="testNet" mode=2 key_mgmt=NONE } $ wpa_supplicant -iwlan0 -c /etc/wpa_supplicant.conf nl80211: Beacon set failed: -22 (Invalid argument) Failed to set beacon parameters Interface initialization failed wlan0: interface state UNINITIALIZED->DISABLED wlan0: AP-DISABLED wlan0: Unable to setup interface. Failed to initialize AP interface After the change: $ wpa_supplicant -iwlan0 -c /etc/wpa_supplicant.conf Successfully initialized wpa_supplicant wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED Cc: [email protected] Fixes: fe0a777 ("wifi: wfx: fix possible NULL pointer dereference in wfx_set_mfp_ap()") Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: Jérôme Pouiller <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 786c5be commit 6d30bb8

File tree

1 file changed

+4
-1
lines changed
  • drivers/net/wireless/silabs/wfx

1 file changed

+4
-1
lines changed

drivers/net/wireless/silabs/wfx/sta.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,11 @@ static int wfx_set_mfp_ap(struct wfx_vif *wvif)
352352

353353
ptr = (u16 *)cfg80211_find_ie(WLAN_EID_RSN, skb->data + ieoffset,
354354
skb->len - ieoffset);
355-
if (unlikely(!ptr))
355+
if (!ptr) {
356+
/* No RSN IE is fine in open networks */
357+
ret = 0;
356358
goto free_skb;
359+
}
357360

358361
ptr += pairwise_cipher_suite_count_offset;
359362
if (WARN_ON(ptr > (u16 *)skb_tail_pointer(skb)))

0 commit comments

Comments
 (0)