These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / net / wireless / ath / ath9k / htc_drv_init.c
index d7beefe..8647ab7 100644 (file)
@@ -38,6 +38,10 @@ static int ath9k_ps_enable;
 module_param_named(ps_enable, ath9k_ps_enable, int, 0444);
 MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave");
 
+int htc_use_dev_fw = 0;
+module_param_named(use_dev_fw, htc_use_dev_fw, int, 0444);
+MODULE_PARM_DESC(use_dev_fw, "Use development FW version");
+
 #ifdef CONFIG_MAC80211_LEDS
 int ath9k_htc_led_blink = 1;
 module_param_named(blink, ath9k_htc_led_blink, int, 0444);
@@ -74,7 +78,7 @@ static struct ath_ps_ops ath9k_htc_ps_ops = {
 
 static int ath9k_htc_wait_for_target(struct ath9k_htc_priv *priv)
 {
-       int time_left;
+       unsigned long time_left;
 
        if (atomic_read(&priv->htc->tgt_ready) > 0) {
                atomic_dec(&priv->htc->tgt_ready);
@@ -594,7 +598,7 @@ static void ath9k_init_misc(struct ath9k_htc_priv *priv)
 
        priv->spec_priv.ah = priv->ah;
        priv->spec_priv.spec_config.enabled = 0;
-       priv->spec_priv.spec_config.short_repeat = false;
+       priv->spec_priv.spec_config.short_repeat = true;
        priv->spec_priv.spec_config.count = 8;
        priv->spec_priv.spec_config.endless = false;
        priv->spec_priv.spec_config.period = 0x12;
@@ -717,18 +721,18 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
        struct ath_common *common = ath9k_hw_common(priv->ah);
        struct base_eep_header *pBase;
 
-       hw->flags = IEEE80211_HW_SIGNAL_DBM |
-               IEEE80211_HW_AMPDU_AGGREGATION |
-               IEEE80211_HW_SPECTRUM_MGMT |
-               IEEE80211_HW_HAS_RATE_CONTROL |
-               IEEE80211_HW_RX_INCLUDES_FCS |
-               IEEE80211_HW_PS_NULLFUNC_STACK |
-               IEEE80211_HW_REPORTS_TX_ACK_STATUS |
-               IEEE80211_HW_MFP_CAPABLE |
-               IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING;
+       ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
+       ieee80211_hw_set(hw, MFP_CAPABLE);
+       ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS);
+       ieee80211_hw_set(hw, PS_NULLFUNC_STACK);
+       ieee80211_hw_set(hw, RX_INCLUDES_FCS);
+       ieee80211_hw_set(hw, HAS_RATE_CONTROL);
+       ieee80211_hw_set(hw, SPECTRUM_MGMT);
+       ieee80211_hw_set(hw, SIGNAL_DBM);
+       ieee80211_hw_set(hw, AMPDU_AGGREGATION);
 
        if (ath9k_ps_enable)
-               hw->flags |= IEEE80211_HW_SUPPORTS_PS;
+               ieee80211_hw_set(hw, SUPPORTS_PS);
 
        hw->wiphy->interface_modes =
                BIT(NL80211_IFTYPE_STATION) |
@@ -736,7 +740,8 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
                BIT(NL80211_IFTYPE_AP) |
                BIT(NL80211_IFTYPE_P2P_GO) |
                BIT(NL80211_IFTYPE_P2P_CLIENT) |
-               BIT(NL80211_IFTYPE_MESH_POINT);
+               BIT(NL80211_IFTYPE_MESH_POINT) |
+               BIT(NL80211_IFTYPE_OCB);
 
        hw->wiphy->iface_combinations = &if_comb;
        hw->wiphy->n_iface_combinations = 1;
@@ -744,7 +749,8 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
        hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
 
        hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN |
-                           WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
+                           WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
+                           WIPHY_FLAG_HAS_CHANNEL_SWITCH;
 
        hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;