Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266366
b: refs/heads/master
c: 5116f3c
h: refs/heads/master
v: v3
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Sep 27, 2011
1 parent c55cd24 commit 2f9e655
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d06b7b9e1fd5f2512840a687bd13b50caa42f82b
refs/heads/master: 5116f3cef206e7fcd6023ba8595a6321f33c2044
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/mwifiex/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,9 @@ int mwifiex_register_cfg80211(struct net_device *dev, u8 *mac,
/* We are using custom domains */
wdev->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;

/* Reserve space for bss band information */
wdev->wiphy->bss_priv_size = sizeof(u8);

wdev->wiphy->reg_notifier = mwifiex_reg_notifier;

/* Set struct mwifiex_private pointer in wiphy_priv */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/mwifiex/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ int mwifiex_get_bss_info(struct mwifiex_private *,
int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
u8 *bssid, s32 rssi, u8 *ie_buf,
size_t ie_len, u16 beacon_period,
u16 cap_info_bitmap,
u16 cap_info_bitmap, u8 band,
struct mwifiex_bssdescriptor *bss_desc);
int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
struct mwifiex_bssdescriptor *bss_entry,
Expand Down
26 changes: 17 additions & 9 deletions trunk/drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,9 +1464,9 @@ int mwifiex_check_network_compatibility(struct mwifiex_private *priv,
}

static int
mwifiex_update_curr_bss_params(struct mwifiex_private *priv,
u8 *bssid, s32 rssi, const u8 *ie_buf,
size_t ie_len, u16 beacon_period, u16 cap_info_bitmap)
mwifiex_update_curr_bss_params(struct mwifiex_private *priv, u8 *bssid,
s32 rssi, const u8 *ie_buf, size_t ie_len,
u16 beacon_period, u16 cap_info_bitmap, u8 band)
{
struct mwifiex_bssdescriptor *bss_desc = NULL;
int ret;
Expand All @@ -1489,7 +1489,7 @@ mwifiex_update_curr_bss_params(struct mwifiex_private *priv,

ret = mwifiex_fill_new_bss_desc(priv, bssid, rssi, beacon_ie,
ie_len, beacon_period,
cap_info_bitmap, bss_desc);
cap_info_bitmap, band, bss_desc);
if (ret)
goto done;

Expand Down Expand Up @@ -1533,6 +1533,11 @@ mwifiex_update_curr_bss_params(struct mwifiex_private *priv,
return 0;
}

static void mwifiex_free_bss_priv(struct cfg80211_bss *bss)
{
kfree(bss->priv);
}

/*
* This function handles the command response of scan.
*
Expand Down Expand Up @@ -1571,6 +1576,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
struct chan_band_param_set *chan_band;
u8 is_bgscan_resp;
unsigned long flags;
struct cfg80211_bss *bss;

is_bgscan_resp = (le16_to_cpu(resp->command)
== HostCmd_CMD_802_11_BG_SCAN_QUERY);
Expand Down Expand Up @@ -1752,18 +1758,20 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
chan = ieee80211_get_channel(priv->wdev->wiphy, freq);

if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
cfg80211_inform_bss(priv->wdev->wiphy, chan,
bssid, network_tsf, cap_info_bitmap,
beacon_period, ie_buf, ie_len, rssi,
GFP_KERNEL);
bss = cfg80211_inform_bss(priv->wdev->wiphy,
chan, bssid, network_tsf,
cap_info_bitmap, beacon_period,
ie_buf, ie_len, rssi, GFP_KERNEL);
*(u8 *)bss->priv = band;
bss->free_priv = mwifiex_free_bss_priv;

if (priv->media_connected && !memcmp(bssid,
priv->curr_bss_params.bss_descriptor
.mac_address, ETH_ALEN))
mwifiex_update_curr_bss_params(priv,
bssid, rssi, ie_buf,
ie_len, beacon_period,
cap_info_bitmap);
cap_info_bitmap, band);
}
} else {
dev_dbg(adapter->dev, "missing BSS channel IE\n");
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/net/wireless/mwifiex/sta_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
u8 *bssid, s32 rssi, u8 *ie_buf,
size_t ie_len, u16 beacon_period,
u16 cap_info_bitmap,
u16 cap_info_bitmap, u8 band,
struct mwifiex_bssdescriptor *bss_desc)
{
int ret;
Expand All @@ -159,6 +159,7 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
bss_desc->beacon_buf_size = ie_len;
bss_desc->beacon_period = beacon_period;
bss_desc->cap_info_bitmap = cap_info_bitmap;
bss_desc->bss_band = band;
if (bss_desc->cap_info_bitmap & WLAN_CAPABILITY_PRIVACY) {
dev_dbg(priv->adapter->dev, "info: InterpretIE: AP WEP enabled\n");
bss_desc->privacy = MWIFIEX_802_11_PRIV_FILTER_8021X_WEP;
Expand Down Expand Up @@ -211,7 +212,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
ret = mwifiex_fill_new_bss_desc(priv, bss->bssid, bss->signal,
beacon_ie, bss->len_beacon_ies,
bss->beacon_interval,
bss->capability, bss_desc);
bss->capability,
*(u8 *)bss->priv, bss_desc);
if (ret)
goto done;
}
Expand Down

0 comments on commit 2f9e655

Please sign in to comment.