mac80211: convert HW flags to unsigned long bitmap
[cascardo/linux.git] / drivers / net / wireless / ath / ath9k / init.c
index f8d11ef..eff0e53 100644 (file)
@@ -796,7 +796,7 @@ static void ath9k_set_mcc_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
        if (!ath9k_is_chanctx_enabled())
                return;
 
-       hw->flags |= IEEE80211_HW_QUEUE_CONTROL;
+       ieee80211_hw_set(hw, QUEUE_CONTROL);
        hw->queues = ATH9K_NUM_TX_QUEUES;
        hw->offchannel_tx_hw_queue = hw->queues - 1;
        hw->wiphy->interface_modes &= ~ BIT(NL80211_IFTYPE_WDS);
@@ -818,20 +818,20 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
        struct ath_hw *ah = sc->sc_ah;
        struct ath_common *common = ath9k_hw_common(ah);
 
-       hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
-               IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
-               IEEE80211_HW_SIGNAL_DBM |
-               IEEE80211_HW_PS_NULLFUNC_STACK |
-               IEEE80211_HW_SPECTRUM_MGMT |
-               IEEE80211_HW_REPORTS_TX_ACK_STATUS |
-               IEEE80211_HW_SUPPORTS_RC_TABLE |
-               IEEE80211_HW_SUPPORTS_HT_CCK_RATES;
+       ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);
+       ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
+       ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS);
+       ieee80211_hw_set(hw, SPECTRUM_MGMT);
+       ieee80211_hw_set(hw, PS_NULLFUNC_STACK);
+       ieee80211_hw_set(hw, SIGNAL_DBM);
+       ieee80211_hw_set(hw, RX_INCLUDES_FCS);
+       ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
 
        if (ath9k_ps_enable)
-               hw->flags |= IEEE80211_HW_SUPPORTS_PS;
+               ieee80211_hw_set(hw, SUPPORTS_PS);
 
        if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
-               hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
+               ieee80211_hw_set(hw, AMPDU_AGGREGATION);
 
                if (AR_SREV_9280_20_OR_LATER(ah))
                        hw->radiotap_mcs_details |=
@@ -839,7 +839,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
        }
 
        if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || ath9k_modparam_nohwcrypt)
-               hw->flags |= IEEE80211_HW_MFP_CAPABLE;
+               ieee80211_hw_set(hw, MFP_CAPABLE);
 
        hw->wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR |
                               NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |