aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-27 07:18:36 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-03 07:50:34 -0400
commita1845fc7c552977e23fe552ad3f5c6c279e3d550 (patch)
tree6d2789387757141044dbbaf3c361bcc58809aa13 /include/net/mac80211.h
parent1b083ea4c072e49a6b0d4a1a6d5d9a6e4b3606b1 (diff)
mac80211: add TX prepare API
Some drivers require setup before being able to send management frames in managed mode, in particular in multi-channel cases. Introduce API to allow the drivers to do such setup while being able to sleep waiting for the setup to finish in the device. This isn't possible inside the TX call since that can't sleep. A future patch may also restructure the TX retry to wait for the driver to report the frame status, as suggested by Arik in http://mid.gmane.org/CA+XVXffKSEL6ZQPQ98x-zO-NL2=TNF1uN==mprRyUmAaRn254g@mail.gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 3f1b58cf9c8c..e3fa90ce9ecb 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2244,6 +2244,18 @@ enum ieee80211_rate_control_changed {
2244 * @get_rssi: Get current signal strength in dBm, the function is optional 2244 * @get_rssi: Get current signal strength in dBm, the function is optional
2245 * and can sleep. 2245 * and can sleep.
2246 * 2246 *
2247 * @mgd_prepare_tx: Prepare for transmitting a management frame for association
2248 * before associated. In multi-channel scenarios, a virtual interface is
2249 * bound to a channel before it is associated, but as it isn't associated
2250 * yet it need not necessarily be given airtime, in particular since any
2251 * transmission to a P2P GO needs to be synchronized against the GO's
2252 * powersave state. mac80211 will call this function before transmitting a
2253 * management frame prior to having successfully associated to allow the
2254 * driver to give it channel time for the transmission, to get a response
2255 * and to be able to synchronize with the GO.
2256 * The callback will be called before each transmission and upon return
2257 * mac80211 will transmit the frame right away.
2258 * The callback is optional and can (should!) sleep.
2247 */ 2259 */
2248struct ieee80211_ops { 2260struct ieee80211_ops {
2249 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 2261 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -2383,6 +2395,9 @@ struct ieee80211_ops {
2383 u32 sset, u8 *data); 2395 u32 sset, u8 *data);
2384 int (*get_rssi)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2396 int (*get_rssi)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2385 struct ieee80211_sta *sta, s8 *rssi_dbm); 2397 struct ieee80211_sta *sta, s8 *rssi_dbm);
2398
2399 void (*mgd_prepare_tx)(struct ieee80211_hw *hw,
2400 struct ieee80211_vif *vif);
2386}; 2401};
2387 2402
2388/** 2403/**