mac80211: avoid spurious deauth frames/messages
With WEXT, it happens frequently that the SME requests an authentication but then deauthenticates right away because some new parameters came along. Every time this happens we print a deauth message and send a deauth frame, but both of that is rather confusing. Avoid it by aborting the authentication process silently, and telling cfg80211 about that. The patch looks larger than it really is: __cfg80211_auth_remove() is split out from cfg80211_send_auth_timeout(), there's no new code except __cfg80211_auth_canceled() (a one-liner) and the mac80211 bits (7 new lines of code). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
7351c6bd48
commit
a58ce43f2f
@@ -1838,6 +1838,18 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
|
||||
*/
|
||||
void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr);
|
||||
|
||||
/**
|
||||
* __cfg80211_auth_canceled - notify cfg80211 that authentication was canceled
|
||||
* @dev: network device
|
||||
* @addr: The MAC address of the device with which the authentication timed out
|
||||
*
|
||||
* When a pending authentication had no action yet, the driver may decide
|
||||
* to not send a deauth frame, but in that case must calls this function
|
||||
* to tell cfg80211 about this decision. It is only valid to call this
|
||||
* function within the deauth() callback.
|
||||
*/
|
||||
void __cfg80211_auth_canceled(struct net_device *dev, const u8 *addr);
|
||||
|
||||
/**
|
||||
* cfg80211_send_rx_assoc - notification of processed association
|
||||
* @dev: network device
|
||||
|
Reference in New Issue
Block a user