diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-12-01 08:24:24 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-22 13:31:17 -0500 |
commit | 8b73d13a21ae889e747cac180ff27c5a0a88e6a4 (patch) | |
tree | bcb832976dcbcc08b9ae0ff7c5f71c81da0b5f35 /drivers | |
parent | 0f78231bffb868a30e8533aace142213266bb811 (diff) |
mac80211_hwsim: implement ampdu action
Not that we actually ever aggregate anything, but
it could potentially be useful anyhow to simulate
aggregation sessions.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 92c669ebb358..89f527ee1a10 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -841,6 +841,31 @@ static int mac80211_hwsim_testmode_cmd(struct ieee80211_hw *hw, | |||
841 | } | 841 | } |
842 | #endif | 842 | #endif |
843 | 843 | ||
844 | static int mac80211_hwsim_ampdu_action(struct ieee80211_hw *hw, | ||
845 | struct ieee80211_vif *vif, | ||
846 | enum ieee80211_ampdu_mlme_action action, | ||
847 | struct ieee80211_sta *sta, u16 tid, u16 *ssn) | ||
848 | { | ||
849 | switch (action) { | ||
850 | case IEEE80211_AMPDU_TX_START: | ||
851 | ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); | ||
852 | break; | ||
853 | case IEEE80211_AMPDU_TX_STOP: | ||
854 | ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); | ||
855 | break; | ||
856 | case IEEE80211_AMPDU_TX_OPERATIONAL: | ||
857 | break; | ||
858 | case IEEE80211_AMPDU_RX_START: | ||
859 | case IEEE80211_AMPDU_RX_STOP: | ||
860 | break; | ||
861 | default: | ||
862 | return -EOPNOTSUPP; | ||
863 | } | ||
864 | |||
865 | return 0; | ||
866 | } | ||
867 | |||
868 | |||
844 | static const struct ieee80211_ops mac80211_hwsim_ops = | 869 | static const struct ieee80211_ops mac80211_hwsim_ops = |
845 | { | 870 | { |
846 | .tx = mac80211_hwsim_tx, | 871 | .tx = mac80211_hwsim_tx, |
@@ -855,6 +880,7 @@ static const struct ieee80211_ops mac80211_hwsim_ops = | |||
855 | .set_tim = mac80211_hwsim_set_tim, | 880 | .set_tim = mac80211_hwsim_set_tim, |
856 | .conf_tx = mac80211_hwsim_conf_tx, | 881 | .conf_tx = mac80211_hwsim_conf_tx, |
857 | CFG80211_TESTMODE_CMD(mac80211_hwsim_testmode_cmd) | 882 | CFG80211_TESTMODE_CMD(mac80211_hwsim_testmode_cmd) |
883 | .ampdu_action = mac80211_hwsim_ampdu_action, | ||
858 | }; | 884 | }; |
859 | 885 | ||
860 | 886 | ||