Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214855
b: refs/heads/master
c: 651b522
h: refs/heads/master
i:
  214853: 44131b5
  214851: 31db437
  214847: 50d1b69
v: v3
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Sep 24, 2010
1 parent e2f68aa commit 37477e3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 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: 8dcb20038ade81f9a87c024e7f12ec74f0e95f33
refs/heads/master: 651b52254fc061f02d965524e71de4333a009a5a
3 changes: 2 additions & 1 deletion trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
const u8 *key, u8 key_len, u8 key_idx);
int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
const u8 *ie, size_t ie_len,
enum ieee80211_band band, u32 rate_mask);
enum ieee80211_band band, u32 rate_mask,
u8 channel);
void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len);
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/mac80211/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
local->hw_scan_req->n_channels = n_chans;

ielen = ieee80211_build_preq_ies(local, (u8 *)local->hw_scan_req->ie,
req->ie, req->ie_len, band, (u32) -1);
req->ie, req->ie_len, band, (u32) -1,
0);
local->hw_scan_req->ie_len = ielen;

return true;
Expand Down
16 changes: 14 additions & 2 deletions trunk/net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,

int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
const u8 *ie, size_t ie_len,
enum ieee80211_band band, u32 rate_mask)
enum ieee80211_band band, u32 rate_mask,
u8 channel)
{
struct ieee80211_supported_band *sband;
u8 *pos;
Expand Down Expand Up @@ -947,6 +948,12 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
pos += ext_rates_len;
}

if (channel && sband->band == IEEE80211_BAND_2GHZ) {
*pos++ = WLAN_EID_DS_PARAMS;
*pos++ = 1;
*pos++ = channel;
}

/* insert custom IEs that go before HT */
if (ie && ie_len) {
static const u8 before_ht[] = {
Expand Down Expand Up @@ -1013,6 +1020,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
struct ieee80211_mgmt *mgmt;
size_t buf_len;
u8 *buf;
u8 chan;

/* FIXME: come up with a proper value */
buf = kmalloc(200 + ie_len, GFP_KERNEL);
Expand All @@ -1022,10 +1030,14 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
return;
}

chan = ieee80211_frequency_to_channel(
local->hw.conf.channel->center_freq);

buf_len = ieee80211_build_preq_ies(local, buf, ie, ie_len,
local->hw.conf.channel->band,
sdata->rc_rateidx_mask
[local->hw.conf.channel->band]);
[local->hw.conf.channel->band],
chan);

skb = ieee80211_probereq_get(&local->hw, &sdata->vif,
ssid, ssid_len,
Expand Down

0 comments on commit 37477e3

Please sign in to comment.