Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300687
b: refs/heads/master
c: 88c868c
h: refs/heads/master
i:
  300685: 4e3cb9b
  300683: 3978a1b
  300679: 8518122
  300671: 74be49a
v: v3
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Apr 10, 2012
1 parent 7750e88 commit 49ec35f
Show file tree
Hide file tree
Showing 3 changed files with 18 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: 32c5057b22a60b23353dda93c57e475856ca286c
refs/heads/master: 88c868c43ba38ac3bab07bab4c45b4bc44c94357
19 changes: 16 additions & 3 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1518,9 +1518,16 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
ifmgd->nullfunc_failed = false;
ieee80211_send_nullfunc(sdata->local, sdata, 0);
} else {
int ssid_len;

ssid = ieee80211_bss_get_ie(ifmgd->associated, WLAN_EID_SSID);
ieee80211_send_probe_req(sdata, dst, ssid + 2, ssid[1], NULL, 0,
(u32) -1, true, false);
if (WARN_ON_ONCE(ssid == NULL))
ssid_len = 0;
else
ssid_len = ssid[1];

ieee80211_send_probe_req(sdata, dst, ssid + 2, ssid_len, NULL,
0, (u32) -1, true, false);
}

ifmgd->probe_send_count++;
Expand Down Expand Up @@ -1596,6 +1603,7 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct sk_buff *skb;
const u8 *ssid;
int ssid_len;

if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION))
return NULL;
Expand All @@ -1606,8 +1614,13 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
return NULL;

ssid = ieee80211_bss_get_ie(ifmgd->associated, WLAN_EID_SSID);
if (WARN_ON_ONCE(ssid == NULL))
ssid_len = 0;
else
ssid_len = ssid[1];

skb = ieee80211_build_probe_req(sdata, ifmgd->associated->bssid,
(u32) -1, ssid + 2, ssid[1],
(u32) -1, ssid + 2, ssid_len,
NULL, 0, true);

return skb;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2602,7 +2602,7 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
pos = skb_put(skb, ie_ssid_len);
*pos++ = WLAN_EID_SSID;
*pos++ = ssid_len;
if (ssid)
if (ssid_len)
memcpy(pos, ssid, ssid_len);
pos += ssid_len;

Expand Down

0 comments on commit 49ec35f

Please sign in to comment.