These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / net / wireless / ath / ath9k / init.c
index f8d11ef..2e2b92b 100644 (file)
@@ -736,13 +736,14 @@ static const struct ieee80211_iface_limit if_limits_multi[] = {
                                 BIT(NL80211_IFTYPE_P2P_CLIENT) |
                                 BIT(NL80211_IFTYPE_P2P_GO) },
        { .max = 1,     .types = BIT(NL80211_IFTYPE_ADHOC) },
+       { .max = 1,     .types = BIT(NL80211_IFTYPE_P2P_DEVICE) },
 };
 
 static const struct ieee80211_iface_combination if_comb_multi[] = {
        {
                .limits = if_limits_multi,
                .n_limits = ARRAY_SIZE(if_limits_multi),
-               .max_interfaces = 2,
+               .max_interfaces = 3,
                .num_different_channels = 2,
                .beacon_int_infra_match = true,
        },
@@ -796,7 +797,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 +819,21 @@ 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);
+       ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
 
        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 +841,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 |
@@ -853,7 +855,12 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
                        BIT(NL80211_IFTYPE_STATION) |
                        BIT(NL80211_IFTYPE_ADHOC) |
                        BIT(NL80211_IFTYPE_MESH_POINT) |
-                       BIT(NL80211_IFTYPE_WDS);
+                       BIT(NL80211_IFTYPE_WDS) |
+                       BIT(NL80211_IFTYPE_OCB);
+
+               if (ath9k_is_chanctx_enabled())
+                       hw->wiphy->interface_modes |=
+                                       BIT(NL80211_IFTYPE_P2P_DEVICE);
 
                        hw->wiphy->iface_combinations = if_comb;
                        hw->wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
@@ -874,6 +881,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
        hw->max_rate_tries = 10;
        hw->sta_data_size = sizeof(struct ath_node);
        hw->vif_data_size = sizeof(struct ath_vif);
+       hw->extra_tx_headroom = 4;
 
        hw->wiphy->available_antennas_rx = BIT(ah->caps.max_rxchains) - 1;
        hw->wiphy->available_antennas_tx = BIT(ah->caps.max_txchains) - 1;