aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c3
-rw-r--r--drivers/net/wireless/mwifiex/main.h2
-rw-r--r--drivers/net/wireless/mwifiex/scan.c26
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c6
4 files changed, 25 insertions, 12 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 6fd53e4e3fe..62932c2a587 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1219,6 +1219,9 @@ int mwifiex_register_cfg80211(struct net_device *dev, u8 *mac,
1219 /* We are using custom domains */ 1219 /* We are using custom domains */
1220 wdev->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY; 1220 wdev->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
1221 1221
1222 /* Reserve space for bss band information */
1223 wdev->wiphy->bss_priv_size = sizeof(u8);
1224
1222 wdev->wiphy->reg_notifier = mwifiex_reg_notifier; 1225 wdev->wiphy->reg_notifier = mwifiex_reg_notifier;
1223 1226
1224 /* Set struct mwifiex_private pointer in wiphy_priv */ 1227 /* Set struct mwifiex_private pointer in wiphy_priv */
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index e6b6c0cfb63..1e801328a55 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -958,7 +958,7 @@ int mwifiex_get_bss_info(struct mwifiex_private *,
958int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv, 958int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
959 u8 *bssid, s32 rssi, u8 *ie_buf, 959 u8 *bssid, s32 rssi, u8 *ie_buf,
960 size_t ie_len, u16 beacon_period, 960 size_t ie_len, u16 beacon_period,
961 u16 cap_info_bitmap, 961 u16 cap_info_bitmap, u8 band,
962 struct mwifiex_bssdescriptor *bss_desc); 962 struct mwifiex_bssdescriptor *bss_desc);
963int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, 963int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
964 struct mwifiex_bssdescriptor *bss_entry, 964 struct mwifiex_bssdescriptor *bss_entry,
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index ecebff681bb..ca3761965e8 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1464,9 +1464,9 @@ int mwifiex_check_network_compatibility(struct mwifiex_private *priv,
1464} 1464}
1465 1465
1466static int 1466static int
1467mwifiex_update_curr_bss_params(struct mwifiex_private *priv, 1467mwifiex_update_curr_bss_params(struct mwifiex_private *priv, u8 *bssid,
1468 u8 *bssid, s32 rssi, const u8 *ie_buf, 1468 s32 rssi, const u8 *ie_buf, size_t ie_len,
1469 size_t ie_len, u16 beacon_period, u16 cap_info_bitmap) 1469 u16 beacon_period, u16 cap_info_bitmap, u8 band)
1470{ 1470{
1471 struct mwifiex_bssdescriptor *bss_desc = NULL; 1471 struct mwifiex_bssdescriptor *bss_desc = NULL;
1472 int ret; 1472 int ret;
@@ -1489,7 +1489,7 @@ mwifiex_update_curr_bss_params(struct mwifiex_private *priv,
1489 1489
1490 ret = mwifiex_fill_new_bss_desc(priv, bssid, rssi, beacon_ie, 1490 ret = mwifiex_fill_new_bss_desc(priv, bssid, rssi, beacon_ie,
1491 ie_len, beacon_period, 1491 ie_len, beacon_period,
1492 cap_info_bitmap, bss_desc); 1492 cap_info_bitmap, band, bss_desc);
1493 if (ret) 1493 if (ret)
1494 goto done; 1494 goto done;
1495 1495
@@ -1533,6 +1533,11 @@ done:
1533 return 0; 1533 return 0;
1534} 1534}
1535 1535
1536static void mwifiex_free_bss_priv(struct cfg80211_bss *bss)
1537{
1538 kfree(bss->priv);
1539}
1540
1536/* 1541/*
1537 * This function handles the command response of scan. 1542 * This function handles the command response of scan.
1538 * 1543 *
@@ -1571,6 +1576,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
1571 struct chan_band_param_set *chan_band; 1576 struct chan_band_param_set *chan_band;
1572 u8 is_bgscan_resp; 1577 u8 is_bgscan_resp;
1573 unsigned long flags; 1578 unsigned long flags;
1579 struct cfg80211_bss *bss;
1574 1580
1575 is_bgscan_resp = (le16_to_cpu(resp->command) 1581 is_bgscan_resp = (le16_to_cpu(resp->command)
1576 == HostCmd_CMD_802_11_BG_SCAN_QUERY); 1582 == HostCmd_CMD_802_11_BG_SCAN_QUERY);
@@ -1752,10 +1758,12 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
1752 chan = ieee80211_get_channel(priv->wdev->wiphy, freq); 1758 chan = ieee80211_get_channel(priv->wdev->wiphy, freq);
1753 1759
1754 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { 1760 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
1755 cfg80211_inform_bss(priv->wdev->wiphy, chan, 1761 bss = cfg80211_inform_bss(priv->wdev->wiphy,
1756 bssid, network_tsf, cap_info_bitmap, 1762 chan, bssid, network_tsf,
1757 beacon_period, ie_buf, ie_len, rssi, 1763 cap_info_bitmap, beacon_period,
1758 GFP_KERNEL); 1764 ie_buf, ie_len, rssi, GFP_KERNEL);
1765 *(u8 *)bss->priv = band;
1766 bss->free_priv = mwifiex_free_bss_priv;
1759 1767
1760 if (priv->media_connected && !memcmp(bssid, 1768 if (priv->media_connected && !memcmp(bssid,
1761 priv->curr_bss_params.bss_descriptor 1769 priv->curr_bss_params.bss_descriptor
@@ -1763,7 +1771,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
1763 mwifiex_update_curr_bss_params(priv, 1771 mwifiex_update_curr_bss_params(priv,
1764 bssid, rssi, ie_buf, 1772 bssid, rssi, ie_buf,
1765 ie_len, beacon_period, 1773 ie_len, beacon_period,
1766 cap_info_bitmap); 1774 cap_info_bitmap, band);
1767 } 1775 }
1768 } else { 1776 } else {
1769 dev_dbg(adapter->dev, "missing BSS channel IE\n"); 1777 dev_dbg(adapter->dev, "missing BSS channel IE\n");
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index 1df5ef6b495..157d312f77b 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -148,7 +148,7 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
148int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv, 148int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
149 u8 *bssid, s32 rssi, u8 *ie_buf, 149 u8 *bssid, s32 rssi, u8 *ie_buf,
150 size_t ie_len, u16 beacon_period, 150 size_t ie_len, u16 beacon_period,
151 u16 cap_info_bitmap, 151 u16 cap_info_bitmap, u8 band,
152 struct mwifiex_bssdescriptor *bss_desc) 152 struct mwifiex_bssdescriptor *bss_desc)
153{ 153{
154 int ret; 154 int ret;
@@ -159,6 +159,7 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
159 bss_desc->beacon_buf_size = ie_len; 159 bss_desc->beacon_buf_size = ie_len;
160 bss_desc->beacon_period = beacon_period; 160 bss_desc->beacon_period = beacon_period;
161 bss_desc->cap_info_bitmap = cap_info_bitmap; 161 bss_desc->cap_info_bitmap = cap_info_bitmap;
162 bss_desc->bss_band = band;
162 if (bss_desc->cap_info_bitmap & WLAN_CAPABILITY_PRIVACY) { 163 if (bss_desc->cap_info_bitmap & WLAN_CAPABILITY_PRIVACY) {
163 dev_dbg(priv->adapter->dev, "info: InterpretIE: AP WEP enabled\n"); 164 dev_dbg(priv->adapter->dev, "info: InterpretIE: AP WEP enabled\n");
164 bss_desc->privacy = MWIFIEX_802_11_PRIV_FILTER_8021X_WEP; 165 bss_desc->privacy = MWIFIEX_802_11_PRIV_FILTER_8021X_WEP;
@@ -211,7 +212,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
211 ret = mwifiex_fill_new_bss_desc(priv, bss->bssid, bss->signal, 212 ret = mwifiex_fill_new_bss_desc(priv, bss->bssid, bss->signal,
212 beacon_ie, bss->len_beacon_ies, 213 beacon_ie, bss->len_beacon_ies,
213 bss->beacon_interval, 214 bss->beacon_interval,
214 bss->capability, bss_desc); 215 bss->capability,
216 *(u8 *)bss->priv, bss_desc);
215 if (ret) 217 if (ret)
216 goto done; 218 goto done;
217 } 219 }