Please pull 'upstream-davem' branch of wireless-2.6
Subsystems (4)
Dave,
Here are a few more for 2.6.25. The are mostly clean-ups for the new PID rate control algorithm, and some A-MPDU bits related to supporting 802.11n.
Please let me know if there are problems!
Thanks,
John
---
Individual patches are available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream-davem
---
The following changes since commit 60d4ec5e8360560484bdac9244758f1ff7046dd6:
Eric Dumazet (1):
[XFRM]: xfrm_state_clone() should be static, not exported
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-davem
Andrew Lutomirski (1):
rc80211_pid should respect fixed rates.
Helmut Schaa (1):
mac80211: Restore rx.fc before every invocation of ieee80211_invoke_rx_handlers
Ivo van Doorn (1):
mac80211: Add radio led trigger
Johannes Berg (3):
mac80211: remove misleading 'res' variable
mac80211: make rc_pid_fop_events static
mac80211: better rate control algorithm selection
Ron Rindjunsky (8):
mac80211: restructure __ieee80211_rx
mac80211: A-MPDU Rx add low level driver API
mac80211: A-MPDU Rx add MLME structures
mac80211: A-MPDU Rx adding basic functionality
mac80211: A-MPDU Rx MLME data initialization
mac80211: A-MPDU Rx handling aggregation reordering
mac80211: A-MPDU Rx adding BAR handling capability
mac80211: A-MPDU Rx handling DELBA requests
Stefano Brivio (7):
rc80211-pid: export human-readable target_pf value to debugfs
rc80211-pid: add kerneldoc for tunable parameters
rc80211-pid: simplify and fix shift_adjust
rc80211-pid: fix sta_info refcounting
rc80211-pid: pf_target tuning
rc80211-pid: add MAINTAINERS entry
rc80211-pid: fix definition of rate control interval
MAINTAINERS | 10 + include/linux/ieee80211.h | 7 + include/net/mac80211.h | 50 ++++++ net/mac80211/Kconfig | 37 ++-- net/mac80211/Makefile | 41 +++-- net/mac80211/ieee80211.c | 46 +++--- net/mac80211/ieee80211_i.h | 11 +- net/mac80211/ieee80211_ioctl.c | 2 + net/mac80211/ieee80211_led.c | 35 ++++ net/mac80211/ieee80211_led.h | 6 + net/mac80211/ieee80211_rate.c | 4 + net/mac80211/ieee80211_rate.h | 38 ++++- net/mac80211/ieee80211_sta.c | 269 ++++++++++++++++++++++++++++-- net/mac80211/rc80211_pid.h | 52 ++++-- net/mac80211/rc80211_pid_algo.c | 75 ++++++--- net/mac80211/rc80211_pid_debugfs.c | 2 +- net/mac80211/rc80211_simple.c | 21 +++- net/mac80211/rx.c | 331 +++++++++++++++++++++++++++++++----- net/mac80211/sta_info.c | 17 ++ net/mac80211/sta_info.h | 47 +++++ net/mac80211/tx.c | 3 +- net/mac80211/util.c | 15 ++- 22 files changed, 957 insertions(+), 162 deletions(-)
MAINTAINERS +10 -0
@@ -2480,6 +2480,16 @@ W: http://linuxwireless.org/ T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git S: Maintained +MAC80211 PID RATE CONTROL +P: Stefano Brivio +M: [email protected] +P: Mattias Nissler +M: [email protected] +L: [email protected] +W: http://linuxwireless.org/en/developers/Documentation/mac80211/RateControl/PID +T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git +S: Maintained + MACVLAN DRIVER P: Patrick McHardy M: [email protected]
include/linux/ieee80211.h +7 -0
@@ -472,6 +472,13 @@ enum ieee80211_back_actioncode { WLAN_ACTION_DELBA = 2, }; +/* BACK (block-ack) parties */ +enum ieee80211_back_parties { +WLAN_BACK_RECIPIENT =0 , +WLAN_BACK_INITIATOR =1 , +WLAN_BACK_TIMER =2 , +}; +/* A-MSDU 802.11n */ #define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080
include/net/mac80211.h +50 -0
86 lines not on this page · raw message
net/mac80211/Kconfig +18 -19
@@ -13,25 +13,17 @@ config MAC80211 This option enables the hardware independent IEEE 802.11 networking stack. -config MAC80211_RC_DEFAULT_CHOICE - bool "Choose default rate control algorithm" if EMBEDDED - default y - depends on MAC80211 - ---help--- - This options enables selection of a default rate control - algorithm to be built into the mac80211 module. Alternate - rate control algorithms might be built into the mac80211 - module as well. +menu "Rate control algorithm selection" + depends on MAC80211 != n choice prompt "Default rate control algorithm" default MAC80211_RC_DEFAULT_PID - depends on MAC80211 && MAC80211_RC_DEFAULT_CHOICE ---help--- This option selects the default rate control algorithm mac80211 will use. Note that this default can still be overriden through the ieee80211_default_rc_algo module - parameter. + parameter if different algorithms are available. config MAC80211_RC_DEFAULT_PID bool "PID controller based rate control algorithm"
@@ -50,19 +42,27 @@ config MAC80211_RC_DEFAULT_SIMPLE dumb algorithm. You should choose the PID rate control instead. +config MAC80211_RC_DEFAULT_NONE + bool "No default algorithm" + depends on EMBEDDED + help + Selecting this option will select no default algorithm + and allow you to not build any. Do not choose this + option unless you know your driver comes with another + suitable algorithm. endchoice +comment "Selecting 'y' for an algorithm will" +comment "build the algorithm into mac80211." + config MAC80211_RC_DEFAULT string - depends on MAC80211 default "pid" if MAC80211_RC_DEFAULT_PID default "simple" if MAC80211_RC_DEFAULT_SIMPLE default "" config MAC80211_RC_PID - bool "PID controller based rate control algorithm" - default y - depends on MAC80211 + tristate "PID controller based rate control algorithm" ---help--- This option enables a TX rate control algorithm for mac80211 that uses a PID controller to select the TX
@@ -72,16 +72,15 @@ config MAC80211_RC_PID different rate control algorithm. config MAC80211_RC_SIMPLE - bool "Simple rate control algorithm (DEPRECATED)" - default n - depends on MAC80211 + tristate "Simple rate control algorithm (DEPRECATED)" ---help--- This option enables a very simple, non-responsive TX rate control algorithm. This algorithm is deprecated - and will be removed from the kernel in near future. + and will be removed from the kernel in the near future. It has been replaced by the PID algorithm. Say N unless you know what you are doing. +endmenu config MAC80211_LEDS bool "Enable LED triggers"
net/mac80211/Makefile +27 -14
51 lines not on this page · raw message
net/mac80211/ieee80211.c +23 -23
93 lines not on this page · raw message
net/mac80211/ieee80211_i.h +8 -3
@@ -500,8 +500,9 @@ struct ieee80211_local {#ifdef CONFIG_MAC80211_LEDS int tx_led_counter, rx_led_counter; -struct led_trigger *tx_led, *rx_led, *assoc_led; -char tx_led_name[32 ], rx_led_name[32 ], assoc_led_name[32 ]; +struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led; +char tx_led_name[32 ], rx_led_name[32 ], + assoc_led_name[32 ], radio_led_name[32 ];#endif u32 channel_use;
@@ -767,6 +768,9 @@ int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie,int ieee80211_ht_addt_info_ie_to_ht_bss_info (struct ieee80211_ht_addt_info *ht_add_info_ie,struct ieee80211_ht_bss_info *bss_info); +void ieee80211_sta_stop_rx_ba_session (struct net_device *dev,u8 *da, +u16 tid,u16 initiator,u16 reason); +void sta_rx_agg_session_timer_expired (unsigned long data);/* ieee80211_iface.c */ int ieee80211_if_add (struct net_device *dev,const char *name,struct net_device **new_dev,int type);
@@ -798,7 +802,8 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev);extern void *mac80211_wiphy_privid;/* for wiphy privid */ extern const unsigned char rfc1042_header[6 ];extern const unsigned char bridge_tunnel_header[6 ]; -u8 *ieee80211_get_bssid (struct ieee80211_hdr *hdr,size_t len); +u8 *ieee80211_get_bssid (struct ieee80211_hdr *hdr,size_t len, +enum ieee80211_if_types type);int ieee80211_frame_duration (struct ieee80211_local *local,size_t len,int rate,int erp,int short_preamble); void mac80211_ev_michael_mic_failure(struct net_device *dev, int keyidx,
net/mac80211/ieee80211_ioctl.c +2 -0
@@ -21,6 +21,7 @@#include <net/mac80211.h> #include "ieee80211_i.h" +#include "ieee80211_led.h" #include "ieee80211_rate.h" #include "wpa.h" #include "aes_ccm.h"
@@ -652,6 +653,7 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev,if (local->hw.conf.radio_enabled != !(data->txpower.disabled)) { local->hw.conf.radio_enabled = !(data->txpower.disabled); need_reconfig =1 ; +ieee80211_led_radio (local, local->hw.conf.radio_enabled); }if (need_reconfig) {
net/mac80211/ieee80211_led.c +35 -0
@@ -43,6 +43,16 @@ void ieee80211_led_assoc(struct ieee80211_local *local, bool associated)led_trigger_event (local->assoc_led,LED_OFF ); } +void ieee80211_led_radio (struct ieee80211_local *local,bool enabled) +{ +if (unlikely (!local->radio_led)) +return ; +if (enabled) +led_trigger_event (local->radio_led,LED_FULL ); +else +led_trigger_event (local->radio_led,LED_OFF ); +} +void ieee80211_led_init (struct ieee80211_local *local) { local->rx_led =kzalloc (sizeof (struct led_trigger ),GFP_KERNEL );
@@ -77,10 +87,25 @@ void ieee80211_led_init(struct ieee80211_local *local) local->assoc_led =NULL ; } } + + local->radio_led =kzalloc (sizeof (struct led_trigger ),GFP_KERNEL ); +if (local->radio_led) { +snprintf (local->radio_led_name,sizeof (local->radio_led_name), +"%sradio" ,wiphy_name (local->hw.wiphy)); + local->radio_led->name = local->radio_led_name; +if (led_trigger_register (local->radio_led)) { +kfree (local->radio_led); + local->radio_led =NULL ; + } + } }void ieee80211_led_exit (struct ieee80211_local *local) { +if (local->radio_led) { +led_trigger_unregister (local->radio_led); +kfree (local->radio_led); + }if (local->assoc_led) {led_trigger_unregister (local->assoc_led);kfree (local->assoc_led);
@@ -95,6 +120,16 @@ void ieee80211_led_exit(struct ieee80211_local *local) } } +char *__ieee80211_get_radio_led_name (struct ieee80211_hw *hw) +{ +struct ieee80211_local *local =hw_to_local (hw); + +if (local->radio_led) +return local->radio_led_name; +return NULL ; +} +EXPORT_SYMBOL (__ieee80211_get_radio_led_name); +char *__ieee80211_get_assoc_led_name (struct ieee80211_hw *hw) {struct ieee80211_local *local =hw_to_local (hw);
net/mac80211/ieee80211_led.h +6 -0
@@ -16,6 +16,8 @@ extern void ieee80211_led_rx(struct ieee80211_local *local);extern void ieee80211_led_tx (struct ieee80211_local *local,int q);extern void ieee80211_led_assoc (struct ieee80211_local *local,bool associated); +extern void ieee80211_led_radio (struct ieee80211_local *local, +bool enabled);extern void ieee80211_led_init (struct ieee80211_local *local);extern void ieee80211_led_exit (struct ieee80211_local *local);#else
@@ -29,6 +31,10 @@ static inline void ieee80211_led_assoc(struct ieee80211_local *local, bool associated) { } +static inline void ieee80211_led_radio (struct ieee80211_local *local, +bool enabled) +{ +}static inline void ieee80211_led_init (struct ieee80211_local *local) { }
net/mac80211/ieee80211_rate.c +4 -0
@@ -115,6 +115,10 @@ ieee80211_rate_control_ops_get(const char *name)/* try default if specific alg requested but not found */ ops =ieee80211_try_rate_control_ops_get (ieee80211_default_rc_algo); +/* try built-in one if specific alg requested but not found */ +if (!ops &&strlen (CONFIG_MAC80211_RC_DEFAULT )) + ops =ieee80211_try_rate_control_ops_get (CONFIG_MAC80211_RC_DEFAULT ); +return ops; }
net/mac80211/ieee80211_rate.h +32 -6
@@ -58,12 +58,6 @@ struct rate_control_ref {struct kref kref; }; -/* default 'simple' algorithm */ -extern struct rate_control_ops mac80211_rcsimple; - -/* 'PID' algorithm */ -extern struct rate_control_ops mac80211_rcpid; -int ieee80211_rate_control_register (struct rate_control_ops *ops);void ieee80211_rate_control_unregister (struct rate_control_ops *ops);
@@ -170,4 +164,36 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local, const char *name);void rate_control_deinitialize (struct ieee80211_local *local); + +/* Rate control algorithms */ +#if defined(RC80211_SIMPLE_COMPILE ) || \ + (defined(CONFIG_MAC80211_RC_SIMPLE ) && \ + !defined(CONFIG_MAC80211_RC_SIMPLE_MODULE )) +extern int rc80211_simple_init (void ); +extern void rc80211_simple_exit (void ); +#else +static inline int rc80211_simple_init (void ) +{ +return 0 ; +} +static inline void rc80211_simple_exit (void ) +{ +} +#endif + +#if defined(RC80211_PID_COMPILE ) || \ + (defined(CONFIG_MAC80211_RC_PID ) && \ + !defined(CONFIG_MAC80211_RC_PID_MODULE )) +extern int rc80211_pid_init (void ); +extern void rc80211_pid_exit (void ); +#else +static inline int rc80211_pid_init (void ) +{ +return 0 ; +} +static inline void rc80211_pid_exit (void ) +{ +} +#endif +#endif /* IEEE80211_RATE_H */
net/mac80211/ieee80211_sta.c +257 -12
316 lines not on this page · raw message
net/mac80211/rc80211_pid.h +38 -14
91 lines not on this page · raw message
net/mac80211/rc80211_pid_algo.c +49 -26
134 lines not on this page · raw message
net/mac80211/rc80211_pid_debugfs.c +1 -1
@@ -197,7 +197,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf,#undef RC_PID_PRINT_BUF_SIZE -struct file_operations rc_pid_fop_events = { +static struct file_operations rc_pid_fop_events = { .owner =THIS_MODULE , .read = rate_control_pid_events_read, .poll = rate_control_pid_events_poll,
net/mac80211/rc80211_simple.c +20 -1
@@ -13,6 +13,7 @@#include <linux/slab.h> #include <linux/skbuff.h> #include <linux/compiler.h> +#include <linux/module.h> #include <net/mac80211.h> #include "ieee80211_i.h"
@@ -349,7 +350,7 @@ static void rate_control_simple_remove_sta_debugfs(void *priv, void *priv_sta) }#endif -struct rate_control_ops mac80211_rcsimple = { +static struct rate_control_ops mac80211_rcsimple = { .name ="simple" , .tx_status = rate_control_simple_tx_status, .get_rate = rate_control_simple_get_rate,
@@ -364,3 +365,21 @@ struct rate_control_ops mac80211_rcsimple = { .remove_sta_debugfs = rate_control_simple_remove_sta_debugfs,#endif }; + +MODULE_LICENSE ("GPL" ); +MODULE_DESCRIPTION ("Simple rate control algorithm" ); + +int __init rc80211_simple_init (void ) +{ +return ieee80211_rate_control_register (&mac80211_rcsimple); +} + +void __exit rc80211_simple_exit(void) +{ +ieee80211_rate_control_unregister (&mac80211_rcsimple); +} + +#ifdef CONFIG_MAC80211_RC_SIMPLE_MODULE +module_init (rc80211_simple_init); +module_exit (rc80211_simple_exit); +#endif
net/mac80211/rx.c +291 -40
447 lines not on this page · raw message
net/mac80211/sta_info.c +17 -0
@@ -104,6 +104,7 @@ static void sta_info_release(struct kref *kref) struct sta_info *sta = container_of(kref, struct sta_info, kref);struct ieee80211_local *local = sta->local;struct sk_buff *skb; +int i;/* free sta structure; it has already been removed from * hash table etc. external structures. Make sure that all
@@ -116,6 +117,8 @@ static void sta_info_release(struct kref *kref)while ((skb =skb_dequeue (&sta->tx_filtered)) !=NULL ) {dev_kfree_skb_any (skb); } +for (i =0 ; i <STA_TID_NUM ; i++) +del_timer_sync (&sta->ampdu_mlme.tid_rx[i].session_timer);rate_control_free_sta (sta->rate_ctrl, sta->rate_ctrl_priv);rate_control_put (sta->rate_ctrl);kfree (sta);
@@ -133,6 +136,7 @@ struct sta_info * sta_info_add(struct ieee80211_local *local, struct net_device *dev, u8 *addr, gfp_t gfp) { struct sta_info *sta; +int i;DECLARE_MAC_BUF (mac); sta =kzalloc (sizeof (*sta), gfp);
@@ -152,6 +156,19 @@ struct sta_info * sta_info_add(struct ieee80211_local *local,memcpy (sta->addr, addr,ETH_ALEN ); sta->local = local; sta->dev = dev; +spin_lock_init (&sta->ampdu_mlme.ampdu_rx); +for (i =0 ; i <STA_TID_NUM ; i++) { +/* timer_to_tid must be initialized with identity mapping to +* enable session_timer's data differentiation. refer to +* sta_rx_agg_session_timer_expired for useage */ + sta->timer_to_tid[i] = i; +/* rx timers */ + sta->ampdu_mlme.tid_rx[i].session_timer.function = + sta_rx_agg_session_timer_expired; + sta->ampdu_mlme.tid_rx[i].session_timer.data = + (unsigned long )&sta->timer_to_tid[i]; +init_timer (&sta->ampdu_mlme.tid_rx[i].session_timer); + }skb_queue_head_init (&sta->ps_tx_buf);skb_queue_head_init (&sta->tx_filtered);__sta_info_get (sta);/* sta used by caller, decremented by
net/mac80211/sta_info.h +47 -0
59 lines not on this page · raw message
net/mac80211/tx.c +1 -2
@@ -932,7 +932,6 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx,struct ieee80211_local *local =wdev_priv (dev->ieee80211_ptr);struct ieee80211_hdr *hdr;struct ieee80211_sub_if_data *sdata; -ieee80211_txrx_result res =TXRX_CONTINUE ;int hdrlen;
@@ -997,7 +996,7 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx, } control->flags |=IEEE80211_TXCTL_FIRST_FRAGMENT ; -return res; +return TXRX_CONTINUE ; }/* Device in tx->dev has a reference added; use dev_put(tx->dev) when
net/mac80211/util.c +14 -1
@@ -127,7 +127,8 @@ void ieee80211_prepare_rates(struct ieee80211_local *local, } } -u8 *ieee80211_get_bssid (struct ieee80211_hdr *hdr,size_t len) +u8 *ieee80211_get_bssid (struct ieee80211_hdr *hdr,size_t len, +enum ieee80211_if_types type) {u16 fc;
@@ -159,6 +160,18 @@ u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len)case IEEE80211_FTYPE_CTL :if ((fc &IEEE80211_FCTL_STYPE ) ==IEEE80211_STYPE_PSPOLL )return hdr->addr1; +else if ((fc &IEEE80211_FCTL_STYPE ) == +IEEE80211_STYPE_BACK_REQ ) { +switch (type) { +case IEEE80211_IF_TYPE_STA : +return hdr->addr2; +case IEEE80211_IF_TYPE_AP : +case IEEE80211_IF_TYPE_VLAN : +return hdr->addr1; +default : +return NULL ; + } + }else return NULL ; }
Signature · 2 lines
John W. Linville [email protected]
From: "John W. Linville" <[email protected]>
Date: Tue, 8 Jan 2008 14:29:14 -0500
Quoted 3 lines
Here are a few more for 2.6.25. The are mostly clean-ups for the new PID rate control algorithm, and some A-MPDU bits related to supporting 802.11n.
Pulled and pushed back out to net-2.6.25, thanks John.