These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / net / wireless / ath / ath9k / htc_drv_main.c
index 564923c..a680a97 100644 (file)
@@ -794,8 +794,11 @@ void ath9k_htc_ani_work(struct work_struct *work)
                common->ani.longcal_timer = timestamp;
        }
 
-       /* Short calibration applies only while caldone is false */
-       if (!common->ani.caldone) {
+       /*
+        * Short calibration applies only while caldone
+        * is false or -ETIMEDOUT
+        */
+       if (common->ani.caldone <= 0) {
                if ((timestamp - common->ani.shortcal_timer) >=
                    short_cal_interval) {
                        shortcal = true;
@@ -844,7 +847,11 @@ set_timer:
        */
        cal_interval = ATH_LONG_CALINTERVAL;
        cal_interval = min(cal_interval, (u32)ATH_ANI_POLLINTERVAL);
-       if (!common->ani.caldone)
+       /*
+        * Short calibration applies only while caldone
+        * is false or -ETIMEDOUT
+        */
+       if (common->ani.caldone <= 0)
                cal_interval = min(cal_interval, (u32)short_cal_interval);
 
        ieee80211_queue_delayed_work(common->hw, &priv->ani_work,
@@ -1134,6 +1141,9 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw,
        priv->nvifs--;
        priv->vif_slot &= ~(1 << avp->index);
 
+       if (priv->csa_vif == vif)
+               priv->csa_vif = NULL;
+
        ath9k_htc_remove_station(priv, vif, NULL);
 
        DEC_VIF(priv, vif->type);
@@ -1238,8 +1248,7 @@ out:
 }
 
 #define SUPPORTED_FILTERS                      \
-       (FIF_PROMISC_IN_BSS |                   \
-       FIF_ALLMULTI |                          \
+       (FIF_ALLMULTI |                         \
        FIF_CONTROL |                           \
        FIF_PSPOLL |                            \
        FIF_OTHER_BSS |                         \
@@ -1650,7 +1659,7 @@ static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw,
                                  struct ieee80211_vif *vif,
                                  enum ieee80211_ampdu_mlme_action action,
                                  struct ieee80211_sta *sta,
-                                 u16 tid, u16 *ssn, u8 buf_size)
+                                 u16 tid, u16 *ssn, u8 buf_size, bool amsdu)
 {
        struct ath9k_htc_priv *priv = hw->priv;
        struct ath9k_htc_sta *ista;
@@ -1842,6 +1851,19 @@ static int ath9k_htc_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant,
        return 0;
 }
 
+static void ath9k_htc_channel_switch_beacon(struct ieee80211_hw *hw,
+                                           struct ieee80211_vif *vif,
+                                           struct cfg80211_chan_def *chandef)
+{
+       struct ath9k_htc_priv *priv = hw->priv;
+
+       /* mac80211 does not support CSA in multi-if cases (yet) */
+       if (WARN_ON(priv->csa_vif))
+               return;
+
+       priv->csa_vif = vif;
+}
+
 struct ieee80211_ops ath9k_htc_ops = {
        .tx                 = ath9k_htc_tx,
        .start              = ath9k_htc_start,
@@ -1868,6 +1890,7 @@ struct ieee80211_ops ath9k_htc_ops = {
        .set_bitrate_mask   = ath9k_htc_set_bitrate_mask,
        .get_stats          = ath9k_htc_get_stats,
        .get_antenna        = ath9k_htc_get_antenna,
+       .channel_switch_beacon  = ath9k_htc_channel_switch_beacon,
 
 #ifdef CONFIG_ATH9K_HTC_DEBUGFS
        .get_et_sset_count  = ath9k_htc_get_et_sset_count,