]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: cfg80211: Fix validating BSS pointers in __cfg80211_connect_result
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>
Fri, 5 Aug 2022 13:52:59 +0000 (19:22 +0530)
committerKalle Valo <kvalo@kernel.org>
Mon, 8 Aug 2022 08:09:52 +0000 (11:09 +0300)
commitd5f80693e9d9b9a4ab99b6f0ea4b09d5f7b43197
treeea0ee6a50db97a1e7e5e4ad969587295527ce184
parent148c1c7cd3124c7864d72396f11f1f4031fff786
wifi: cfg80211: Fix validating BSS pointers in __cfg80211_connect_result

Driver's SME is allowed to fill either BSSID or BSS pointers in struct
cfg80211_connect_resp_params when indicating connect response but a
check in __cfg80211_connect_result() is giving unnecessary warning when
driver's SME fills only BSSID pointer and not BSS pointer in struct
cfg80211_connect_resp_params.

In case of mac80211 with auth/assoc path, it is always expected to fill
BSS pointers in struct cfg80211_connect_resp_params when calling
__cfg80211_connect_result() since cfg80211 must have hold BSS pointers
in cfg80211_mlme_assoc().

So, skip the check for the drivers which support cfg80211 connect
callback, for example with brcmfmac is one such driver which had the
warning:

WARNING: CPU: 5 PID: 514 at net/wireless/sme.c:786 __cfg80211_connect_result+0x2fc/0x5c0 [cfg80211]

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Fixes: fa375d4002dd ("cfg80211: Indicate MLO connection info in connect and roam callbacks")
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
[kvalo@kernel.org: add more info to the commit log]
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220805135259.4126630-1-quic_vjakkam@quicinc.com
net/wireless/sme.c