diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 38137cb5f6f0..f5b1638fbf80 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -102,7 +102,7 @@ struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata, | |||
102 | lockdep_is_held(&local->sta_mtx)); | 102 | lockdep_is_held(&local->sta_mtx)); |
103 | while (sta) { | 103 | while (sta) { |
104 | if (sta->sdata == sdata && | 104 | if (sta->sdata == sdata && |
105 | compare_ether_addr(sta->sta.addr, addr) == 0) | 105 | ether_addr_equal(sta->sta.addr, addr)) |
106 | break; | 106 | break; |
107 | sta = rcu_dereference_check(sta->hnext, | 107 | sta = rcu_dereference_check(sta->hnext, |
108 | lockdep_is_held(&local->sta_mtx)); | 108 | lockdep_is_held(&local->sta_mtx)); |
@@ -125,7 +125,7 @@ struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata, | |||
125 | while (sta) { | 125 | while (sta) { |
126 | if ((sta->sdata == sdata || | 126 | if ((sta->sdata == sdata || |
127 | (sta->sdata->bss && sta->sdata->bss == sdata->bss)) && | 127 | (sta->sdata->bss && sta->sdata->bss == sdata->bss)) && |
128 | compare_ether_addr(sta->sta.addr, addr) == 0) | 128 | ether_addr_equal(sta->sta.addr, addr)) |
129 | break; | 129 | break; |
130 | sta = rcu_dereference_check(sta->hnext, | 130 | sta = rcu_dereference_check(sta->hnext, |
131 | lockdep_is_held(&local->sta_mtx)); | 131 | lockdep_is_held(&local->sta_mtx)); |
@@ -302,7 +302,7 @@ static int sta_info_insert_check(struct sta_info *sta) | |||
302 | if (unlikely(!ieee80211_sdata_running(sdata))) | 302 | if (unlikely(!ieee80211_sdata_running(sdata))) |
303 | return -ENETDOWN; | 303 | return -ENETDOWN; |
304 | 304 | ||
305 | if (WARN_ON(compare_ether_addr(sta->sta.addr, sdata->vif.addr) == 0 || | 305 | if (WARN_ON(ether_addr_equal(sta->sta.addr, sdata->vif.addr) || |
306 | is_multicast_ether_addr(sta->sta.addr))) | 306 | is_multicast_ether_addr(sta->sta.addr))) |
307 | return -EINVAL; | 307 | return -EINVAL; |
308 | 308 | ||
@@ -912,7 +912,7 @@ struct ieee80211_sta *ieee80211_find_sta_by_ifaddr(struct ieee80211_hw *hw, | |||
912 | */ | 912 | */ |
913 | for_each_sta_info(hw_to_local(hw), addr, sta, nxt) { | 913 | for_each_sta_info(hw_to_local(hw), addr, sta, nxt) { |
914 | if (localaddr && | 914 | if (localaddr && |
915 | compare_ether_addr(sta->sdata->vif.addr, localaddr) != 0) | 915 | !ether_addr_equal(sta->sdata->vif.addr, localaddr)) |
916 | continue; | 916 | continue; |
917 | if (!sta->uploaded) | 917 | if (!sta->uploaded) |
918 | return NULL; | 918 | return NULL; |
@@ -1195,13 +1195,15 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta, | |||
1195 | ieee80211_is_qos_nullfunc(hdr->frame_control)) | 1195 | ieee80211_is_qos_nullfunc(hdr->frame_control)) |
1196 | qoshdr = ieee80211_get_qos_ctl(hdr); | 1196 | qoshdr = ieee80211_get_qos_ctl(hdr); |
1197 | 1197 | ||
1198 | /* set EOSP for the frame */ | 1198 | /* end service period after last frame */ |
1199 | if (reason == IEEE80211_FRAME_RELEASE_UAPSD && | 1199 | if (skb_queue_empty(&frames)) { |
1200 | qoshdr && skb_queue_empty(&frames)) | 1200 | if (reason == IEEE80211_FRAME_RELEASE_UAPSD && |
1201 | *qoshdr |= IEEE80211_QOS_CTL_EOSP; | 1201 | qoshdr) |
1202 | *qoshdr |= IEEE80211_QOS_CTL_EOSP; | ||
1202 | 1203 | ||
1203 | info->flags |= IEEE80211_TX_STATUS_EOSP | | 1204 | info->flags |= IEEE80211_TX_STATUS_EOSP | |
1204 | IEEE80211_TX_CTL_REQ_TX_STATUS; | 1205 | IEEE80211_TX_CTL_REQ_TX_STATUS; |
1206 | } | ||
1205 | 1207 | ||
1206 | if (qoshdr) | 1208 | if (qoshdr) |
1207 | tids |= BIT(*qoshdr & IEEE80211_QOS_CTL_TID_MASK); | 1209 | tids |= BIT(*qoshdr & IEEE80211_QOS_CTL_TID_MASK); |
@@ -1415,15 +1417,19 @@ int sta_info_move_state(struct sta_info *sta, | |||
1415 | if (sta->sta_state == IEEE80211_STA_AUTH) { | 1417 | if (sta->sta_state == IEEE80211_STA_AUTH) { |
1416 | set_bit(WLAN_STA_ASSOC, &sta->_flags); | 1418 | set_bit(WLAN_STA_ASSOC, &sta->_flags); |
1417 | } else if (sta->sta_state == IEEE80211_STA_AUTHORIZED) { | 1419 | } else if (sta->sta_state == IEEE80211_STA_AUTHORIZED) { |
1418 | if (sta->sdata->vif.type == NL80211_IFTYPE_AP) | 1420 | if (sta->sdata->vif.type == NL80211_IFTYPE_AP || |
1419 | atomic_dec(&sta->sdata->u.ap.num_sta_authorized); | 1421 | (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN && |
1422 | !sta->sdata->u.vlan.sta)) | ||
1423 | atomic_dec(&sta->sdata->bss->num_mcast_sta); | ||
1420 | clear_bit(WLAN_STA_AUTHORIZED, &sta->_flags); | 1424 | clear_bit(WLAN_STA_AUTHORIZED, &sta->_flags); |
1421 | } | 1425 | } |
1422 | break; | 1426 | break; |
1423 | case IEEE80211_STA_AUTHORIZED: | 1427 | case IEEE80211_STA_AUTHORIZED: |
1424 | if (sta->sta_state == IEEE80211_STA_ASSOC) { | 1428 | if (sta->sta_state == IEEE80211_STA_ASSOC) { |
1425 | if (sta->sdata->vif.type == NL80211_IFTYPE_AP) | 1429 | if (sta->sdata->vif.type == NL80211_IFTYPE_AP || |
1426 | atomic_inc(&sta->sdata->u.ap.num_sta_authorized); | 1430 | (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN && |
1431 | !sta->sdata->u.vlan.sta)) | ||
1432 | atomic_inc(&sta->sdata->bss->num_mcast_sta); | ||
1427 | set_bit(WLAN_STA_AUTHORIZED, &sta->_flags); | 1433 | set_bit(WLAN_STA_AUTHORIZED, &sta->_flags); |
1428 | } | 1434 | } |
1429 | break; | 1435 | break; |