pull request: wireless-2.6 2009-04-17
Subsystems (7)
Dave,
Here is a big batch of fixes for the 2.6.30 kernels. Some are more important than others and a few are a little bit large, but I think they are all wortwhile for this point of the cycle. There are some USB ID additions, a small user-visible typo fix, a P54_LEDS patch that should have been included in an earlier patch that is already in 2.6.30, and a number of fixes that are more self-evident.
Please let me know if there are problems!
Thanks,
John
P.S. Most of these have had at least one cycle in -next as well...
---
The following changes since commit 3664090e199f10cb0282097faae8f8ca58c1e4ae:
Atsushi Nemoto (1):
phylib: Fix delay argument of schedule_delayed_work
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master
Christian Lamparter (5):
p54: replace MAC80211_LEDS with P54_LEDS in p54.h
p54spi: fix locking warning in p54spi_op_tx
ar9170: add Cace Airpcap NX usb_id
p54usb: add Telsey 802.11g USB2.0 Adapter
ar9170usb: add ZyXEL NWD271NDan Williams (1):
airo: queue SIOCSIWAUTH-requested auth mode change for next commit
Gerrit Renker (1):
mac80211: Fragmentation threshold (typo)
Herton Ronaldo Krzesinski (1):
rt2x00: prevent double kfree when failing to register hardware
Ivo van Doorn (1):
rt2x00: Add rt73usb USB IDs
Jamie Lentin (1):
at76c50x-usb: Add device ID for OQO model 01+
Johannes Berg (7):
mac80211: correct wext transmit power handler fix iwl3945 registration regression
ar9170: fix struct layout on arm
mac80211: avoid crashing when no scan sdata
cfg80211: copy hold when replacing BSS
cfg80211: do not replace BSS structs
mac80211: validate TIM IE length
Luis R. Rodriguez (1):
cfg80211: fix NULL pointer deference in reg_device_remove()
Masakazu Mokuno (1):
net/ps3: Fix wireless AP connect error handling
Michael Buesch (4):
b43: Poison RX buffers
b43: Refresh RX poison on buffer recycling
b43: Do radio lock assertion in software
mac80211: quiet beacon loss messages
Pavel Roskin (2):
ath9k: fix access to a freed skb in ath_rx_tasklet()
orinoco: correct timeout logic in __orinoco_hw_set_tkip_key()
Philip Rakity (1):
libertas: don't leak skb on receive error
Vasanthakumar Thiagarajan (1):
mac80211: Fix bug in getting rx status for frames pending in reorder buffer
drivers/net/ps3_gelic_wireless.c | 3 ++ drivers/net/wireless/airo.c | 2 +- drivers/net/wireless/ar9170/hw.h | 8 ++-- drivers/net/wireless/ar9170/usb.c | 4 ++ drivers/net/wireless/at76c50x-usb.c | 2 + drivers/net/wireless/ath9k/recv.c | 4 ++- drivers/net/wireless/b43/dma.c | 50 +++++++++++++++++++++----- drivers/net/wireless/b43/main.c | 5 +++ drivers/net/wireless/b43/phy_common.c | 16 ++++++-- drivers/net/wireless/b43/phy_common.h | 4 ++- drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 + drivers/net/wireless/libertas/rx.c | 2 + drivers/net/wireless/orinoco/hw.c | 8 ++--- drivers/net/wireless/p54/p54.h | 12 +++--- drivers/net/wireless/p54/p54spi.c | 25 +++++++------ drivers/net/wireless/p54/p54usb.c | 1 + drivers/net/wireless/rt2x00/rt2x00dev.c | 4 +-- drivers/net/wireless/rt2x00/rt73usb.c | 2 + net/mac80211/main.c | 2 +- net/mac80211/mlme.c | 26 ++++++++++---- net/mac80211/rx.c | 13 +++++-- net/mac80211/wext.c | 43 ++++++++++++++++++----- net/wireless/core.h | 2 +- net/wireless/reg.c | 5 ++- net/wireless/scan.c | 40 +++++++++++++++++---- 25 files changed, 207 insertions(+), 78 deletions(-)
drivers/net/ps3_gelic_wireless.c +3 -0
@@ -2101,6 +2101,9 @@ static int gelic_wl_associate_bss(struct gelic_wl_info *wl,if (ret) {pr_debug ("%s: WEP/WPA setup failed %d\n" , __func__, ret); + ret = -EPERM ; +gelic_wl_send_iwap_event (wl,NULL ); + goto out; }/* start association */
drivers/net/wireless/airo.c +1 -1
@@ -6713,11 +6713,11 @@ static int airo_set_auth(struct net_device *dev, local->config.authType =AUTH_ENCRYPT ; }else return -EINVAL ; -break ;/* Commit the changes to flags if needed */ if (local->config.authType != currentAuthType)set_bit (FLAG_COMMIT , &local->flags); +break ; }case IW_AUTH_WPA_ENABLED :
drivers/net/wireless/ar9170/hw.h +4 -4
@@ -310,7 +310,7 @@ struct ar9170_tx_control {struct ar9170_rx_head {u8 plcp[12 ]; -}; +} __packed; struct ar9170_rx_tail { union {
@@ -318,16 +318,16 @@ struct ar9170_rx_tail {u8 rssi_ant0, rssi_ant1, rssi_ant2, rssi_ant0x, rssi_ant1x, rssi_ant2x, rssi_combined; - }; + } __packed;u8 rssi[7 ]; - }; + } __packed;u8 evm_stream0[6 ], evm_stream1[6 ];u8 phy_err;u8 SAidx, DAidx;u8 error;u8 status; -}; +} __packed;#define AR9170_ENC_ALG_NONE 0x0#define AR9170_ENC_ALG_WEP64 0x1
drivers/net/wireless/ar9170/usb.c +4 -0
@@ -59,6 +59,8 @@ static struct usb_device_id ar9170_usb_ids[] = { { USB_DEVICE(0x0cf3, 0x9170) },/* Atheros TG121N */ { USB_DEVICE(0x0cf3, 0x1001) }, +/* Cace Airpcap NX */ + { USB_DEVICE(0xcace, 0x0300) },/* D-Link DWA 160A */ { USB_DEVICE(0x07d1, 0x3c10) },/* Netgear WNDA3100 */
@@ -67,6 +69,8 @@ static struct usb_device_id ar9170_usb_ids[] = { { USB_DEVICE(0x0846, 0x9001) },/* Zydas ZD1221 */ { USB_DEVICE(0x0ace, 0x1221) }, +/* ZyXEL NWD271N */ + { USB_DEVICE(0x0586, 0x3417) },/* Z-Com UB81 BG */ { USB_DEVICE(0x0cde, 0x0023) },/* Z-Com UB82 ABG */
drivers/net/wireless/at76c50x-usb.c +2 -0
@@ -250,6 +250,8 @@ static struct usb_device_id dev_table[] = { { USB_DEVICE(0x03eb, 0x7617), USB_DEVICE_DATA(BOARD_505A) },/* Siemens Gigaset USB WLAN Adapter 11 */ { USB_DEVICE(0x1690, 0x0701), USB_DEVICE_DATA(BOARD_505A) }, +/* OQO Model 01+ Internal Wi-Fi */ + { USB_DEVICE(0x1557, 0x0002), USB_DEVICE_DATA(BOARD_505A) },/* * at76c505amx-rfmd */
drivers/net/wireless/ath9k/recv.c +3 -1
@@ -493,6 +493,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)int hdrlen, padsize, retval;bool decrypt_error = false;u8 keyix; +__le16 fc;spin_lock_bh (&sc->rx.rxbuflock);
@@ -606,6 +607,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)/* see if any padding is done by the hw and remove it */ hdr = (struct ieee80211_hdr *)skb->data; hdrlen =ieee80211_get_hdrlen_from_skb (skb); + fc = hdr->frame_control;/* The MAC header is padded to have 32-bit boundary if the * packet payload is non-zero. The general calculation for
@@ -690,7 +692,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) sc->rx.rxotherant =0 ; } -if (ieee80211_is_beacon (hdr->frame_control) && +if (ieee80211_is_beacon (fc) && (sc->sc_flags &SC_OP_WAIT_FOR_BEACON )) { sc->sc_flags &= ~SC_OP_WAIT_FOR_BEACON ;ath9k_hw_setpower (sc->sc_ah,ATH9K_PM_NETWORK_SLEEP );
drivers/net/wireless/b43/dma.c +40 -10
104 lines not on this page · raw message
drivers/net/wireless/b43/main.c +5 -0
@@ -3974,6 +3974,11 @@ static void setup_struct_phy_for_init(struct b43_wldev *dev, phy->next_txpwr_check_time = jiffies;/* PHY TX errors counter. */ atomic_set (&phy->txerr_cnt,B43_PHY_TX_BADNESS_LIMIT ); + +#if B43_DEBUG + phy->phy_locked =0 ; + phy->radio_locked =0 ; +#endif }static void setup_struct_wldev_for_init (struct b43_wldev *dev)
drivers/net/wireless/b43/phy_common.c +12 -4
@@ -131,12 +131,16 @@ void b43_radio_lock(struct b43_wldev *dev) {u32 macctl; +#if B43_DEBUG +B43_WARN_ON (dev->phy.radio_locked); + dev->phy.radio_locked =1 ; +#endif + macctl =b43_read32 (dev,B43_MMIO_MACCTL ); -B43_WARN_ON (macctl &B43_MACCTL_RADIOLOCK ); macctl |=B43_MACCTL_RADIOLOCK ;b43_write32 (dev,B43_MMIO_MACCTL , macctl); -/* Commit the write and wait for the device -* to exit any radio register access. */ +/* Commit the write and wait for the firmware +* to finish any radio register access. */ b43_read32 (dev,B43_MMIO_MACCTL );udelay (10 ); }
@@ -145,11 +149,15 @@ void b43_radio_unlock(struct b43_wldev *dev) {u32 macctl; +#if B43_DEBUG +B43_WARN_ON (!dev->phy.radio_locked); + dev->phy.radio_locked =0 ; +#endif +/* Commit any write */ b43_read16 (dev,B43_MMIO_PHY_VER );/* unlock */ macctl =b43_read32 (dev,B43_MMIO_MACCTL ); -B43_WARN_ON (!(macctl &B43_MACCTL_RADIOLOCK )); macctl &= ~B43_MACCTL_RADIOLOCK ;b43_write32 (dev,B43_MMIO_MACCTL , macctl); }
drivers/net/wireless/b43/phy_common.h +3 -1
@@ -245,8 +245,10 @@ struct b43_phy {atomic_t txerr_cnt;#ifdef CONFIG_B43_DEBUG -/* PHY registers locked by b43_phy_lock()? */ +/* PHY registers locked (w.r.t. firmware) */ bool phy_locked; +/* Radio registers locked (w.r.t. firmware) */ +bool radio_locked;#endif /* B43_DEBUG */ };
drivers/net/wireless/iwlwifi/iwl3945-base.c +2 -0
@@ -4913,6 +4913,8 @@ static int iwl3945_setup_mac(struct iwl_priv *priv) hw->wiphy->custom_regulatory = true; + hw->wiphy->max_scan_ssids =1 ;/* WILL FIX */ +/* Default value; 4 EDCA QOS priorities */ hw->queues =4 ;
drivers/net/wireless/libertas/rx.c +2 -0
@@ -170,6 +170,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)lbs_deb_rx ("rx err: frame received with bad length\n" ); dev->stats.rx_length_errors++; ret =0 ; +dev_kfree_skb (skb); goto done; }
@@ -181,6 +182,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)lbs_pr_alert ("rxpd not ok\n" ); dev->stats.rx_errors++; ret =0 ; +dev_kfree_skb (skb); goto done; }
drivers/net/wireless/orinoco/hw.c +3 -5
@@ -372,15 +372,13 @@ int __orinoco_hw_set_tkip_key(hermes_t *hw, int key_idx, int set_tx, }/* Wait upto 100ms for tx queue to empty */ - k =100 ; -do { - k--; +for (k =100 ; k >0 ; k--) {udelay (1000 ); ret =hermes_read_wordrec (hw,USER_BAP ,HERMES_RID_TXQUEUEEMPTY , &xmitting); -if (ret) +if (ret || !xmitting)break ; - }while ((k >0 ) && xmitting); + }if (k ==0 ) ret = -ETIMEDOUT ;
drivers/net/wireless/p54/p54.h +6 -6
@@ -14,9 +14,9 @@* published by the Free Software Foundation. */ -#ifdef CONFIG_MAC80211_LEDS +#ifdef CONFIG_P54_LEDS #include <linux/leds.h> -#endif /* CONFIG_MAC80211_LEDS */ +#endif /* CONFIG_P54_LEDS */ enum p54_control_frame_types {P54_CONTROL_TYPE_SETUP =0 ,
@@ -116,7 +116,7 @@ enum fw_state { FW_STATE_RESETTING, }; -#ifdef CONFIG_MAC80211_LEDS +#ifdef CONFIG_P54_LEDS #define P54_LED_MAX_NAME_LEN 31
@@ -129,7 +129,7 @@ struct p54_led_dev {unsigned int registered; }; -#endif /* CONFIG_MAC80211_LEDS */ +#endif /* CONFIG_P54_LEDS */ struct p54_common {struct ieee80211_hw *hw;
@@ -177,10 +177,10 @@ struct p54_common {u8 privacy_caps;u8 rx_keycache_size;/* LED management */ -#ifdef CONFIG_MAC80211_LEDS +#ifdef CONFIG_P54_LEDS struct p54_led_dev assoc_led;struct p54_led_dev tx_led; -#endif /* CONFIG_MAC80211_LEDS */ +#endif /* CONFIG_P54_LEDS */ u16 softled_state;/* bit field of glowing LEDs */ };
drivers/net/wireless/p54/p54spi.c +13 -12
@@ -457,9 +457,10 @@ static int p54spi_wq_tx(struct p54s_priv *priv)struct ieee80211_tx_info *info;struct p54_tx_info *minfo;struct p54s_tx_info *dinfo; +unsigned long flags;int ret =0 ; -spin_lock_bh (&priv->tx_lock); +spin_lock_irqsave (&priv->tx_lock, flags);while (!list_empty (&priv->tx_pending)) { entry = list_entry(priv->tx_pending.next,
@@ -467,7 +468,7 @@ static int p54spi_wq_tx(struct p54s_priv *priv)list_del_init (&entry->tx_list); -spin_unlock_bh (&priv->tx_lock); +spin_unlock_irqrestore (&priv->tx_lock, flags); dinfo = container_of((void *) entry, struct p54s_tx_info, tx_list);
@@ -479,16 +480,14 @@ static int p54spi_wq_tx(struct p54s_priv *priv) ret =p54spi_tx_frame (priv, skb); -spin_lock_bh (&priv->tx_lock); -if (ret <0 ) {p54_free_skb (priv->hw, skb); - goto out; +return ret; } - } -out: -spin_unlock_bh (&priv->tx_lock); +spin_lock_irqsave (&priv->tx_lock, flags); + } +spin_unlock_irqrestore (&priv->tx_lock, flags);return ret; }
@@ -498,12 +497,13 @@ static void p54spi_op_tx(struct ieee80211_hw *dev, struct sk_buff *skb)struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb);struct p54_tx_info *mi = (struct p54_tx_info *) info->rate_driver_data;struct p54s_tx_info *di = (struct p54s_tx_info *) mi->data; +unsigned long flags;BUILD_BUG_ON (sizeof (*di) >sizeof ((mi->data))); -spin_lock_bh (&priv->tx_lock); +spin_lock_irqsave (&priv->tx_lock, flags);list_add_tail (&di->tx_list, &priv->tx_pending); -spin_unlock_bh (&priv->tx_lock); +spin_unlock_irqrestore (&priv->tx_lock, flags);queue_work (priv->hw->workqueue, &priv->work); }
@@ -604,6 +604,7 @@ out:static void p54spi_op_stop (struct ieee80211_hw *dev) {struct p54s_priv *priv = dev->priv; +unsigned long flags;if (mutex_lock_interruptible (&priv->mutex)) {/* FIXME: how to handle this error? */
@@ -615,9 +616,9 @@ static void p54spi_op_stop(struct ieee80211_hw *dev)cancel_work_sync (&priv->work);p54spi_power_off (priv); -spin_lock_bh (&priv->tx_lock); +spin_lock_irqsave (&priv->tx_lock, flags);INIT_LIST_HEAD (&priv->tx_pending); -spin_unlock_bh (&priv->tx_lock); +spin_unlock_irqrestore (&priv->tx_lock, flags); priv->fw_state =FW_STATE_OFF ;mutex_unlock (&priv->mutex);
drivers/net/wireless/p54/p54usb.c +1 -0
@@ -71,6 +71,7 @@ static struct usb_device_id p54u_table[] __devinitdata = { {USB_DEVICE(0x1260, 0xee22)}, /* SMC 2862W-G version 2 */ {USB_DEVICE(0x13b1, 0x000a)}, /* Linksys WUSB54G ver 2 */ {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */ + {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */ {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */ {USB_DEVICE(0x413c, 0x8102)}, /* Spinnaker DUT */
drivers/net/wireless/rt2x00/rt2x00dev.c +1 -3
@@ -646,10 +646,8 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)* Register HW. */ status =ieee80211_register_hw (rt2x00dev->hw); -if (status) { -rt2x00lib_remove_hw (rt2x00dev); +if (status)return status; - }set_bit (DEVICE_STATE_REGISTERED_HW , &rt2x00dev->flags);
drivers/net/wireless/rt2x00/rt73usb.c +2 -0
@@ -2369,6 +2369,8 @@ static struct usb_device_id rt73usb_device_table[] = {/* Buffalo */ { USB_DEVICE(0x0411, 0x00d8), USB_DEVICE_DATA(&rt73usb_ops) }, { USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) }, + { USB_DEVICE(0x0411, 0x0116), USB_DEVICE_DATA(&rt73usb_ops) }, + { USB_DEVICE(0x0411, 0x0119), USB_DEVICE_DATA(&rt73usb_ops) },/* CNet */ { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt73usb_ops) }, { USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) },
net/mac80211/main.c +1 -1
@@ -258,7 +258,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) (chan->max_power - local->power_constr_level) : chan->max_power; -if (local->user_power_level) +if (local->user_power_level >=0 ) power =min (power, local->user_power_level);if (local->hw.conf.power_level != power) {
net/mac80211/mlme.c +19 -7
@@ -441,6 +441,9 @@ static bool ieee80211_check_tim(struct ieee802_11_elems *elems, u16 aid)u8 index, indexn1, indexn2;struct ieee80211_tim_ie *tim = (struct ieee80211_tim_ie *) elems->tim; +if (unlikely (!tim || elems->tim_len <4 )) +return false; + aid &=0x3fff ; index = aid /8 ; mask =1 << (aid &7 );
@@ -945,9 +948,13 @@ void ieee80211_beacon_loss_work(struct work_struct *work) u.mgd.beacon_loss_work);struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; -printk (KERN_DEBUG "%s: driver reports beacon loss from AP %pM " -"- sending probe request\n" , sdata->dev->name, - sdata->u.mgd.bssid); +#ifdef CONFIG_MAC80211_VERBOSE_DEBUG +if (net_ratelimit ()) { +printk (KERN_DEBUG "%s: driver reports beacon loss from AP %pM " +"- sending probe request\n" , sdata->dev->name, + sdata->u.mgd.bssid); + } +#endif ifmgd->flags |=IEEE80211_STA_PROBEREQ_POLL ; ieee80211_send_probe_req(sdata, ifmgd->bssid, ifmgd->ssid,
@@ -1007,9 +1014,13 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata) (local->hw.conf.flags & IEEE80211_CONF_PS)) && time_after(jiffies, ifmgd->last_beacon + IEEE80211_MONITORING_INTERVAL)) { -printk (KERN_DEBUG "%s: beacon loss from AP %pM " -"- sending probe request\n" , - sdata->dev->name, ifmgd->bssid); +#ifdef CONFIG_MAC80211_VERBOSE_DEBUG +if (net_ratelimit ()) { +printk (KERN_DEBUG "%s: beacon loss from AP %pM " +"- sending probe request\n" , + sdata->dev->name, ifmgd->bssid); + } +#endif ifmgd->flags |=IEEE80211_STA_PROBEREQ_POLL ;ieee80211_send_probe_req (sdata, ifmgd->bssid, ifmgd->ssid, ifmgd->ssid_len,NULL ,0 );
@@ -2105,12 +2116,13 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)struct ieee80211_local *local = container_of(work, struct ieee80211_local, dynamic_ps_enable_work); +/* XXX: using scan_sdata is completely broken! */ struct ieee80211_sub_if_data *sdata = local->scan_sdata;if (local->hw.conf.flags &IEEE80211_CONF_PS )return ; -if (local->hw.flags &IEEE80211_HW_PS_NULLFUNC_STACK ) +if (local->hw.flags &IEEE80211_HW_PS_NULLFUNC_STACK && sdata)ieee80211_send_nullfunc (local, sdata,1 ); local->hw.conf.flags |=IEEE80211_CONF_PS ;
net/mac80211/rx.c +9 -4
@@ -29,6 +29,7 @@static u8 ieee80211_sta_manage_reorder_buf (struct ieee80211_hw *hw,struct tid_ampdu_rx *tid_agg_rx,struct sk_buff *skb, +struct ieee80211_rx_status *status,u16 mpdu_seq_num,int bar_req);/*
@@ -1688,7 +1689,7 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx)/* manage reordering buffer according to requested */ /* sequence number */ rcu_read_lock (); -ieee80211_sta_manage_reorder_buf (hw, tid_agg_rx,NULL , +ieee80211_sta_manage_reorder_buf (hw, tid_agg_rx,NULL ,NULL , start_seq_num,1 );rcu_read_unlock ();return RX_DROP_UNUSABLE ;
@@ -2293,6 +2294,7 @@ static inline u16 seq_sub(u16 sq1, u16 sq2)static u8 ieee80211_sta_manage_reorder_buf (struct ieee80211_hw *hw,struct tid_ampdu_rx *tid_agg_rx,struct sk_buff *skb, +struct ieee80211_rx_status *rxstatus,u16 mpdu_seq_num,int bar_req) {
@@ -2374,6 +2376,8 @@ static u8 ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw,/* put the frame in the reordering buffer */ tid_agg_rx->reorder_buf[index] = skb; +memcpy (tid_agg_rx->reorder_buf[index]->cb, rxstatus, +sizeof (*rxstatus)); tid_agg_rx->stored_mpdu_num++;/* release the buffer until next missing frame */ index =seq_sub (tid_agg_rx->head_seq_num, tid_agg_rx->ssn)
@@ -2399,7 +2403,8 @@ static u8 ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw, }static u8 ieee80211_rx_reorder_ampdu (struct ieee80211_local *local, -struct sk_buff *skb) +struct sk_buff *skb, +struct ieee80211_rx_status *status) {struct ieee80211_hw *hw = &local->hw;struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
@@ -2448,7 +2453,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local,/* according to mpdu sequence number deal with reordering buffer */ mpdu_seq_num = (sc &IEEE80211_SCTL_SEQ ) >>4 ; - ret =ieee80211_sta_manage_reorder_buf (hw, tid_agg_rx, skb, + ret =ieee80211_sta_manage_reorder_buf (hw, tid_agg_rx, skb, status, mpdu_seq_num,0 ); end_reorder:return ret;
@@ -2512,7 +2517,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,return ; } -if (!ieee80211_rx_reorder_ampdu (local, skb)) +if (!ieee80211_rx_reorder_ampdu (local, skb, status))__ieee80211_rx_handle_packet (hw, skb, status, rate);rcu_read_unlock ();
net/mac80211/wext.c +34 -9
68 lines not on this page · raw message
net/wireless/core.h +1 -1
@@ -90,7 +90,7 @@ struct cfg80211_internal_bss {struct rb_node rbn;unsigned long ts;struct kref ref; -bool hold; +bool hold, ies_allocated;/* must be last because of priv member */ struct cfg80211_bss pub;
net/wireless/reg.c +3 -2
@@ -2095,11 +2095,12 @@ int set_regdom(const struct ieee80211_regdomain *rd)/* Caller must hold cfg80211_mutex */ void reg_device_remove (struct wiphy *wiphy) { -struct wiphy *request_wiphy; +struct wiphy *request_wiphy =NULL ;assert_cfg80211_lock (); - request_wiphy =wiphy_idx_to_wiphy (last_request->wiphy_idx); +if (last_request) + request_wiphy =wiphy_idx_to_wiphy (last_request->wiphy_idx);kfree (wiphy->regd);if (!last_request || !request_wiphy)
net/wireless/scan.c +33 -7
@@ -58,6 +58,10 @@ static void bss_release(struct kref *ref) bss = container_of(ref, struct cfg80211_internal_bss, ref);if (bss->pub.free_priv) bss->pub.free_priv (&bss->pub); + +if (bss->ies_allocated) +kfree (bss->pub.information_elements); +kfree (bss); }
@@ -360,19 +364,41 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev, found =rb_find_bss (dev, res); -if (found && overwrite) { -list_replace (&found->list, &res->list); -rb_replace_node (&found->rbn, &res->rbn, - &dev->bss_tree); -kref_put (&found->ref, bss_release); - found = res; - }else if (found) { +if (found) {kref_get (&found->ref); found->pub.beacon_interval = res->pub.beacon_interval; found->pub.tsf = res->pub.tsf; found->pub.signal = res->pub.signal; found->pub.capability = res->pub.capability; found->ts = res->ts; + +/* overwrite IEs */ +if (overwrite) { +size_t used = dev->wiphy.bss_priv_size +sizeof (*res); +size_t ielen = res->pub.len_information_elements; + +if (ksize (found) >= used + ielen) { +memcpy (found->pub.information_elements, + res->pub.information_elements, ielen); + found->pub.len_information_elements = ielen; + }else { +u8 *ies = found->pub.information_elements; + +if (found->ies_allocated) { +if (ksize (ies) < ielen) + ies =krealloc (ies, ielen, +GFP_ATOMIC ); + }else + ies =kmalloc (ielen,GFP_ATOMIC ); + +if (ies) { +memcpy (ies, res->pub.information_elements, ielen); + found->ies_allocated = true; + found->pub.information_elements = ies; + } + } + } +kref_put (&res->ref, bss_release); }else {/* this "consumes" the reference */
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
David Miller
maintainerFrom: "John W. Linville" <[email protected]>
Date: Fri, 17 Apr 2009 15:54:07 -0400
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.gitmaster
Looks good, pulled, thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html