mwifiex: display correct country information in debugfs "info"
Use "priv->country_code" string to display country information in debugfs command "info" instead of "adapter->region_code". "adapter->region_code" contains default region code got from FW while initialization, whereas "priv->country_code" is updated in reg_notifier handler whenever there is a change in regulatory domain. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
9e04a7c6d4
commit
5e218b7ab8
3 changed files with 4 additions and 3 deletions
|
@ -212,7 +212,7 @@ mwifiex_info_read(struct file *file, char __user *ubuf,
|
||||||
p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid);
|
p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid);
|
||||||
p += sprintf(p, "bssid=\"%pM\"\n", info.bssid);
|
p += sprintf(p, "bssid=\"%pM\"\n", info.bssid);
|
||||||
p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan);
|
p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan);
|
||||||
p += sprintf(p, "region_code = \"%02x\"\n", info.region_code);
|
p += sprintf(p, "country_code = \"%s\"\n", info.country_code);
|
||||||
|
|
||||||
netdev_for_each_mc_addr(ha, netdev)
|
netdev_for_each_mc_addr(ha, netdev)
|
||||||
p += sprintf(p, "multicast_address[%d]=\"%pM\"\n",
|
p += sprintf(p, "multicast_address[%d]=\"%pM\"\n",
|
||||||
|
|
|
@ -96,7 +96,7 @@ struct mwifiex_bss_info {
|
||||||
u32 bss_mode;
|
u32 bss_mode;
|
||||||
struct cfg80211_ssid ssid;
|
struct cfg80211_ssid ssid;
|
||||||
u32 bss_chan;
|
u32 bss_chan;
|
||||||
u32 region_code;
|
u8 country_code[3];
|
||||||
u32 media_connected;
|
u32 media_connected;
|
||||||
u32 max_power_level;
|
u32 max_power_level;
|
||||||
u32 min_power_level;
|
u32 min_power_level;
|
||||||
|
|
|
@ -468,7 +468,8 @@ int mwifiex_get_bss_info(struct mwifiex_private *priv,
|
||||||
|
|
||||||
info->bss_chan = bss_desc->channel;
|
info->bss_chan = bss_desc->channel;
|
||||||
|
|
||||||
info->region_code = adapter->region_code;
|
memcpy(info->country_code, priv->country_code,
|
||||||
|
IEEE80211_COUNTRY_STRING_LEN);
|
||||||
|
|
||||||
info->media_connected = priv->media_connected;
|
info->media_connected = priv->media_connected;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue