Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / mwifiex / cfg80211.c
index 95f3306e2836ca7790afc7ff578dca14638c9884..47012947a447b7af836d2355ac5bc55148ba5393 100644 (file)
@@ -1381,6 +1381,11 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
                                      priv->ap_11ac_enabled);
        }
 
+       if (priv->ap_11ac_enabled)
+               mwifiex_set_11ac_ba_params(priv);
+       else
+               mwifiex_set_ba_params(priv);
+
        mwifiex_set_wmm_params(priv, bss_cfg, params);
 
        if (params->inactivity_timeout > 0) {
@@ -1899,7 +1904,8 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
                }
        }
 
-       for (i = 0; i < request->n_channels; i++) {
+       for (i = 0; i < min_t(u32, request->n_channels,
+                             MWIFIEX_USER_SCAN_CHAN_MAX); i++) {
                chan = request->channels[i];
                priv->user_scan_cfg->chan_list[i].chan_number = chan->hw_value;
                priv->user_scan_cfg->chan_list[i].radio_type = chan->band;