cfg80211/mac80211: clean up cfg80211 SME APIs
Do some cleanups in the cfg80211 SME APIs, which are only used by mac80211. Most of these functions get a frame passed, and there isn't really any reason to export multiple functions as cfg80211 can check the frame type instead, do that. Additionally, the API functions have confusing names like cfg80211_send_...() which was meant to indicate that it sends an event to userspace, but gets a bit confusing when there's both TX and RX and they're not all clearly labeled. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
51217cee3a
commit
6ff57cf888
6 changed files with 172 additions and 155 deletions
|
@ -1747,27 +1747,21 @@ static int ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
|
|||
if (unlikely(!ieee80211_has_protected(fc) &&
|
||||
ieee80211_is_unicast_robust_mgmt_frame(rx->skb) &&
|
||||
rx->key)) {
|
||||
if (ieee80211_is_deauth(fc))
|
||||
cfg80211_send_unprot_deauth(rx->sdata->dev,
|
||||
rx->skb->data,
|
||||
rx->skb->len);
|
||||
else if (ieee80211_is_disassoc(fc))
|
||||
cfg80211_send_unprot_disassoc(rx->sdata->dev,
|
||||
rx->skb->data,
|
||||
rx->skb->len);
|
||||
if (ieee80211_is_deauth(fc) ||
|
||||
ieee80211_is_disassoc(fc))
|
||||
cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
|
||||
rx->skb->data,
|
||||
rx->skb->len);
|
||||
return -EACCES;
|
||||
}
|
||||
/* BIP does not use Protected field, so need to check MMIE */
|
||||
if (unlikely(ieee80211_is_multicast_robust_mgmt_frame(rx->skb) &&
|
||||
ieee80211_get_mmie_keyidx(rx->skb) < 0)) {
|
||||
if (ieee80211_is_deauth(fc))
|
||||
cfg80211_send_unprot_deauth(rx->sdata->dev,
|
||||
rx->skb->data,
|
||||
rx->skb->len);
|
||||
else if (ieee80211_is_disassoc(fc))
|
||||
cfg80211_send_unprot_disassoc(rx->sdata->dev,
|
||||
rx->skb->data,
|
||||
rx->skb->len);
|
||||
if (ieee80211_is_deauth(fc) ||
|
||||
ieee80211_is_disassoc(fc))
|
||||
cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
|
||||
rx->skb->data,
|
||||
rx->skb->len);
|
||||
return -EACCES;
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue