mac80211: count authorized stations per BSS
Currently, each AP interface will send multicast traffic if any interface has a station entry even if that station entry is allocated only. With the new station state management we can easily fix it by adding a counter that counts each authorized station only and send multicast traffic only when the correct interface has at least one authorized station. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
d9a7ddb05e
commit
29623892e1
@@ -1567,17 +1567,21 @@ int sta_info_move_state_checked(struct sta_info *sta,
|
||||
return -EINVAL;
|
||||
break;
|
||||
case IEEE80211_STA_ASSOC:
|
||||
if (sta->sta_state == IEEE80211_STA_AUTH)
|
||||
if (sta->sta_state == IEEE80211_STA_AUTH) {
|
||||
set_bit(WLAN_STA_ASSOC, &sta->_flags);
|
||||
else if (sta->sta_state == IEEE80211_STA_AUTHORIZED)
|
||||
} else if (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
|
||||
if (sta->sdata->vif.type == NL80211_IFTYPE_AP)
|
||||
atomic_dec(&sta->sdata->u.ap.num_sta_authorized);
|
||||
clear_bit(WLAN_STA_AUTHORIZED, &sta->_flags);
|
||||
else
|
||||
} else
|
||||
return -EINVAL;
|
||||
break;
|
||||
case IEEE80211_STA_AUTHORIZED:
|
||||
if (sta->sta_state == IEEE80211_STA_ASSOC)
|
||||
if (sta->sta_state == IEEE80211_STA_ASSOC) {
|
||||
if (sta->sdata->vif.type == NL80211_IFTYPE_AP)
|
||||
atomic_inc(&sta->sdata->u.ap.num_sta_authorized);
|
||||
set_bit(WLAN_STA_AUTHORIZED, &sta->_flags);
|
||||
else
|
||||
} else
|
||||
return -EINVAL;
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user