diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-07-04 06:58:40 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-06 09:27:15 -0400 |
commit | 4d6d0ae2a088e1e054ef6d96ceb1b41523291e71 (patch) | |
tree | ca2a92e901661b06981bf820a26379029cd82d4e | |
parent | a6f38ac3cc853189705006cc1e0f17ce8467a1df (diff) |
mac80211_hwsim: add testmode code to stop/wake queues
This was useful for debugging the queue stop/wake
issues and is pretty small so let's just put it in.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index c68728c6c6fa..3f38d846b093 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -1082,6 +1082,8 @@ enum hwsim_testmode_attr { | |||
1082 | enum hwsim_testmode_cmd { | 1082 | enum hwsim_testmode_cmd { |
1083 | HWSIM_TM_CMD_SET_PS = 0, | 1083 | HWSIM_TM_CMD_SET_PS = 0, |
1084 | HWSIM_TM_CMD_GET_PS = 1, | 1084 | HWSIM_TM_CMD_GET_PS = 1, |
1085 | HWSIM_TM_CMD_STOP_QUEUES = 2, | ||
1086 | HWSIM_TM_CMD_WAKE_QUEUES = 3, | ||
1085 | }; | 1087 | }; |
1086 | 1088 | ||
1087 | static const struct nla_policy hwsim_testmode_policy[HWSIM_TM_ATTR_MAX + 1] = { | 1089 | static const struct nla_policy hwsim_testmode_policy[HWSIM_TM_ATTR_MAX + 1] = { |
@@ -1121,6 +1123,12 @@ static int mac80211_hwsim_testmode_cmd(struct ieee80211_hw *hw, | |||
1121 | if (nla_put_u32(skb, HWSIM_TM_ATTR_PS, hwsim->ps)) | 1123 | if (nla_put_u32(skb, HWSIM_TM_ATTR_PS, hwsim->ps)) |
1122 | goto nla_put_failure; | 1124 | goto nla_put_failure; |
1123 | return cfg80211_testmode_reply(skb); | 1125 | return cfg80211_testmode_reply(skb); |
1126 | case HWSIM_TM_CMD_STOP_QUEUES: | ||
1127 | ieee80211_stop_queues(hw); | ||
1128 | return 0; | ||
1129 | case HWSIM_TM_CMD_WAKE_QUEUES: | ||
1130 | ieee80211_wake_queues(hw); | ||
1131 | return 0; | ||
1124 | default: | 1132 | default: |
1125 | return -EOPNOTSUPP; | 1133 | return -EOPNOTSUPP; |
1126 | } | 1134 | } |