pull request: wireless-2.6 'upstream' 2008-01-22
Subsystems (5)
Dave,
This is another collection of updates intended for 2.6.25. There are some ath5k cleanups, some b43 stuff, some mac80211 bits, and a few other miscellaneous patches.
Let me know if there are problems!
Thanks!
John
---
Individual patch available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream
---
The following changes since commit bae4a7effd59ef0d521de2bc97902fa0a243b544:
David S. Miller (1):
Merge branch 'upstream-davem' of master.kernel.org:/.../jgarzik/netdev-2.6
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream
Bruno Randolf (6):
ath5k: use 3 instead of 0x00000003
ath5k: beacon interval is in TU
ath5k: better beacon timer calculation
ath5k: use SWBA to detect IBSS HW merges
ath5k: configure backoff for IBSS beacon queue
ath5k: always extend rx timestamp with tsf
Guy Cohen (1):
mac80211: Assign correct TID for local bridged packets
Johannes Berg (1):
mac80211: fix RCU locking in __ieee80211_rx_handle_packet
John W. Linville (2):
ath5k: use AR5K_KEYTABLE_SIZE when initializing key table
ath5k: reset key cache after resume
Masakazu Mokuno (1):
WEXT: remove unused variable
Michael Buesch (4):
b43legacy: Remove the PHY spinlock
b43: Add more N-PHY init code
b43: Fix firmware caching
b43: Fix MAC control and microcode init
Ron Rindjunsky (2):
mac80211: fixing ieee80211_bar types
mac80211: fix rx flow sparse errors, make functions static
Stefano Brivio (1):
rc80211-pid: fix last_sample initialization
drivers/net/wireless/ath5k/ath5k.h | 4 +- drivers/net/wireless/ath5k/base.c | 240 +++++++++++++++++++---- drivers/net/wireless/ath5k/base.h | 3 +- drivers/net/wireless/ath5k/hw.c | 6 +- drivers/net/wireless/b43/b43.h | 15 +- drivers/net/wireless/b43/main.c | 290 ++++++++++++++++----------- drivers/net/wireless/b43/nphy.c | 292 +++++++++++++++++++++++++++- drivers/net/wireless/b43/nphy.h | 52 +++--- drivers/net/wireless/b43legacy/b43legacy.h | 16 +- drivers/net/wireless/b43legacy/main.c | 4 - drivers/net/wireless/b43legacy/phy.c | 35 ++-- drivers/net/wireless/b43legacy/phy.h | 14 +-- drivers/net/wireless/b43legacy/radio.c | 7 +- include/linux/ieee80211.h | 4 +- net/mac80211/ieee80211_sta.c | 4 +- net/mac80211/rc80211_pid_algo.c | 2 + net/mac80211/rx.c | 13 +- net/mac80211/wme.c | 9 +- net/wireless/wext.c | 14 -- 19 files changed, 752 insertions(+), 272 deletions(-)
drivers/net/wireless/ath5k/ath5k.h +2 -2
@@ -486,8 +486,8 @@ struct ath5k_beacon_state {* TSF to TU conversion: * * TSF is a 64bit value in usec (microseconds). -* TU is a 32bit value in roughly msec (milliseconds): usec / 1024 -* (1000ms equals 976 TU) +* TU is a 32bit value and defined by IEEE802.11 (page 6) as "A measurement of +* time equal to 1024 usec", so it's roughly milliseconds (usec / 1024). */ #define TSF_TO_TU (_tsf) (u32)((_tsf) >> 10)
drivers/net/wireless/ath5k/base.c +198 -42
361 lines not on this page · raw message
drivers/net/wireless/ath5k/base.h +2 -1
@@ -164,8 +164,9 @@ struct ath5k_softc {struct ath5k_buf *bbuf;/* beacon buffer */ unsigned int bhalq,/* SW q for outgoing beacons */ bmisscount,/* missed beacon transmits */ - bintval,/* beacon interval */ + bintval,/* beacon interval in TU */ bsent; +unsigned int nexttbtt;/* next beacon time in TU */ struct timer_list calib_tim;/* calibration timer */ };
drivers/net/wireless/ath5k/hw.c +2 -4
@@ -2605,10 +2605,8 @@ void ath5k_hw_init_beacon(struct ath5k_hw *ah, u32 next_beacon, u32 interval)break ;default : - timer1 = (next_beacon -AR5K_TUNE_DMA_BEACON_RESP ) << -0x00000003 ; - timer2 = (next_beacon -AR5K_TUNE_SW_BEACON_RESP ) << -0x00000003 ; + timer1 = (next_beacon -AR5K_TUNE_DMA_BEACON_RESP ) <<3 ; + timer2 = (next_beacon -AR5K_TUNE_SW_BEACON_RESP ) <<3 ; } timer3 = next_beacon + (ah->ah_atim_window ? ah->ah_atim_window :1 );
drivers/net/wireless/b43/b43.h +11 -4
@@ -665,16 +665,23 @@ struct b43_wl {bool beacon1_uploaded; }; +/* In-memory representation of a cached microcode file. */ +struct b43_firmware_file { +const char *filename; +const struct firmware *data; +}; +/* Pointers to the firmware data and meta information about it. */ struct b43_firmware {/* Microcode */ -const struct firmware *ucode; +struct b43_firmware_file ucode;/* PCM code */ -const struct firmware *pcm; +struct b43_firmware_file pcm;/* Initial MMIO values for the firmware */ -const struct firmware *initvals; +struct b43_firmware_file initvals;/* Initial MMIO values for the firmware, band-specific */ -const struct firmware *initvals_band; +struct b43_firmware_file initvals_band; +/* Firmware revision */ u16 rev;/* Firmware patchlevel */
drivers/net/wireless/b43/main.c +171 -119
429 lines not on this page · raw message
drivers/net/wireless/b43/nphy.c +291 -1
306 lines not on this page · raw message
drivers/net/wireless/b43/nphy.h +29 -23
96 lines not on this page · raw message
drivers/net/wireless/b43legacy/b43legacy.h +7 -9
@@ -415,7 +415,6 @@ struct b43legacy_phy { u8 calibrated:1;u8 radio_rev;/* Radio revision */ -bool locked;/* Only used in b43legacy_phy_{un}lock() */ bool dyn_tssi_tbl;/* tssi2dbm is kmalloc()ed. */ /* ACI (adjacent channel interference) flags. */
@@ -458,11 +457,6 @@ struct b43legacy_phy {s16 lna_gain;/* LNA */ s16 pga_gain;/* PGA */ -/* PHY lock for core.rev < 3 -* This lock is only used by b43legacy_phy_{un}lock() -*/ -spinlock_t lock; -/* Desired TX power level (in dBm). This is set by the user and * adjusted in b43legacy_phy_xmitpower(). */ u8 power_level;
@@ -486,9 +480,6 @@ struct b43legacy_phy {u16 txpwr_offset; }; -#ifdef CONFIG_B43LEGACY_DEBUG -bool manual_txpower_control;/* Manual TX-power control enabled? */ -#endif /* Current Interference Mitigation mode */ int interfmode;/* Stack of saved values from the Interference Mitigation code.
@@ -516,6 +507,13 @@ struct b43legacy_phy {/* PHY TX errors counter. */ atomic_t txerr_cnt; + +#if B43legacy_DEBUG +/* Manual TX-power control enabled? */ +bool manual_txpower_control; +/* PHY registers locked by b43legacy_phy_lock()? */ +bool phy_locked; +#endif /* B43legacy_DEBUG */ };/* Data structures for DMA transmission, per 80211 core. */
drivers/net/wireless/b43legacy/main.c +0 -4
@@ -2847,8 +2847,6 @@ static void setup_struct_phy_for_init(struct b43legacy_wldev *dev,memset (phy->minlowsig,0xFF ,sizeof (phy->minlowsig));memset (phy->minlowsigpos,0 ,sizeof (phy->minlowsigpos)); -/* Flags */ - phy->locked =0 ;/* Assume the radio is enabled. If it's not enabled, the state will * immediately get fixed on the first periodic work run. */ dev->radio_hw_enable =1 ;
@@ -2881,7 +2879,6 @@ static void setup_struct_phy_for_init(struct b43legacy_wldev *dev, phy->lofcal =0xFFFF ; phy->initval =0xFFFF ; -spin_lock_init (&phy->lock); phy->interfmode = B43legacy_INTERFMODE_NONE; phy->channel =0xFF ; }
@@ -3013,7 +3010,6 @@ static void prepare_phy_data_for_init(struct b43legacy_wldev *dev)/* Flags */ phy->calibrated =0 ; - phy->locked =0 ;if (phy->_lo_pairs) memset(phy->_lo_pairs, 0,
drivers/net/wireless/b43legacy/phy.c +15 -20
@@ -91,40 +91,36 @@ void b43legacy_voluntary_preempt(void)#endif /* CONFIG_PREEMPT */ } -void b43legacy_raw_phy_lock (struct b43legacy_wldev *dev) +/* Lock the PHY registers against concurrent access from the microcode. +* This lock is nonrecursive. */ +void b43legacy_phy_lock (struct b43legacy_wldev *dev) { -struct b43legacy_phy *phy = &dev->phy; +#if B43legacy_DEBUG +B43legacy_WARN_ON (dev->phy.phy_locked); + dev->phy.phy_locked =1 ; +#endif -B43legacy_WARN_ON (!irqs_disabled ()); -if (b43legacy_read32 (dev, B43legacy_MMIO_STATUS_BITFIELD) ==0 ) { - phy->locked =0 ; -return ; - }if (dev->dev->id.revision <3 ) {b43legacy_mac_suspend (dev); -spin_lock (&phy->lock); }else {if (!b43legacy_is_mode (dev->wl,IEEE80211_IF_TYPE_AP ))b43legacy_power_saving_ctl_bits (dev,-1 ,1 ); } - phy->locked =1 ; } -void b43legacy_raw_phy_unlock (struct b43legacy_wldev *dev) +void b43legacy_phy_unlock (struct b43legacy_wldev *dev) { -struct b43legacy_phy *phy = &dev->phy; +#if B43legacy_DEBUG +B43legacy_WARN_ON (!dev->phy.phy_locked); + dev->phy.phy_locked =0 ; +#endif -B43legacy_WARN_ON (!irqs_disabled ());if (dev->dev->id.revision <3 ) { -if (phy->locked) { -spin_unlock (&phy->lock); -b43legacy_mac_enable (dev); - } +b43legacy_mac_enable (dev); }else {if (!b43legacy_is_mode (dev->wl,IEEE80211_IF_TYPE_AP ))b43legacy_power_saving_ctl_bits (dev,-1 ,-1 ); } - phy->locked =0 ; }u16 b43legacy_phy_read (struct b43legacy_wldev *dev,u16 offset)
@@ -1789,7 +1785,6 @@ void b43legacy_phy_xmitpower(struct b43legacy_wldev *dev)s16 baseband_att_delta;s16 radio_attenuation;s16 baseband_attenuation; -unsigned long phylock_flags;if (phy->savedpctlreg ==0xFFFF )return ;
@@ -1944,13 +1939,13 @@ void b43legacy_phy_xmitpower(struct b43legacy_wldev *dev) phy->bbatt = baseband_attenuation;/* Adjust the hardware */ -b43legacy_phy_lock (dev, phylock_flags); +b43legacy_phy_lock (dev);b43legacy_radio_lock (dev);b43legacy_radio_set_txpower_bg (dev, baseband_attenuation, radio_attenuation, txpower);b43legacy_phy_lo_mark_current_used (dev);b43legacy_radio_unlock (dev); -b43legacy_phy_unlock (dev, phylock_flags); +b43legacy_phy_unlock (dev); } static inline
drivers/net/wireless/b43legacy/phy.h +2 -12
@@ -171,18 +171,8 @@ void b43legacy_put_attenuation_into_ranges(int *_bbatt, int *_rfatt);struct b43legacy_wldev ; -void b43legacy_raw_phy_lock (struct b43legacy_wldev *dev); -#define b43legacy_phy_lock (bcm, flags) \ - do { \ - local_irq_save(flags); \ - b43legacy_raw_phy_lock(bcm); \ - } while (0) -void b43legacy_raw_phy_unlock (struct b43legacy_wldev *dev); -#define b43legacy_phy_unlock (bcm, flags) \ - do { \ - b43legacy_raw_phy_unlock(bcm); \ - local_irq_restore(flags); \ - } while (0) +void b43legacy_phy_lock (struct b43legacy_wldev *dev); +void b43legacy_phy_unlock (struct b43legacy_wldev *dev);/* Card uses the loopback gain stuff */ #define has_loopback_gain (phy) \
drivers/net/wireless/b43legacy/radio.c +4 -3
@@ -92,6 +92,7 @@ void b43legacy_radio_lock(struct b43legacy_wldev *dev)u32 status; status =b43legacy_read32 (dev, B43legacy_MMIO_STATUS_BITFIELD); +B43legacy_WARN_ON (status & B43legacy_SBF_RADIOREG_LOCK); status |= B43legacy_SBF_RADIOREG_LOCK;b43legacy_write32 (dev, B43legacy_MMIO_STATUS_BITFIELD, status);mmiowb ();
@@ -104,6 +105,7 @@ void b43legacy_radio_unlock(struct b43legacy_wldev *dev)b43legacy_read16 (dev, B43legacy_MMIO_PHY_VER);/* dummy read */ status =b43legacy_read32 (dev, B43legacy_MMIO_STATUS_BITFIELD); +B43legacy_WARN_ON (!(status & B43legacy_SBF_RADIOREG_LOCK)); status &= ~B43legacy_SBF_RADIOREG_LOCK;b43legacy_write32 (dev, B43legacy_MMIO_STATUS_BITFIELD, status);mmiowb ();
@@ -284,12 +286,11 @@ u8 b43legacy_radio_aci_scan(struct b43legacy_wldev *dev)unsigned int j;unsigned int start;unsigned int end; -unsigned long phylock_flags;if (!((phy->type == B43legacy_PHYTYPE_G) && (phy->rev >0 )))return 0 ; -b43legacy_phy_lock (dev, phylock_flags); +b43legacy_phy_lock (dev);b43legacy_radio_lock (dev);b43legacy_phy_write (dev,0x0802 ,b43legacy_phy_read (dev,0x0802 ) &0xFFFC );
@@ -323,7 +324,7 @@ u8 b43legacy_radio_aci_scan(struct b43legacy_wldev *dev) ret[j] =1 ; }b43legacy_radio_unlock (dev); -b43legacy_phy_unlock (dev, phylock_flags); +b43legacy_phy_unlock (dev);return ret[channel -1 ]; }
include/linux/ieee80211.h +2 -2
@@ -237,8 +237,8 @@ struct ieee80211_bar {__le16 duration;__u8 ra[6 ];__u8 ta[6 ]; -__u16 control; -__u16 start_seq_num; +__le16 control; +__le16 start_seq_num; } __attribute__((packed));/**
net/mac80211/ieee80211_sta.c +2 -2
@@ -1154,8 +1154,8 @@ end_no_lock:sta_info_put (sta); } -void ieee80211_send_delba (struct net_device *dev,const u8 *da,u16 tid, -u16 initiator,u16 reason_code) +static void ieee80211_send_delba (struct net_device *dev,const u8 *da,u16 tid, +u16 initiator,u16 reason_code) {struct ieee80211_local *local =wdev_priv (dev->ieee80211_ptr);struct ieee80211_sub_if_data *sdata =IEEE80211_DEV_TO_SUB_IF (dev);
net/mac80211/rc80211_pid_algo.c +2 -0
@@ -496,6 +496,8 @@ static void *rate_control_pid_alloc_sta(void *priv, gfp_t gfp)if (spinfo ==NULL )return NULL ; + spinfo->last_sample = jiffies; +#ifdef CONFIG_MAC80211_DEBUGFS spin_lock_init (&spinfo->events.lock);init_waitqueue_head (&spinfo->events.waitqueue);
net/mac80211/rx.c +7 -6
@@ -295,7 +295,7 @@ ieee80211_rx_h_parse_qos(struct ieee80211_txrx_data *rx) } -u32 ieee80211_rx_load_stats (struct ieee80211_local *local, +static u32 ieee80211_rx_load_stats (struct ieee80211_local *local,struct sk_buff *skb,struct ieee80211_rx_status *status) {
@@ -1664,8 +1664,10 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata,* This is the actual Rx frames handler. as it blongs to Rx path it must * be called with rcu_read_lock protection. */ -void __ieee80211_rx_handle_packet (struct ieee80211_hw *hw,struct sk_buff *skb, -struct ieee80211_rx_status *status,u32 load) +static void __ieee80211_rx_handle_packet (struct ieee80211_hw *hw, +struct sk_buff *skb, +struct ieee80211_rx_status *status, +u32 load) {struct ieee80211_local *local =hw_to_local (hw);struct ieee80211_sub_if_data *sdata;
@@ -1730,7 +1732,6 @@ void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, struct sk_buff *skb,ieee80211_invoke_rx_handlers (local, local->rx_handlers, &rx, rx.sta);sta_info_put (sta); -rcu_read_unlock ();return ; }
@@ -1920,8 +1921,8 @@ u8 ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw,return 1 ; } -u8 ieee80211_rx_reorder_ampdu (struct ieee80211_local *local, -struct sk_buff *skb) +static u8 ieee80211_rx_reorder_ampdu (struct ieee80211_local *local, +struct sk_buff *skb) {struct ieee80211_hw *hw = &local->hw;struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
net/mac80211/wme.c +5 -4
@@ -28,6 +28,7 @@ struct ieee80211_sched_datastruct sk_buff_head requeued[TC_80211_MAX_QUEUES ]; }; +static const char llc_ip_hdr[8 ] = {0xAA ,0xAA ,0x3 ,0 ,0 ,0 ,0x08 ,0 };/* given a data frame determine the 802.1p/1d tag to use */ static inline unsigned classify_1d (struct sk_buff *skb,struct Qdisc *qd)
@@ -54,12 +55,12 @@ static inline unsigned classify_1d(struct sk_buff *skb, struct Qdisc *qd)return skb->priority -256 ;/* check there is a valid IP header present */ - offset =ieee80211_get_hdrlen_from_skb (skb) +8 /* LLC + proto */ ; -if (skb->protocol !=htons (ETH_P_IP ) || - skb->len < offset +sizeof (*ip)) + offset =ieee80211_get_hdrlen_from_skb (skb); +if (skb->len < offset +sizeof (llc_ip_hdr) +sizeof (*ip) || +memcmp (skb->data + offset, llc_ip_hdr,sizeof (llc_ip_hdr)))return 0 ; - ip = (struct iphdr *) (skb->data + offset); + ip = (struct iphdr *) (skb->data + offset +sizeof (llc_ip_hdr)); dscp = ip->tos &0xfc ;if (dscp &0x1c )
net/wireless/wext.c +0 -14
@@ -417,20 +417,6 @@ static const int event_type_size[] = { IW_EV_QUAL_LEN, /* IW_HEADER_TYPE_QUAL */ }; -/* Size (in bytes) of various events, as packed */ -static const int event_type_pk_size[] = { -IW_EV_LCP_PK_LEN ,/* IW_HEADER_TYPE_NULL */ -0 , -IW_EV_CHAR_PK_LEN ,/* IW_HEADER_TYPE_CHAR */ -0 , -IW_EV_UINT_PK_LEN ,/* IW_HEADER_TYPE_UINT */ -IW_EV_FREQ_PK_LEN ,/* IW_HEADER_TYPE_FREQ */ -IW_EV_ADDR_PK_LEN ,/* IW_HEADER_TYPE_ADDR */ -0 , -IW_EV_POINT_PK_LEN ,/* Without variable payload */ -IW_EV_PARAM_PK_LEN ,/* IW_HEADER_TYPE_PARAM */ -IW_EV_QUAL_PK_LEN ,/* IW_HEADER_TYPE_QUAL */ -};/************************ COMMON SUBROUTINES ************************/ /*
Signature · 2 lines
John W. Linville [email protected]
David Miller
maintainerFrom: "John W. Linville" <[email protected]>
Date: Tue, 22 Jan 2008 20:45:21 -0500
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.gitupstream
Pulled and pushed out to net-2.6.25, thanks!
Quoted 1 line · On Tue, 22 Jan 2008 20:45:21 -0500 "John W. Linville"…
b43legacy: Remove the PHY spinlock
I hope you tested this. I still haven't been able to (I received the needed hardware yesterday), and Michael said that the patch has been compile-tested only.
Signature · 2 lines
Ciao Stefano
Quoted 8 lines · On Wednesday 23 January 2008 12:15:51 Stefano Brivio wrote:
Quoted 1 line · On Tue, 22 Jan 2008 20:45:21 -0500 "John W. Linville" <[email protected]>…
b43legacy: Remove the PHY spinlock
I hope you tested this. I still haven't been able to (I received the needed hardware yesterday), and Michael said that the patch has been compile-tested only.
John, if we use subject lines such as:
[PATCH RFT] foobar: bizbaz
That means the patch is _not_ submitted for inclusion, yet. The RFT means Request-For-Testing. Ususally, if I send out such patches, they are completely untested. I usually compiletest them, but that's it.
But in future I can also put a comment into the mailbody that explains why to not apply it, yet.
For this particular patch, please leave it in now. I'm pretty sure it is correct. So actual testing will be done upstream now. ;)
Signature · 1 line
Greetings Michael.
Quoted 10 lines · Michael Buesch
Quoted 8 lines · On Wednesday 23 January 2008 12:15:51 Stefano Brivio wrote:
Quoted 1 line · On Tue, 22 Jan 2008 20:45:21 -0500 "John W. Linville"…
b43legacy: Remove the PHY spinlock
I hope you tested this. I still haven't been able to (I received the needed hardware yesterday), and Michael said that the patch has been compile-tested only.
Quoted 6 lines
John, if we use subject lines such as:
[PATCH RFT] foobar: bizbaz
That means the patch is _not_ submitted for inclusion, yet. The RFT means Request-For-Testing. Ususally, if I send out such
Thanks, I'm well aware.
Larry said he tested it, two weeks ago. No one contradicted it. And time is short for new development for 2.6.25 -- but there is plenty of time for fixes. :-)
Quoted 2 lines
For this particular patch, please leave it in now. I'm pretty sure it is correct. So actual testing will be done upstream now. ;)
Exactly.
John
Signature · 2 lines
John W. Linville [email protected]
Quoted 8 lines · Stefano Brivio
Quoted 1 line · On Tue, 22 Jan 2008 20:45:21 -0500 "John W. Linville" <[email protected]>…
b43legacy: Remove the PHY spinlock
I hope you tested this. I still haven't been able to (I received the needed hardware yesterday), and Michael said that the patch has been compile-tested only.
Larry said it worked for him.
Signature · 2 lines
John W. Linville [email protected]