aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-04 06:18:21 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-09 16:13:54 -0500
commite247bd9068e3e86c3571147c128883596ace9d05 (patch)
tree5639065f2b0bfe4cb7389a75e274bc8a53efd75f /net/mac80211/cfg.c
parente7f4a940bb5eecd07cf0039e7d9201badc332ae0 (diff)
cfg80211/mac80211: allow management TX to not wait for ACK
For probe responses it can be useful to not wait for ACK to avoid retransmissions if the station that sent the probe is already on the next channel, so allow userspace to request not caring about the ACK with a new nl80211 flag. Since mac80211 needs to be updated for the new function prototype anyway implement it right away -- it's just a few lines of code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index e072fea69a30..ab3258ac0b2c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1936,7 +1936,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
1936 enum nl80211_channel_type channel_type, 1936 enum nl80211_channel_type channel_type,
1937 bool channel_type_valid, unsigned int wait, 1937 bool channel_type_valid, unsigned int wait,
1938 const u8 *buf, size_t len, bool no_cck, 1938 const u8 *buf, size_t len, bool no_cck,
1939 u64 *cookie) 1939 bool dont_wait_for_ack, u64 *cookie)
1940{ 1940{
1941 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 1941 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1942 struct ieee80211_local *local = sdata->local; 1942 struct ieee80211_local *local = sdata->local;
@@ -1944,10 +1944,15 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
1944 struct sta_info *sta; 1944 struct sta_info *sta;
1945 struct ieee80211_work *wk; 1945 struct ieee80211_work *wk;
1946 const struct ieee80211_mgmt *mgmt = (void *)buf; 1946 const struct ieee80211_mgmt *mgmt = (void *)buf;
1947 u32 flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX | 1947 u32 flags;
1948 IEEE80211_TX_CTL_REQ_TX_STATUS;
1949 bool is_offchan = false; 1948 bool is_offchan = false;
1950 1949
1950 if (dont_wait_for_ack)
1951 flags = IEEE80211_TX_CTL_NO_ACK;
1952 else
1953 flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX |
1954 IEEE80211_TX_CTL_REQ_TX_STATUS;
1955
1951 /* Check that we are on the requested channel for transmission */ 1956 /* Check that we are on the requested channel for transmission */
1952 if (chan != local->tmp_channel && 1957 if (chan != local->tmp_channel &&
1953 chan != local->oper_channel) 1958 chan != local->oper_channel)