Merge ath-next from ath.git
authorKalle Valo <kvalo@codeaurora.org>
Wed, 21 Oct 2015 08:07:55 +0000 (11:07 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 21 Oct 2015 08:07:55 +0000 (11:07 +0300)
Major changes:

ath10k

* add board 2 API support for automatically choosing correct board file
* data path optimisations
* disable PCI power save for qca988x and QCA99x0 due to interop reasons

wil6210

* BlockAckReq support
* firmware crashdump using devcoredump
* capture all frames with sniffer

1  2 
drivers/net/wireless/ath/ath10k/mac.c

@@@ -197,9 -197,8 +197,8 @@@ static int ath10k_send_key(struct ath10
                return -EOPNOTSUPP;
        }
  
-       if (test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
+       if (test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
                key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
-       }
  
        if (cmd == DISABLE_KEY) {
                arg.key_cipher = WMI_CIPHER_NONE;
@@@ -1111,7 -1110,8 +1110,8 @@@ static int ath10k_monitor_recalc(struc
  
                        ret = ath10k_monitor_stop(ar);
                        if (ret)
-                               ath10k_warn(ar, "failed to stop disallowed monitor: %d\n", ret);
+                               ath10k_warn(ar, "failed to stop disallowed monitor: %d\n",
+                                           ret);
                                /* not serious */
                }
  
@@@ -2084,7 -2084,8 +2084,8 @@@ static void ath10k_peer_assoc_h_ht(stru
        enum ieee80211_band band;
        const u8 *ht_mcs_mask;
        const u16 *vht_mcs_mask;
-       int i, n, max_nss;
+       int i, n;
+       u8 max_nss;
        u32 stbc;
  
        lockdep_assert_held(&ar->conf_mutex);
                        arg->peer_ht_rates.rates[i] = i;
        } else {
                arg->peer_ht_rates.num_rates = n;
-               arg->peer_num_spatial_streams = max_nss;
+               arg->peer_num_spatial_streams = min(sta->rx_nss, max_nss);
        }
  
        ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n",
@@@ -4065,6 -4066,7 +4066,7 @@@ static u32 get_nss_from_chainmask(u16 c
  static int ath10k_mac_get_vht_cap_bf_sts(struct ath10k *ar)
  {
        int nsts = ar->vht_cap_info;
        nsts &= IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK;
        nsts >>= IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT;
  
  static int ath10k_mac_get_vht_cap_bf_sound_dim(struct ath10k *ar)
  {
        int sound_dim = ar->vht_cap_info;
        sound_dim &= IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK;
-       sound_dim >>=IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT;
+       sound_dim >>= IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT;
  
        /* If the sounding dimension is not advertised by the firmware,
         * let's use a default value of 1
@@@ -4656,7 -4659,7 +4659,7 @@@ static void ath10k_bss_info_changed(str
                                                info->use_cts_prot ? 1 : 0);
                if (ret)
                        ath10k_warn(ar, "failed to set protection mode %d on vdev %i: %d\n",
-                                       info->use_cts_prot, arvif->vdev_id, ret);
+                                   info->use_cts_prot, arvif->vdev_id, ret);
        }
  
        if (changed & BSS_CHANGED_ERP_SLOT) {
@@@ -6209,7 -6212,7 +6212,7 @@@ static int ath10k_ampdu_action(struct i
                               struct ieee80211_vif *vif,
                               enum ieee80211_ampdu_mlme_action action,
                               struct ieee80211_sta *sta, u16 tid, u16 *ssn,
 -                             u8 buf_size)
 +                             u8 buf_size, bool amsdu)
  {
        struct ath10k *ar = hw->priv;
        struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
@@@ -6268,8 -6271,8 +6271,8 @@@ ath10k_mac_update_rx_channel(struct ath
        rcu_read_lock();
        if (!ctx && ath10k_mac_num_chanctxs(ar) == 1) {
                ieee80211_iter_chan_contexts_atomic(ar->hw,
-                                       ath10k_mac_get_any_chandef_iter,
-                                       &def);
+                                                   ath10k_mac_get_any_chandef_iter,
+                                                   &def);
  
                if (vifs)
                        def = &vifs[0].new_ctx->def;
@@@ -7301,7 -7304,7 +7304,7 @@@ int ath10k_mac_register(struct ath10k *
                            ath10k_reg_notifier);
        if (ret) {
                ath10k_err(ar, "failed to initialise regulatory: %i\n", ret);
-               goto err_free;
+               goto err_dfs_detector_exit;
        }
  
        ar->hw->wiphy->cipher_suites = cipher_suites;
        ret = ieee80211_register_hw(ar->hw);
        if (ret) {
                ath10k_err(ar, "failed to register ieee80211: %d\n", ret);
-               goto err_free;
+               goto err_dfs_detector_exit;
        }
  
        if (!ath_is_world_regd(&ar->ath_common.regulatory)) {
  
  err_unregister:
        ieee80211_unregister_hw(ar->hw);
+ err_dfs_detector_exit:
+       if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
+               ar->dfs_detector->exit(ar->dfs_detector);
  err_free:
        kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels);
        kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels);
  
+       SET_IEEE80211_DEV(ar->hw, NULL);
        return ret;
  }