mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
cfg80211: Handle bss expiry during connection
If the BSS is expired during connection, the connect result will trigger a kernel warning. Ideally cfg80211 should hold the BSS before the connection is attempted, but as the BSSID is not known in case of auth/assoc MLME offload (connect op) it doesn't. For those drivers without the connect op cfg80211 holds down the reference so it wil not be removed from list. Fix this by removing the warning and silently adding the BSS back to the bss list which is return by the driver (with proper BSSID set) or in case the BSS is already added use that. The requirements for drivers are documented in the API's. Signed-off-by: Chaitanya Tata <chaitanya.tata@bluwireless.co.uk> [formatting fixes, keep old timestamp] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
cec4f328c9
commit
a3ce17d149
@@ -6231,8 +6231,11 @@ struct cfg80211_fils_resp_params {
|
||||
* case.
|
||||
* @bssid: The BSSID of the AP (may be %NULL)
|
||||
* @bss: Entry of bss to which STA got connected to, can be obtained through
|
||||
* cfg80211_get_bss() (may be %NULL). Only one parameter among @bssid and
|
||||
* @bss needs to be specified.
|
||||
* cfg80211_get_bss() (may be %NULL). But it is recommended to store the
|
||||
* bss from the connect_request and hold a reference to it and return
|
||||
* through this param to avoid a warning if the bss is expired during the
|
||||
* connection, esp. for those drivers implementing connect op.
|
||||
* Only one parameter among @bssid and @bss needs to be specified.
|
||||
* @req_ie: Association request IEs (may be %NULL)
|
||||
* @req_ie_len: Association request IEs length
|
||||
* @resp_ie: Association response IEs (may be %NULL)
|
||||
@@ -6280,8 +6283,12 @@ void cfg80211_connect_done(struct net_device *dev,
|
||||
*
|
||||
* @dev: network device
|
||||
* @bssid: the BSSID of the AP
|
||||
* @bss: entry of bss to which STA got connected to, can be obtained
|
||||
* through cfg80211_get_bss (may be %NULL)
|
||||
* @bss: Entry of bss to which STA got connected to, can be obtained through
|
||||
* cfg80211_get_bss() (may be %NULL). But it is recommended to store the
|
||||
* bss from the connect_request and hold a reference to it and return
|
||||
* through this param to avoid a warning if the bss is expired during the
|
||||
* connection, esp. for those drivers implementing connect op.
|
||||
* Only one parameter among @bssid and @bss needs to be specified.
|
||||
* @req_ie: association request IEs (maybe be %NULL)
|
||||
* @req_ie_len: association request IEs length
|
||||
* @resp_ie: association response IEs (may be %NULL)
|
||||
|
||||
Reference in New Issue
Block a user