* [PATCH 1/4] mac80211_hwsim: use ieee80211_free_txskb
@ 2013-07-14 20:57 Johannes Berg
2013-07-14 20:57 ` [PATCH 2/4] mac80211_hwsim: claim uAPSD support Johannes Berg
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Johannes Berg @ 2013-07-14 20:57 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
These are only strange error cases, so it's not really
all that important, but the driver really should use
ieee80211_free_tx_skb instead of just dev_kfree_skb.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/mac80211_hwsim.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index cb34c78..11adae8 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -867,7 +867,7 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
if (WARN_ON(skb->len < 10)) {
/* Should not happen; just a sanity check for addr1 use */
- dev_kfree_skb(skb);
+ ieee80211_free_txskb(hw, skb);
return;
}
@@ -884,13 +884,13 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
}
if (WARN(!channel, "TX w/o channel - queue = %d\n", txi->hw_queue)) {
- dev_kfree_skb(skb);
+ ieee80211_free_txskb(hw, skb);
return;
}
if (data->idle && !data->tmp_chan) {
wiphy_debug(hw->wiphy, "Trying to TX when idle - reject\n");
- dev_kfree_skb(skb);
+ ieee80211_free_txskb(hw, skb);
return;
}
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/4] mac80211_hwsim: claim uAPSD support
2013-07-14 20:57 [PATCH 1/4] mac80211_hwsim: use ieee80211_free_txskb Johannes Berg
@ 2013-07-14 20:57 ` Johannes Berg
2013-07-14 20:57 ` [PATCH 3/4] mac80211_hwsim: claim active monitor support Johannes Berg
2013-07-14 20:57 ` [PATCH 4/4] mac80211: make active monitor injection work w/ HW queue Johannes Berg
2 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2013-07-14 20:57 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
Since mac80211 does everything, we can just claim it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/mac80211_hwsim.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 11adae8..0a439f8 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2309,7 +2309,8 @@ static int __init init_mac80211_hwsim(void)
hw->flags |= IEEE80211_HW_SUPPORTS_RC_TABLE;
hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
- WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
+ WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
+ WIPHY_FLAG_AP_UAPSD;
/* ask mac80211 to reserve space for magic */
hw->vif_data_size = sizeof(struct hwsim_vif_priv);
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] mac80211_hwsim: claim active monitor support
2013-07-14 20:57 [PATCH 1/4] mac80211_hwsim: use ieee80211_free_txskb Johannes Berg
2013-07-14 20:57 ` [PATCH 2/4] mac80211_hwsim: claim uAPSD support Johannes Berg
@ 2013-07-14 20:57 ` Johannes Berg
2013-07-14 20:57 ` [PATCH 4/4] mac80211: make active monitor injection work w/ HW queue Johannes Berg
2 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2013-07-14 20:57 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
It seems to actually work this way already, so we
may need to do some work to make monitor interfaces
be _not_ active in hwsim instead.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/mac80211_hwsim.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 0a439f8..7b2a622 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2311,6 +2311,7 @@ static int __init init_mac80211_hwsim(void)
hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
WIPHY_FLAG_AP_UAPSD;
+ hw->wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR;
/* ask mac80211 to reserve space for magic */
hw->vif_data_size = sizeof(struct hwsim_vif_priv);
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] mac80211: make active monitor injection work w/ HW queue
2013-07-14 20:57 [PATCH 1/4] mac80211_hwsim: use ieee80211_free_txskb Johannes Berg
2013-07-14 20:57 ` [PATCH 2/4] mac80211_hwsim: claim uAPSD support Johannes Berg
2013-07-14 20:57 ` [PATCH 3/4] mac80211_hwsim: claim active monitor support Johannes Berg
@ 2013-07-14 20:57 ` Johannes Berg
2 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2013-07-14 20:57 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
When a driver (like hwsim) uses HW queue control an
active monitor vif needs to be used for the queues,
make the code do that. Otherwise we'd bail out and
drop the frames.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/tx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f82301b..be4d3ca 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1272,6 +1272,10 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
switch (sdata->vif.type) {
case NL80211_IFTYPE_MONITOR:
+ if (sdata->u.mntr_flags & MONITOR_FLAG_ACTIVE) {
+ vif = &sdata->vif;
+ break;
+ }
sdata = rcu_dereference(local->monitor_sdata);
if (sdata) {
vif = &sdata->vif;
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-14 20:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-14 20:57 [PATCH 1/4] mac80211_hwsim: use ieee80211_free_txskb Johannes Berg
2013-07-14 20:57 ` [PATCH 2/4] mac80211_hwsim: claim uAPSD support Johannes Berg
2013-07-14 20:57 ` [PATCH 3/4] mac80211_hwsim: claim active monitor support Johannes Berg
2013-07-14 20:57 ` [PATCH 4/4] mac80211: make active monitor injection work w/ HW queue Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox