aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-01-29 09:02:27 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-31 08:28:43 -0500
commit1672c0e31917f49d31d30d79067103432bc20cc7 (patch)
treecc5b6b0017129b5748cfa2bace537d43c991d66c /net/mac80211/util.c
parent3ff9a827c683353b9826ef57366b0f313acc21b0 (diff)
mac80211: start auth/assoc timeout on frame status
When sending authentication/association frames they might take a bit of time to go out because we may have to synchronise with the AP, in particular in the case where it's really a P2P GO. In this case the 200ms fixed timeout could potentially be too short if the beacon interval is relatively large. For drivers that report TX status we can do better. Instead of starting the timeout directly, start it only when the frame status arrives. Since then the frame was out on the air, we can wait shorter (the typical response time is supposed to be 30ms, wait 100ms.) Also, if the frame failed to be transmitted try again right away instead of waiting. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 1c74512697f0..139ad9b66c39 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1030,7 +1030,8 @@ u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
1030void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, 1030void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
1031 u16 transaction, u16 auth_alg, u16 status, 1031 u16 transaction, u16 auth_alg, u16 status,
1032 u8 *extra, size_t extra_len, const u8 *da, 1032 u8 *extra, size_t extra_len, const u8 *da,
1033 const u8 *bssid, const u8 *key, u8 key_len, u8 key_idx) 1033 const u8 *bssid, const u8 *key, u8 key_len, u8 key_idx,
1034 u32 tx_flags)
1034{ 1035{
1035 struct ieee80211_local *local = sdata->local; 1036 struct ieee80211_local *local = sdata->local;
1036 struct sk_buff *skb; 1037 struct sk_buff *skb;
@@ -1063,7 +1064,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
1063 WARN_ON(err); 1064 WARN_ON(err);
1064 } 1065 }
1065 1066
1066 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; 1067 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
1068 tx_flags;
1067 ieee80211_tx_skb(sdata, skb); 1069 ieee80211_tx_skb(sdata, skb);
1068} 1070}
1069 1071
@@ -1277,7 +1279,7 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
1277void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, 1279void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
1278 const u8 *ssid, size_t ssid_len, 1280 const u8 *ssid, size_t ssid_len,
1279 const u8 *ie, size_t ie_len, 1281 const u8 *ie, size_t ie_len,
1280 u32 ratemask, bool directed, bool no_cck, 1282 u32 ratemask, bool directed, u32 tx_flags,
1281 struct ieee80211_channel *channel, bool scan) 1283 struct ieee80211_channel *channel, bool scan)
1282{ 1284{
1283 struct sk_buff *skb; 1285 struct sk_buff *skb;
@@ -1286,9 +1288,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
1286 ssid, ssid_len, 1288 ssid, ssid_len,
1287 ie, ie_len, directed); 1289 ie, ie_len, directed);
1288 if (skb) { 1290 if (skb) {
1289 if (no_cck) 1291 IEEE80211_SKB_CB(skb)->flags |= tx_flags;
1290 IEEE80211_SKB_CB(skb)->flags |=
1291 IEEE80211_TX_CTL_NO_CCK_RATE;
1292 if (scan) 1292 if (scan)
1293 ieee80211_tx_skb_tid_band(sdata, skb, 7, channel->band); 1293 ieee80211_tx_skb_tid_band(sdata, skb, 7, channel->band);
1294 else 1294 else