]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mwifiex: update domain_info upon band change in start_ap
authorAvinash Patil <patila@marvell.com>
Mon, 22 Jun 2015 13:36:16 +0000 (19:06 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Jul 2015 13:40:28 +0000 (16:40 +0300)
It was observed that AP beacons would not reflect correct regulatory
information upon starting AP in A band. This was because of missing
AP config band update in set_channel of start_ap. Also we configure 11D
settings info FW only for specific band. So we need to download domain
info to FW even if domain remains unchanged but band is changed.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mwifiex/cfg80211.c
drivers/net/wireless/mwifiex/main.h
drivers/net/wireless/mwifiex/uap_cmd.c

index ecc8278a8cfe75008c1e5fd7244904db54145310..1d445cbbb31b611bbaf7c8198b4d307274f2d464 100644 (file)
@@ -442,7 +442,7 @@ mwifiex_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
  *      - Country codes
  *      - Sub bands (first channel, number of channels, maximum Tx power)
  */
-static int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy)
+int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy)
 {
        u8 no_of_triplet = 0;
        struct ieee80211_country_ie_triplet *t;
index 0e6ebc9001c3bc318f26bfb138e698c2e4d6503b..d74ef2dd21bc8c97c95e3a3a4f65cacd69d42226 100644 (file)
@@ -1550,6 +1550,8 @@ void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags);
 void mwifiex_queue_main_work(struct mwifiex_adapter *adapter);
 void mwifiex_coex_ampdu_rxwinsize(struct mwifiex_adapter *adapter);
 void mwifiex_11n_delba(struct mwifiex_private *priv, int tid);
+int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy);
+
 #ifdef CONFIG_DEBUG_FS
 void mwifiex_debugfs_init(void);
 void mwifiex_debugfs_remove(void);
index b74930054b8c0b1f1cc2066ef2d22f2ca542ebb4..4d5a6e3b6361700c9bcab06201a70cd29d38b66e 100644 (file)
@@ -808,7 +808,7 @@ void mwifiex_uap_set_channel(struct mwifiex_private *priv,
                             struct mwifiex_uap_bss_param *bss_cfg,
                             struct cfg80211_chan_def chandef)
 {
-       u8 config_bands = 0;
+       u8 config_bands = 0, old_bands = priv->adapter->config_bands;
 
        priv->bss_chandef = chandef;
 
@@ -834,6 +834,11 @@ void mwifiex_uap_set_channel(struct mwifiex_private *priv,
        }
 
        priv->adapter->config_bands = config_bands;
+
+       if (old_bands != config_bands) {
+               mwifiex_send_domain_info_cmd_fw(priv->adapter->wiphy);
+               mwifiex_dnld_txpwr_table(priv);
+       }
 }
 
 int mwifiex_config_start_uap(struct mwifiex_private *priv,