Merge tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[firefly-linux-kernel-4.4.55.git] / net / mac80211 / status.c
index 67c428735a51b0b7a465e605041aadb84acf0d69..45628f37c083aa72575fcc0a0241b1aefc0cb5ad 100644 (file)
@@ -181,7 +181,7 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
        struct ieee80211_local *local = sta->local;
        struct ieee80211_sub_if_data *sdata = sta->sdata;
 
-       if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
+       if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS))
                sta->last_rx = jiffies;
 
        if (ieee80211_is_data_qos(mgmt->frame_control)) {
@@ -414,8 +414,7 @@ static void ieee80211_tdls_td_tx_handle(struct ieee80211_local *local,
 
        if (is_teardown) {
                /* This mechanism relies on being able to get ACKs */
-               WARN_ON(!(local->hw.flags &
-                         IEEE80211_HW_REPORTS_TX_ACK_STATUS));
+               WARN_ON(!ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS));
 
                /* Check if peer has ACKed */
                if (flags & IEEE80211_TX_STAT_ACK) {
@@ -731,7 +730,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
                                        ieee80211_get_qos_ctl(hdr),
                                        sta, true, acked);
 
-               if ((local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) &&
+               if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL) &&
                    (ieee80211_is_data(hdr->frame_control)) &&
                    (rates_idx != -1))
                        sta->last_tx_rate = info->status.rates[rates_idx];
@@ -798,11 +797,11 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
                        ieee80211_frame_acked(sta, skb);
 
                if ((sta->sdata->vif.type == NL80211_IFTYPE_STATION) &&
-                   (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS))
+                   ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS))
                        ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data,
                                                acked, info->status.tx_time);
 
-               if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) {
+               if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) {
                        if (info->flags & IEEE80211_TX_STAT_ACK) {
                                if (sta->lost_packets)
                                        sta->lost_packets = 0;
@@ -853,7 +852,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
        }
 
        if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc) &&
-           (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) &&
+           ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) &&
            !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
            local->ps_sdata && !(local->scanning)) {
                if (info->flags & IEEE80211_TX_STAT_ACK) {