Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

+61 -25
+1 -1
drivers/net/wireless/ath/ath9k/rc.c
··· 679 return rate; 680 681 if (rate_table->info[rate].valid_single_stream && 682 - !(ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG)); 683 return rate; 684 685 /* This should not happen */
··· 679 return rate; 680 681 if (rate_table->info[rate].valid_single_stream && 682 + !(ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG)) 683 return rate; 684 685 /* This should not happen */
+13 -2
drivers/net/wireless/b43/dma.c
··· 1157 } 1158 1159 static int dma_tx_fragment(struct b43_dmaring *ring, 1160 - struct sk_buff *skb) 1161 { 1162 const struct b43_dma_ops *ops = ring->ops; 1163 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1164 u8 *header; ··· 1225 } 1226 1227 memcpy(skb_put(bounce_skb, skb->len), skb->data, skb->len); 1228 dev_kfree_skb_any(skb); 1229 skb = bounce_skb; 1230 meta->skb = skb; 1231 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); 1232 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) { ··· 1362 * static, so we don't need to store it per frame. */ 1363 ring->queue_prio = skb_get_queue_mapping(skb); 1364 1365 - err = dma_tx_fragment(ring, skb); 1366 if (unlikely(err == -ENOKEY)) { 1367 /* Drop this packet, as we don't have the encryption key 1368 * anymore and must not transmit it unencrypted. */
··· 1157 } 1158 1159 static int dma_tx_fragment(struct b43_dmaring *ring, 1160 + struct sk_buff **in_skb) 1161 { 1162 + struct sk_buff *skb = *in_skb; 1163 const struct b43_dma_ops *ops = ring->ops; 1164 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1165 u8 *header; ··· 1224 } 1225 1226 memcpy(skb_put(bounce_skb, skb->len), skb->data, skb->len); 1227 + memcpy(bounce_skb->cb, skb->cb, sizeof(skb->cb)); 1228 + bounce_skb->dev = skb->dev; 1229 + skb_set_queue_mapping(bounce_skb, skb_get_queue_mapping(skb)); 1230 + info = IEEE80211_SKB_CB(bounce_skb); 1231 + 1232 dev_kfree_skb_any(skb); 1233 skb = bounce_skb; 1234 + *in_skb = bounce_skb; 1235 meta->skb = skb; 1236 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); 1237 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) { ··· 1355 * static, so we don't need to store it per frame. */ 1356 ring->queue_prio = skb_get_queue_mapping(skb); 1357 1358 + /* dma_tx_fragment might reallocate the skb, so invalidate pointers pointing 1359 + * into the skb data or cb now. */ 1360 + hdr = NULL; 1361 + info = NULL; 1362 + err = dma_tx_fragment(ring, &skb); 1363 if (unlikely(err == -ENOKEY)) { 1364 /* Drop this packet, as we don't have the encryption key 1365 * anymore and must not transmit it unencrypted. */
+4 -1
drivers/net/wireless/ipw2x00/ipw2100.c
··· 6325 6326 fail: 6327 if (dev) { 6328 - if (registered) 6329 unregister_netdev(dev); 6330 6331 ipw2100_hw_stop_adapter(priv); 6332 ··· 6385 /* Unregister the device first - this results in close() 6386 * being called if the device is open. If we free storage 6387 * first, then close() will crash. */ 6388 unregister_netdev(dev); 6389 6390 /* ipw2100_down will ensure that there is no more pending work
··· 6325 6326 fail: 6327 if (dev) { 6328 + if (registered) { 6329 + unregister_ieee80211(priv->ieee); 6330 unregister_netdev(dev); 6331 + } 6332 6333 ipw2100_hw_stop_adapter(priv); 6334 ··· 6383 /* Unregister the device first - this results in close() 6384 * being called if the device is open. If we free storage 6385 * first, then close() will crash. */ 6386 + unregister_ieee80211(priv->ieee); 6387 unregister_netdev(dev); 6388 6389 /* ipw2100_down will ensure that there is no more pending work
+2
drivers/net/wireless/ipw2x00/ipw2200.c
··· 11821 if (err) { 11822 IPW_ERROR("Failed to register promiscuous network " 11823 "device (error %d).\n", err); 11824 unregister_netdev(priv->net_dev); 11825 goto out_remove_sysfs; 11826 } ··· 11872 11873 mutex_unlock(&priv->mutex); 11874 11875 unregister_netdev(priv->net_dev); 11876 11877 if (priv->rxq) {
··· 11821 if (err) { 11822 IPW_ERROR("Failed to register promiscuous network " 11823 "device (error %d).\n", err); 11824 + unregister_ieee80211(priv->ieee); 11825 unregister_netdev(priv->net_dev); 11826 goto out_remove_sysfs; 11827 } ··· 11871 11872 mutex_unlock(&priv->mutex); 11873 11874 + unregister_ieee80211(priv->ieee); 11875 unregister_netdev(priv->net_dev); 11876 11877 if (priv->rxq) {
+1
drivers/net/wireless/ipw2x00/libipw.h
··· 1020 /* ieee80211.c */ 1021 extern void free_ieee80211(struct net_device *dev, int monitor); 1022 extern struct net_device *alloc_ieee80211(int sizeof_priv, int monitor); 1023 extern int libipw_change_mtu(struct net_device *dev, int new_mtu); 1024 1025 extern void libipw_networks_age(struct libipw_device *ieee,
··· 1020 /* ieee80211.c */ 1021 extern void free_ieee80211(struct net_device *dev, int monitor); 1022 extern struct net_device *alloc_ieee80211(int sizeof_priv, int monitor); 1023 + extern void unregister_ieee80211(struct libipw_device *ieee); 1024 extern int libipw_change_mtu(struct net_device *dev, int new_mtu); 1025 1026 extern void libipw_networks_age(struct libipw_device *ieee,
+9 -5
drivers/net/wireless/ipw2x00/libipw_module.c
··· 235 libipw_networks_free(ieee); 236 237 /* free cfg80211 resources */ 238 - if (!monitor) { 239 - wiphy_unregister(ieee->wdev.wiphy); 240 - kfree(ieee->a_band.channels); 241 - kfree(ieee->bg_band.channels); 242 wiphy_free(ieee->wdev.wiphy); 243 - } 244 245 free_netdev(dev); 246 } 247 248 #ifdef CONFIG_LIBIPW_DEBUG ··· 333 334 EXPORT_SYMBOL(alloc_ieee80211); 335 EXPORT_SYMBOL(free_ieee80211);
··· 235 libipw_networks_free(ieee); 236 237 /* free cfg80211 resources */ 238 + if (!monitor) 239 wiphy_free(ieee->wdev.wiphy); 240 241 free_netdev(dev); 242 + } 243 + 244 + void unregister_ieee80211(struct libipw_device *ieee) 245 + { 246 + wiphy_unregister(ieee->wdev.wiphy); 247 + kfree(ieee->a_band.channels); 248 + kfree(ieee->bg_band.channels); 249 } 250 251 #ifdef CONFIG_LIBIPW_DEBUG ··· 330 331 EXPORT_SYMBOL(alloc_ieee80211); 332 EXPORT_SYMBOL(free_ieee80211); 333 + EXPORT_SYMBOL(unregister_ieee80211);
+1 -1
drivers/net/wireless/libertas/if_usb.c
··· 508 /* Fill the receive configuration URB and initialise the Rx call back */ 509 usb_fill_bulk_urb(cardp->rx_urb, cardp->udev, 510 usb_rcvbulkpipe(cardp->udev, cardp->ep_in), 511 - (void *) (skb->tail + (size_t) IPFIELD_ALIGN_OFFSET), 512 MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, 513 cardp); 514
··· 508 /* Fill the receive configuration URB and initialise the Rx call back */ 509 usb_fill_bulk_urb(cardp->rx_urb, cardp->udev, 510 usb_rcvbulkpipe(cardp->udev, cardp->ep_in), 511 + skb->data + IPFIELD_ALIGN_OFFSET, 512 MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, 513 cardp); 514
+5
drivers/net/wireless/rt2x00/rt73usb.c
··· 2389 { USB_DEVICE(0x13b1, 0x0023), USB_DEVICE_DATA(&rt73usb_ops) }, 2390 { USB_DEVICE(0x13b1, 0x0028), USB_DEVICE_DATA(&rt73usb_ops) }, 2391 /* MSI */ 2392 { USB_DEVICE(0x0db0, 0x6877), USB_DEVICE_DATA(&rt73usb_ops) }, 2393 { USB_DEVICE(0x0db0, 0x6874), USB_DEVICE_DATA(&rt73usb_ops) }, 2394 { USB_DEVICE(0x0db0, 0xa861), USB_DEVICE_DATA(&rt73usb_ops) }, 2395 { USB_DEVICE(0x0db0, 0xa874), USB_DEVICE_DATA(&rt73usb_ops) }, 2396 /* Ralink */ 2397 { USB_DEVICE(0x04bb, 0x093d), USB_DEVICE_DATA(&rt73usb_ops) }, 2398 { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) }, ··· 2423 /* Planex */ 2424 { USB_DEVICE(0x2019, 0xab01), USB_DEVICE_DATA(&rt73usb_ops) }, 2425 { USB_DEVICE(0x2019, 0xab50), USB_DEVICE_DATA(&rt73usb_ops) }, 2426 /* Zcom */ 2427 { USB_DEVICE(0x0cde, 0x001c), USB_DEVICE_DATA(&rt73usb_ops) }, 2428 /* ZyXEL */
··· 2389 { USB_DEVICE(0x13b1, 0x0023), USB_DEVICE_DATA(&rt73usb_ops) }, 2390 { USB_DEVICE(0x13b1, 0x0028), USB_DEVICE_DATA(&rt73usb_ops) }, 2391 /* MSI */ 2392 + { USB_DEVICE(0x0db0, 0x4600), USB_DEVICE_DATA(&rt73usb_ops) }, 2393 { USB_DEVICE(0x0db0, 0x6877), USB_DEVICE_DATA(&rt73usb_ops) }, 2394 { USB_DEVICE(0x0db0, 0x6874), USB_DEVICE_DATA(&rt73usb_ops) }, 2395 { USB_DEVICE(0x0db0, 0xa861), USB_DEVICE_DATA(&rt73usb_ops) }, 2396 { USB_DEVICE(0x0db0, 0xa874), USB_DEVICE_DATA(&rt73usb_ops) }, 2397 + /* Ovislink */ 2398 + { USB_DEVICE(0x1b75, 0x7318), USB_DEVICE_DATA(&rt73usb_ops) }, 2399 /* Ralink */ 2400 { USB_DEVICE(0x04bb, 0x093d), USB_DEVICE_DATA(&rt73usb_ops) }, 2401 { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) }, ··· 2420 /* Planex */ 2421 { USB_DEVICE(0x2019, 0xab01), USB_DEVICE_DATA(&rt73usb_ops) }, 2422 { USB_DEVICE(0x2019, 0xab50), USB_DEVICE_DATA(&rt73usb_ops) }, 2423 + /* WideTell */ 2424 + { USB_DEVICE(0x7167, 0x3840), USB_DEVICE_DATA(&rt73usb_ops) }, 2425 /* Zcom */ 2426 { USB_DEVICE(0x0cde, 0x001c), USB_DEVICE_DATA(&rt73usb_ops) }, 2427 /* ZyXEL */
+12 -7
net/mac80211/agg-tx.c
··· 666 667 state = &sta->ampdu_mlme.tid_state_tx[tid]; 668 669 spin_lock_bh(&sta->lock); 670 671 - if (!(*state & HT_ADDBA_REQUESTED_MSK)) { 672 - spin_unlock_bh(&sta->lock); 673 - return; 674 - } 675 676 if (mgmt->u.action.u.addba_resp.dialog_token != 677 sta->ampdu_mlme.tid_tx[tid]->dialog_token) { 678 - spin_unlock_bh(&sta->lock); 679 #ifdef CONFIG_MAC80211_HT_DEBUG 680 printk(KERN_DEBUG "wrong addBA response token, tid %d\n", tid); 681 #endif /* CONFIG_MAC80211_HT_DEBUG */ 682 - return; 683 } 684 685 - del_timer_sync(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer); 686 #ifdef CONFIG_MAC80211_HT_DEBUG 687 printk(KERN_DEBUG "switched off addBA timer for tid %d \n", tid); 688 #endif /* CONFIG_MAC80211_HT_DEBUG */ 689 if (le16_to_cpu(mgmt->u.action.u.addba_resp.status) 690 == WLAN_STATUS_SUCCESS) { 691 u8 curstate = *state; ··· 698 } else { 699 ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); 700 } 701 spin_unlock_bh(&sta->lock); 702 }
··· 666 667 state = &sta->ampdu_mlme.tid_state_tx[tid]; 668 669 + del_timer_sync(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer); 670 + 671 spin_lock_bh(&sta->lock); 672 673 + if (!(*state & HT_ADDBA_REQUESTED_MSK)) 674 + goto timer_still_needed; 675 676 if (mgmt->u.action.u.addba_resp.dialog_token != 677 sta->ampdu_mlme.tid_tx[tid]->dialog_token) { 678 #ifdef CONFIG_MAC80211_HT_DEBUG 679 printk(KERN_DEBUG "wrong addBA response token, tid %d\n", tid); 680 #endif /* CONFIG_MAC80211_HT_DEBUG */ 681 + goto timer_still_needed; 682 } 683 684 #ifdef CONFIG_MAC80211_HT_DEBUG 685 printk(KERN_DEBUG "switched off addBA timer for tid %d \n", tid); 686 #endif /* CONFIG_MAC80211_HT_DEBUG */ 687 + 688 if (le16_to_cpu(mgmt->u.action.u.addba_resp.status) 689 == WLAN_STATUS_SUCCESS) { 690 u8 curstate = *state; ··· 699 } else { 700 ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); 701 } 702 + 703 + goto out; 704 + 705 + timer_still_needed: 706 + add_timer(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer); 707 + out: 708 spin_unlock_bh(&sta->lock); 709 }
+3 -3
net/mac80211/cfg.c
··· 72 struct ieee80211_sub_if_data *sdata; 73 int ret; 74 75 if (!nl80211_type_check(type)) 76 return -EINVAL; 77 ··· 83 ret = ieee80211_if_change_type(sdata, type); 84 if (ret) 85 return ret; 86 - 87 - if (netif_running(sdata->dev)) 88 - return -EBUSY; 89 90 if (ieee80211_vif_is_mesh(&sdata->vif) && params->mesh_id_len) 91 ieee80211_sdata_set_mesh_id(sdata,
··· 72 struct ieee80211_sub_if_data *sdata; 73 int ret; 74 75 + if (netif_running(dev)) 76 + return -EBUSY; 77 + 78 if (!nl80211_type_check(type)) 79 return -EINVAL; 80 ··· 80 ret = ieee80211_if_change_type(sdata, type); 81 if (ret) 82 return ret; 83 84 if (ieee80211_vif_is_mesh(&sdata->vif) && params->mesh_id_len) 85 ieee80211_sdata_set_mesh_id(sdata,
+1 -1
net/mac80211/ht.c
··· 153 if (net_ratelimit()) 154 printk(KERN_DEBUG "delba from %pM (%s) tid %d reason code %d\n", 155 mgmt->sa, initiator ? "initiator" : "recipient", tid, 156 - mgmt->u.action.u.delba.reason_code); 157 #endif /* CONFIG_MAC80211_HT_DEBUG */ 158 159 if (initiator == WLAN_BACK_INITIATOR)
··· 153 if (net_ratelimit()) 154 printk(KERN_DEBUG "delba from %pM (%s) tid %d reason code %d\n", 155 mgmt->sa, initiator ? "initiator" : "recipient", tid, 156 + le16_to_cpu(mgmt->u.action.u.delba.reason_code)); 157 #endif /* CONFIG_MAC80211_HT_DEBUG */ 158 159 if (initiator == WLAN_BACK_INITIATOR)
+4 -2
net/mac80211/ibss.c
··· 73 struct ieee80211_mgmt *mgmt; 74 u8 *pos; 75 struct ieee80211_supported_band *sband; 76 u32 bss_change; 77 u8 supp_rates[IEEE80211_MAX_SUPP_RATES]; 78 ··· 178 mod_timer(&ifibss->timer, 179 round_jiffies(jiffies + IEEE80211_IBSS_MERGE_INTERVAL)); 180 181 - cfg80211_inform_bss_frame(local->hw.wiphy, local->hw.conf.channel, 182 - mgmt, skb->len, 0, GFP_KERNEL); 183 cfg80211_ibss_joined(sdata->dev, ifibss->bssid, GFP_KERNEL); 184 } 185
··· 73 struct ieee80211_mgmt *mgmt; 74 u8 *pos; 75 struct ieee80211_supported_band *sband; 76 + struct cfg80211_bss *bss; 77 u32 bss_change; 78 u8 supp_rates[IEEE80211_MAX_SUPP_RATES]; 79 ··· 177 mod_timer(&ifibss->timer, 178 round_jiffies(jiffies + IEEE80211_IBSS_MERGE_INTERVAL)); 179 180 + bss = cfg80211_inform_bss_frame(local->hw.wiphy, local->hw.conf.channel, 181 + mgmt, skb->len, 0, GFP_KERNEL); 182 + cfg80211_put_bss(bss); 183 cfg80211_ibss_joined(sdata->dev, ifibss->bssid, GFP_KERNEL); 184 } 185
+5 -2
net/wireless/sme.c
··· 165 struct cfg80211_registered_device *rdev = 166 container_of(work, struct cfg80211_registered_device, conn_work); 167 struct wireless_dev *wdev; 168 - u8 bssid[ETH_ALEN]; 169 170 rtnl_lock(); 171 cfg80211_lock_rdev(rdev); ··· 181 wdev_unlock(wdev); 182 continue; 183 } 184 - memcpy(bssid, wdev->conn->params.bssid, ETH_ALEN); 185 if (cfg80211_conn_do_work(wdev)) 186 __cfg80211_connect_result( 187 wdev->netdev, bssid,
··· 165 struct cfg80211_registered_device *rdev = 166 container_of(work, struct cfg80211_registered_device, conn_work); 167 struct wireless_dev *wdev; 168 + u8 bssid_buf[ETH_ALEN], *bssid = NULL; 169 170 rtnl_lock(); 171 cfg80211_lock_rdev(rdev); ··· 181 wdev_unlock(wdev); 182 continue; 183 } 184 + if (wdev->conn->params.bssid) { 185 + memcpy(bssid_buf, wdev->conn->params.bssid, ETH_ALEN); 186 + bssid = bssid_buf; 187 + } 188 if (cfg80211_conn_do_work(wdev)) 189 __cfg80211_connect_result( 190 wdev->netdev, bssid,