diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-11-11 01:50:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-16 16:37:08 -0500 |
commit | a619a4c0e1fd4e8c360c63d0df3fa0a401107d69 (patch) | |
tree | c9eb89d30834140f252c77bdf578528b11716678 /net/mac80211/mlme.c | |
parent | 4e8c14e9587c38f4cce8049c766935629fdb8d46 (diff) |
mac80211: Add function to get probe request template for current AP
Chipsets with hardware based connection monitoring need to autonomically
send directed probe-request frames to the AP (in the event of beacon loss,
for example.)
For the hardware to be able to do this, it requires a template for the frame
to transmit to the AP, filled in with the BSSID and SSID of the AP, but also
the supported rate IE's.
This patch adds a function to mac80211, which allows the hardware driver to
fetch this template after association, so it can be configured to the hardware.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a3a9421555af..dfc4a316ac1c 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1108,6 +1108,30 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata, | |||
1108 | mutex_unlock(&ifmgd->mtx); | 1108 | mutex_unlock(&ifmgd->mtx); |
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw, | ||
1112 | struct ieee80211_vif *vif) | ||
1113 | { | ||
1114 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
1115 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
1116 | struct sk_buff *skb; | ||
1117 | const u8 *ssid; | ||
1118 | |||
1119 | if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION)) | ||
1120 | return NULL; | ||
1121 | |||
1122 | ASSERT_MGD_MTX(ifmgd); | ||
1123 | |||
1124 | if (!ifmgd->associated) | ||
1125 | return NULL; | ||
1126 | |||
1127 | ssid = ieee80211_bss_get_ie(ifmgd->associated, WLAN_EID_SSID); | ||
1128 | skb = ieee80211_build_probe_req(sdata, ifmgd->associated->bssid, | ||
1129 | ssid + 2, ssid[1], NULL, 0); | ||
1130 | |||
1131 | return skb; | ||
1132 | } | ||
1133 | EXPORT_SYMBOL(ieee80211_ap_probereq_get); | ||
1134 | |||
1111 | static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata) | 1135 | static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata) |
1112 | { | 1136 | { |
1113 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 1137 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |