diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-06-27 13:18:36 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-03 13:50:34 +0200 |
commit | a1845fc7c552977e23fe552ad3f5c6c279e3d550 (patch) | |
tree | 6d2789387757141044dbbaf3c361bcc58809aa13 /net/mac80211/driver-ops.h | |
parent | mac80211_hwsim: fix NUM_BANDS usage (diff) | |
download | linux-a1845fc7c552977e23fe552ad3f5c6c279e3d550.tar.xz linux-a1845fc7c552977e23fe552ad3f5c6c279e3d550.zip |
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 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 5042151a3325..df9203199102 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -852,4 +852,18 @@ static inline int drv_get_rssi(struct ieee80211_local *local, return ret; } + +static inline void drv_mgd_prepare_tx(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata) +{ + might_sleep(); + + check_sdata_in_driver(sdata); + WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_STATION); + + trace_drv_mgd_prepare_tx(local, sdata); + if (local->ops->mgd_prepare_tx) + local->ops->mgd_prepare_tx(&local->hw, &sdata->vif); + trace_drv_return_void(local); +} #endif /* __MAC80211_DRIVER_OPS */ |