: mac80211: Reimplement WME using ->select_queue().
Subsystems (3)
David Miller
maintainerPATCH 9/13 : mac80211: Reimplement WME using ->select_queue().
The only behavior change is that we do not drop packets under any circumstances. If that is absolutely needed, we could easily add it back.
With cleanups and help from Johannes Berg.
Signed-off-by David S. Miller <[email protected]>
--- include/net/mac80211.h | 8 - net/mac80211/Kconfig | 11 - net/mac80211/Makefile | 2 +- net/mac80211/ieee80211_i.h | 15 +- net/mac80211/main.c | 61 ++---- net/mac80211/util.c | 14 +- net/mac80211/wme.c | 602 ++++++++------------------------------------ net/mac80211/wme.h | 35 +--- 8 files changed, 124 insertions(+), 624 deletions(-)
include/net/mac80211.h +0 -8
@@ -837,20 +837,12 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr)static inline int ieee80211_num_regular_queues (struct ieee80211_hw *hw) { -#ifdef CONFIG_MAC80211_QOS return hw->queues; -#else -return 1 ; -#endif }static inline int ieee80211_num_queues (struct ieee80211_hw *hw) { -#ifdef CONFIG_MAC80211_QOS return hw->queues + hw->ampdu_queues; -#else -return 1 ; -#endif } static inline struct ieee80211_rate *
net/mac80211/Kconfig +0 -11
@@ -11,17 +11,6 @@ config MAC80211 This option enables the hardware independent IEEE 802.11 networking stack. -config MAC80211_QOS - def_bool y - depends on MAC80211 - depends on NET_SCHED - depends on BROKEN - -comment "QoS/HT support disabled" - depends on MAC80211 && !MAC80211_QOS -comment "QoS/HT support needs CONFIG_NET_SCHED" - depends on MAC80211 && !NET_SCHED - menu "Rate control algorithm selection" depends on MAC80211 != n
net/mac80211/Makefile +1 -1
@@ -18,10 +18,10 @@ mac80211-y := \ tx.o \ key.o \ util.o \ + wme.o \ event.o mac80211-$(CONFIG_MAC80211_LEDS) += led.o -mac80211-$(CONFIG_MAC80211_QOS) += wme.o mac80211-$(CONFIG_MAC80211_DEBUGFS) += \ debugfs.o \ debugfs_sta.o \
net/mac80211/ieee80211_i.h +6 -9
@@ -25,6 +25,7 @@#include <linux/etherdevice.h> #include <net/wireless.h> #include <net/iw_handler.h> +#include <net/mac80211.h> #include "key.h" #include "sta_info.h"
@@ -542,6 +543,9 @@ enum { IEEE80211_ADDBA_MSG = 4, }; +/* maximum number of hardware queues we support. */ +#define QD_MAX_QUEUES (IEEE80211_MAX_AMPDU_QUEUES + IEEE80211_MAX_QUEUES) +struct ieee80211_local {/* embed the driver visible part. * don't cast (use the static inlines below), but we keep
@@ -550,6 +554,8 @@ struct ieee80211_local {const struct ieee80211_ops *ops; +unsigned long queue_pool[BITS_TO_LONGS (QD_MAX_QUEUES )]; +struct net_device *mdev;/* wmaster# - "master" 802.11 device */ int open_count;int monitors, cooked_mntrs;
@@ -751,15 +757,6 @@ struct ieee80211_local {#endif }; -static inline int ieee80211_is_multiqueue (struct ieee80211_local *local) -{ -#ifdef CONFIG_MAC80211_QOS -return netif_is_multiqueue (local->mdev); -#else -return 0 ; -#endif -} -/* this struct represents 802.11n's RA/TID combination */ struct ieee80211_ra_tid {u8 ra[ETH_ALEN ];
net/mac80211/main.c +15 -46
163 lines not on this page · raw message
net/mac80211/util.c +2 -12
@@ -363,12 +363,7 @@ void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue)if (test_bit (queue, local->queues_pending)) {tasklet_schedule (&local->tx_pending_tasklet); }else { -if (ieee80211_is_multiqueue (local)) { -netif_wake_subqueue (local->mdev, queue); - }else { -WARN_ON (queue !=0 ); -netif_wake_queue (local->mdev); - } +netif_wake_subqueue (local->mdev, queue); } }EXPORT_SYMBOL (ieee80211_wake_queue);
@@ -377,12 +372,7 @@ void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue) {struct ieee80211_local *local =hw_to_local (hw); -if (ieee80211_is_multiqueue (local)) { -netif_stop_subqueue (local->mdev, queue); - }else { -WARN_ON (queue !=0 ); -netif_stop_queue (local->mdev); - } +netif_stop_subqueue (local->mdev, queue); }EXPORT_SYMBOL (ieee80211_stop_queue);
net/mac80211/wme.c +99 -503
723 lines not on this page · raw message
net/mac80211/wme.h +1 -34
@@ -23,45 +23,12 @@extern const int ieee802_1d_to_ac[8 ]; -#ifdef CONFIG_MAC80211_QOS -void ieee80211_install_qdisc (struct net_device *dev); -int ieee80211_qdisc_installed (struct net_device *dev); +u16 ieee80211_select_queue (struct net_device *dev,struct sk_buff *skb);int ieee80211_ht_agg_queue_add (struct ieee80211_local *local,struct sta_info *sta,u16 tid);void ieee80211_ht_agg_queue_remove (struct ieee80211_local *local,struct sta_info *sta,u16 tid,u8 requeue);void ieee80211_requeue (struct ieee80211_local *local,int queue); -int ieee80211_wme_register (void ); -void ieee80211_wme_unregister (void ); -#else -static inline void ieee80211_install_qdisc (struct net_device *dev) -{ -} -static inline int ieee80211_qdisc_installed (struct net_device *dev) -{ -return 0 ; -} -static inline int ieee80211_ht_agg_queue_add (struct ieee80211_local *local, -struct sta_info *sta,u16 tid) -{ -return -EAGAIN ; -} -static inline void ieee80211_ht_agg_queue_remove (struct ieee80211_local *local, -struct sta_info *sta,u16 tid, -u8 requeue) -{ -} -static inline void ieee80211_requeue (struct ieee80211_local *local,int queue) -{ -} -static inline int ieee80211_wme_register (void ) -{ -return 0 ; -} -static inline void ieee80211_wme_unregister (void ) -{ -} -#endif /* CONFIG_NET_SCHED */ #endif /* _WME_H */
Signature · 1 line
1.5.6.2.255.gbed62