diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-12 22:36:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-12 22:36:33 -0400 |
commit | f403ede70518c131ba8bebbacaf182927a58a315 (patch) | |
tree | 93acb9ce082a97d53edef7c5894614b8fa016759 | |
parent | 5dc474d6b3ba19df7d491d4eabd9fb7a0c1c2423 (diff) | |
parent | a4278e18e7e497b76781492d010035c3c36f7403 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
-rw-r--r-- | drivers/net/ps3_gelic_wireless.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-rs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.c | 6 | ||||
-rw-r--r-- | net/mac80211/debugfs_key.c | 15 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 2 | ||||
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 2 | ||||
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 17 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 64 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid_debugfs.c | 4 | ||||
-rw-r--r-- | net/mac80211/rx.c | 12 | ||||
-rw-r--r-- | net/mac80211/tx.c | 1 | ||||
-rw-r--r-- | net/mac80211/util.c | 10 | ||||
-rw-r--r-- | net/mac80211/wme.c | 3 |
21 files changed, 133 insertions, 79 deletions
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index 0d32123085e9..1dae1f2ed813 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c | |||
@@ -2474,6 +2474,8 @@ static void gelic_wl_free(struct gelic_wl_info *wl) | |||
2474 | 2474 | ||
2475 | pr_debug("%s: <-\n", __func__); | 2475 | pr_debug("%s: <-\n", __func__); |
2476 | 2476 | ||
2477 | free_page((unsigned long)wl->buf); | ||
2478 | |||
2477 | pr_debug("%s: destroy queues\n", __func__); | 2479 | pr_debug("%s: destroy queues\n", __func__); |
2478 | destroy_workqueue(wl->eurus_cmd_queue); | 2480 | destroy_workqueue(wl->eurus_cmd_queue); |
2479 | destroy_workqueue(wl->event_queue); | 2481 | destroy_workqueue(wl->event_queue); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index d3406830c8e3..62a3d8f8563e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -666,7 +666,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
666 | rx_status.flag = 0; | 666 | rx_status.flag = 0; |
667 | rx_status.mactime = le64_to_cpu(rx_end->timestamp); | 667 | rx_status.mactime = le64_to_cpu(rx_end->timestamp); |
668 | rx_status.freq = | 668 | rx_status.freq = |
669 | ieee80211_frequency_to_channel(le16_to_cpu(rx_hdr->channel)); | 669 | ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel)); |
670 | rx_status.band = (rx_hdr->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? | 670 | rx_status.band = (rx_hdr->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? |
671 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | 671 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; |
672 | 672 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c index b608e1ca8b40..c9847b1a67f7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c | |||
@@ -163,8 +163,8 @@ struct iwl4965_lq_sta { | |||
163 | struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file; | 163 | struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file; |
164 | #endif | 164 | #endif |
165 | struct iwl4965_rate dbg_fixed; | 165 | struct iwl4965_rate dbg_fixed; |
166 | struct iwl_priv *drv; | ||
167 | #endif | 166 | #endif |
167 | struct iwl_priv *drv; | ||
168 | }; | 168 | }; |
169 | 169 | ||
170 | static void rs_rate_scale_perform(struct iwl_priv *priv, | 170 | static void rs_rate_scale_perform(struct iwl_priv *priv, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 17f629fb96ff..bf19eb8aafd0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -3978,7 +3978,7 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv, | |||
3978 | 3978 | ||
3979 | rx_status.mactime = le64_to_cpu(rx_start->timestamp); | 3979 | rx_status.mactime = le64_to_cpu(rx_start->timestamp); |
3980 | rx_status.freq = | 3980 | rx_status.freq = |
3981 | ieee80211_frequency_to_channel(le16_to_cpu(rx_start->channel)); | 3981 | ieee80211_channel_to_frequency(le16_to_cpu(rx_start->channel)); |
3982 | rx_status.band = (rx_start->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? | 3982 | rx_status.band = (rx_start->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? |
3983 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | 3983 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; |
3984 | rx_status.rate_idx = | 3984 | rx_status.rate_idx = |
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index 04c2638d75ad..9196825ed1b5 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c | |||
@@ -388,8 +388,15 @@ islpci_open(struct net_device *ndev) | |||
388 | 388 | ||
389 | netif_start_queue(ndev); | 389 | netif_start_queue(ndev); |
390 | 390 | ||
391 | /* Turn off carrier unless we know we have associated */ | 391 | /* Turn off carrier if in STA or Ad-hoc mode. It will be turned on |
392 | netif_carrier_off(ndev); | 392 | * once the firmware receives a trap of being associated |
393 | * (GEN_OID_LINKSTATE). In other modes (AP or WDS or monitor) we | ||
394 | * should just leave the carrier on as its expected the firmware | ||
395 | * won't send us a trigger. */ | ||
396 | if (priv->iw_mode == IW_MODE_INFRA || priv->iw_mode == IW_MODE_ADHOC) | ||
397 | netif_carrier_off(ndev); | ||
398 | else | ||
399 | netif_carrier_on(ndev); | ||
393 | 400 | ||
394 | return 0; | 401 | return 0; |
395 | } | 402 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 8d8657fb64dd..b22c02737185 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -1032,8 +1032,10 @@ static int rt2x00lib_initialize(struct rt2x00_dev *rt2x00dev) | |||
1032 | * Initialize the device. | 1032 | * Initialize the device. |
1033 | */ | 1033 | */ |
1034 | status = rt2x00dev->ops->lib->initialize(rt2x00dev); | 1034 | status = rt2x00dev->ops->lib->initialize(rt2x00dev); |
1035 | if (status) | 1035 | if (status) { |
1036 | goto exit; | 1036 | rt2x00queue_uninitialize(rt2x00dev); |
1037 | return status; | ||
1038 | } | ||
1037 | 1039 | ||
1038 | __set_bit(DEVICE_INITIALIZED, &rt2x00dev->flags); | 1040 | __set_bit(DEVICE_INITIALIZED, &rt2x00dev->flags); |
1039 | 1041 | ||
@@ -1043,11 +1045,6 @@ static int rt2x00lib_initialize(struct rt2x00_dev *rt2x00dev) | |||
1043 | rt2x00rfkill_register(rt2x00dev); | 1045 | rt2x00rfkill_register(rt2x00dev); |
1044 | 1046 | ||
1045 | return 0; | 1047 | return 0; |
1046 | |||
1047 | exit: | ||
1048 | rt2x00lib_uninitialize(rt2x00dev); | ||
1049 | |||
1050 | return status; | ||
1051 | } | 1048 | } |
1052 | 1049 | ||
1053 | int rt2x00lib_start(struct rt2x00_dev *rt2x00dev) | 1050 | int rt2x00lib_start(struct rt2x00_dev *rt2x00dev) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 7867ec64bd2c..971af2546b59 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -314,13 +314,14 @@ int rt2x00pci_initialize(struct rt2x00_dev *rt2x00dev) | |||
314 | if (status) { | 314 | if (status) { |
315 | ERROR(rt2x00dev, "IRQ %d allocation failed (error %d).\n", | 315 | ERROR(rt2x00dev, "IRQ %d allocation failed (error %d).\n", |
316 | pci_dev->irq, status); | 316 | pci_dev->irq, status); |
317 | return status; | 317 | goto exit; |
318 | } | 318 | } |
319 | 319 | ||
320 | return 0; | 320 | return 0; |
321 | 321 | ||
322 | exit: | 322 | exit: |
323 | rt2x00pci_uninitialize(rt2x00dev); | 323 | queue_for_each(rt2x00dev, queue) |
324 | rt2x00pci_free_queue_dma(rt2x00dev, queue); | ||
324 | 325 | ||
325 | return status; | 326 | return status; |
326 | } | 327 | } |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index ae12dcdd3c24..14bc7b281659 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2366,6 +2366,7 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2366 | { | 2366 | { |
2367 | struct rt2x00_dev *rt2x00dev = hw->priv; | 2367 | struct rt2x00_dev *rt2x00dev = hw->priv; |
2368 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 2368 | struct rt2x00_intf *intf = vif_to_intf(control->vif); |
2369 | struct queue_entry_priv_pci_tx *priv_tx; | ||
2369 | struct skb_frame_desc *skbdesc; | 2370 | struct skb_frame_desc *skbdesc; |
2370 | unsigned int beacon_base; | 2371 | unsigned int beacon_base; |
2371 | u32 reg; | 2372 | u32 reg; |
@@ -2373,21 +2374,8 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2373 | if (unlikely(!intf->beacon)) | 2374 | if (unlikely(!intf->beacon)) |
2374 | return -ENOBUFS; | 2375 | return -ENOBUFS; |
2375 | 2376 | ||
2376 | /* | 2377 | priv_tx = intf->beacon->priv_data; |
2377 | * We need to append the descriptor in front of the | 2378 | memset(priv_tx->desc, 0, intf->beacon->queue->desc_size); |
2378 | * beacon frame. | ||
2379 | */ | ||
2380 | if (skb_headroom(skb) < intf->beacon->queue->desc_size) { | ||
2381 | if (pskb_expand_head(skb, intf->beacon->queue->desc_size, | ||
2382 | 0, GFP_ATOMIC)) | ||
2383 | return -ENOMEM; | ||
2384 | } | ||
2385 | |||
2386 | /* | ||
2387 | * Add the descriptor in front of the skb. | ||
2388 | */ | ||
2389 | skb_push(skb, intf->beacon->queue->desc_size); | ||
2390 | memset(skb->data, 0, intf->beacon->queue->desc_size); | ||
2391 | 2379 | ||
2392 | /* | 2380 | /* |
2393 | * Fill in skb descriptor | 2381 | * Fill in skb descriptor |
@@ -2395,9 +2383,9 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2395 | skbdesc = get_skb_frame_desc(skb); | 2383 | skbdesc = get_skb_frame_desc(skb); |
2396 | memset(skbdesc, 0, sizeof(*skbdesc)); | 2384 | memset(skbdesc, 0, sizeof(*skbdesc)); |
2397 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; | 2385 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; |
2398 | skbdesc->data = skb->data + intf->beacon->queue->desc_size; | 2386 | skbdesc->data = skb->data; |
2399 | skbdesc->data_len = skb->len - intf->beacon->queue->desc_size; | 2387 | skbdesc->data_len = skb->len; |
2400 | skbdesc->desc = skb->data; | 2388 | skbdesc->desc = priv_tx->desc; |
2401 | skbdesc->desc_len = intf->beacon->queue->desc_size; | 2389 | skbdesc->desc_len = intf->beacon->queue->desc_size; |
2402 | skbdesc->entry = intf->beacon; | 2390 | skbdesc->entry = intf->beacon; |
2403 | 2391 | ||
@@ -2425,7 +2413,10 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2425 | */ | 2413 | */ |
2426 | beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx); | 2414 | beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx); |
2427 | rt2x00pci_register_multiwrite(rt2x00dev, beacon_base, | 2415 | rt2x00pci_register_multiwrite(rt2x00dev, beacon_base, |
2428 | skb->data, skb->len); | 2416 | skbdesc->desc, skbdesc->desc_len); |
2417 | rt2x00pci_register_multiwrite(rt2x00dev, | ||
2418 | beacon_base + skbdesc->desc_len, | ||
2419 | skbdesc->data, skbdesc->data_len); | ||
2429 | rt61pci_kick_tx_queue(rt2x00dev, control->queue); | 2420 | rt61pci_kick_tx_queue(rt2x00dev, control->queue); |
2430 | 2421 | ||
2431 | return 0; | 2422 | return 0; |
@@ -2490,7 +2481,7 @@ static const struct data_queue_desc rt61pci_queue_tx = { | |||
2490 | 2481 | ||
2491 | static const struct data_queue_desc rt61pci_queue_bcn = { | 2482 | static const struct data_queue_desc rt61pci_queue_bcn = { |
2492 | .entry_num = 4 * BEACON_ENTRIES, | 2483 | .entry_num = 4 * BEACON_ENTRIES, |
2493 | .data_size = MGMT_FRAME_SIZE, | 2484 | .data_size = 0, /* No DMA required for beacons */ |
2494 | .desc_size = TXINFO_SIZE, | 2485 | .desc_size = TXINFO_SIZE, |
2495 | .priv_size = sizeof(struct queue_entry_priv_pci_tx), | 2486 | .priv_size = sizeof(struct queue_entry_priv_pci_tx), |
2496 | }; | 2487 | }; |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index 03384a43186b..49ae97003952 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -908,9 +908,9 @@ static void wv_psa_show(psa_t * p) | |||
908 | p->psa_call_code[3], p->psa_call_code[4], p->psa_call_code[5], | 908 | p->psa_call_code[3], p->psa_call_code[4], p->psa_call_code[5], |
909 | p->psa_call_code[6], p->psa_call_code[7]); | 909 | p->psa_call_code[6], p->psa_call_code[7]); |
910 | #ifdef DEBUG_SHOW_UNUSED | 910 | #ifdef DEBUG_SHOW_UNUSED |
911 | printk(KERN_DEBUG "psa_reserved[]: %02X:%02X:%02X:%02X\n", | 911 | printk(KERN_DEBUG "psa_reserved[]: %02X:%02X\n", |
912 | p->psa_reserved[0], | 912 | p->psa_reserved[0], |
913 | p->psa_reserved[1], p->psa_reserved[2], p->psa_reserved[3]); | 913 | p->psa_reserved[1]); |
914 | #endif /* DEBUG_SHOW_UNUSED */ | 914 | #endif /* DEBUG_SHOW_UNUSED */ |
915 | printk(KERN_DEBUG "psa_conf_status: %d, ", p->psa_conf_status); | 915 | printk(KERN_DEBUG "psa_conf_status: %d, ", p->psa_conf_status); |
916 | printk("psa_crc: 0x%02x%02x, ", p->psa_crc[0], p->psa_crc[1]); | 916 | printk("psa_crc: 0x%02x%02x, ", p->psa_crc[0], p->psa_crc[1]); |
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index baf74015751c..b584c0ecc62d 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -1074,11 +1074,9 @@ wv_psa_show(psa_t * p) | |||
1074 | p->psa_call_code[6], | 1074 | p->psa_call_code[6], |
1075 | p->psa_call_code[7]); | 1075 | p->psa_call_code[7]); |
1076 | #ifdef DEBUG_SHOW_UNUSED | 1076 | #ifdef DEBUG_SHOW_UNUSED |
1077 | printk(KERN_DEBUG "psa_reserved[]: %02X:%02X:%02X:%02X\n", | 1077 | printk(KERN_DEBUG "psa_reserved[]: %02X:%02X\n", |
1078 | p->psa_reserved[0], | 1078 | p->psa_reserved[0], |
1079 | p->psa_reserved[1], | 1079 | p->psa_reserved[1]); |
1080 | p->psa_reserved[2], | ||
1081 | p->psa_reserved[3]); | ||
1082 | #endif /* DEBUG_SHOW_UNUSED */ | 1080 | #endif /* DEBUG_SHOW_UNUSED */ |
1083 | printk(KERN_DEBUG "psa_conf_status: %d, ", p->psa_conf_status); | 1081 | printk(KERN_DEBUG "psa_conf_status: %d, ", p->psa_conf_status); |
1084 | printk("psa_crc: 0x%02x%02x, ", p->psa_crc[0], p->psa_crc[1]); | 1082 | printk("psa_crc: 0x%02x%02x, ", p->psa_crc[0], p->psa_crc[1]); |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 5316074f39f0..12e24f04dddf 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -889,9 +889,13 @@ static void tx_urb_complete(struct urb *urb) | |||
889 | } | 889 | } |
890 | free_urb: | 890 | free_urb: |
891 | skb = (struct sk_buff *)urb->context; | 891 | skb = (struct sk_buff *)urb->context; |
892 | zd_mac_tx_to_dev(skb, urb->status); | 892 | /* |
893 | * grab 'usb' pointer before handing off the skb (since | ||
894 | * it might be freed by zd_mac_tx_to_dev or mac80211) | ||
895 | */ | ||
893 | cb = (struct zd_tx_skb_control_block *)skb->cb; | 896 | cb = (struct zd_tx_skb_control_block *)skb->cb; |
894 | usb = &zd_hw_mac(cb->hw)->chip.usb; | 897 | usb = &zd_hw_mac(cb->hw)->chip.usb; |
898 | zd_mac_tx_to_dev(skb, urb->status); | ||
895 | free_tx_urb(usb, urb); | 899 | free_tx_urb(usb, urb); |
896 | tx_dec_submitted_urbs(usb); | 900 | tx_dec_submitted_urbs(usb); |
897 | return; | 901 | return; |
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c index 879e7210458a..19efc3a6a932 100644 --- a/net/mac80211/debugfs_key.c +++ b/net/mac80211/debugfs_key.c | |||
@@ -255,14 +255,23 @@ void ieee80211_debugfs_key_remove(struct ieee80211_key *key) | |||
255 | void ieee80211_debugfs_key_add_default(struct ieee80211_sub_if_data *sdata) | 255 | void ieee80211_debugfs_key_add_default(struct ieee80211_sub_if_data *sdata) |
256 | { | 256 | { |
257 | char buf[50]; | 257 | char buf[50]; |
258 | struct ieee80211_key *key; | ||
258 | 259 | ||
259 | if (!sdata->debugfsdir) | 260 | if (!sdata->debugfsdir) |
260 | return; | 261 | return; |
261 | 262 | ||
262 | sprintf(buf, "../keys/%d", sdata->default_key->debugfs.cnt); | 263 | /* this is running under the key lock */ |
263 | sdata->debugfs.default_key = | 264 | |
264 | debugfs_create_symlink("default_key", sdata->debugfsdir, buf); | 265 | key = sdata->default_key; |
266 | if (key) { | ||
267 | sprintf(buf, "../keys/%d", key->debugfs.cnt); | ||
268 | sdata->debugfs.default_key = | ||
269 | debugfs_create_symlink("default_key", | ||
270 | sdata->debugfsdir, buf); | ||
271 | } else | ||
272 | ieee80211_debugfs_key_remove_default(sdata); | ||
265 | } | 273 | } |
274 | |||
266 | void ieee80211_debugfs_key_remove_default(struct ieee80211_sub_if_data *sdata) | 275 | void ieee80211_debugfs_key_remove_default(struct ieee80211_sub_if_data *sdata) |
267 | { | 276 | { |
268 | if (!sdata) | 277 | if (!sdata) |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index f76bc26ae4d2..697ef67f96b6 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -397,7 +397,7 @@ int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr, | |||
397 | put_unaligned(cpu_to_le32(sdata->u.sta.mesh_seqnum), &meshhdr->seqnum); | 397 | put_unaligned(cpu_to_le32(sdata->u.sta.mesh_seqnum), &meshhdr->seqnum); |
398 | sdata->u.sta.mesh_seqnum++; | 398 | sdata->u.sta.mesh_seqnum++; |
399 | 399 | ||
400 | return 5; | 400 | return 6; |
401 | } | 401 | } |
402 | 402 | ||
403 | void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata) | 403 | void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata) |
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 3df809222d1c..af0cd1e3e213 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -120,7 +120,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags, | |||
120 | *pos++ = WLAN_EID_PREP; | 120 | *pos++ = WLAN_EID_PREP; |
121 | break; | 121 | break; |
122 | default: | 122 | default: |
123 | kfree(skb); | 123 | kfree_skb(skb); |
124 | return -ENOTSUPP; | 124 | return -ENOTSUPP; |
125 | break; | 125 | break; |
126 | } | 126 | } |
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 5845dc21ce85..99c2d360888e 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -158,19 +158,25 @@ int mesh_path_add(u8 *dst, struct net_device *dev) | |||
158 | if (atomic_add_unless(&sdata->u.sta.mpaths, 1, MESH_MAX_MPATHS) == 0) | 158 | if (atomic_add_unless(&sdata->u.sta.mpaths, 1, MESH_MAX_MPATHS) == 0) |
159 | return -ENOSPC; | 159 | return -ENOSPC; |
160 | 160 | ||
161 | read_lock(&pathtbl_resize_lock); | ||
162 | |||
163 | new_mpath = kzalloc(sizeof(struct mesh_path), GFP_KERNEL); | 161 | new_mpath = kzalloc(sizeof(struct mesh_path), GFP_KERNEL); |
164 | if (!new_mpath) { | 162 | if (!new_mpath) { |
165 | atomic_dec(&sdata->u.sta.mpaths); | 163 | atomic_dec(&sdata->u.sta.mpaths); |
166 | err = -ENOMEM; | 164 | err = -ENOMEM; |
167 | goto endadd2; | 165 | goto endadd2; |
168 | } | 166 | } |
167 | new_node = kmalloc(sizeof(struct mpath_node), GFP_KERNEL); | ||
168 | if (!new_node) { | ||
169 | kfree(new_mpath); | ||
170 | atomic_dec(&sdata->u.sta.mpaths); | ||
171 | err = -ENOMEM; | ||
172 | goto endadd2; | ||
173 | } | ||
174 | |||
175 | read_lock(&pathtbl_resize_lock); | ||
169 | memcpy(new_mpath->dst, dst, ETH_ALEN); | 176 | memcpy(new_mpath->dst, dst, ETH_ALEN); |
170 | new_mpath->dev = dev; | 177 | new_mpath->dev = dev; |
171 | new_mpath->flags = 0; | 178 | new_mpath->flags = 0; |
172 | skb_queue_head_init(&new_mpath->frame_queue); | 179 | skb_queue_head_init(&new_mpath->frame_queue); |
173 | new_node = kmalloc(sizeof(struct mpath_node), GFP_KERNEL); | ||
174 | new_node->mpath = new_mpath; | 180 | new_node->mpath = new_mpath; |
175 | new_mpath->timer.data = (unsigned long) new_mpath; | 181 | new_mpath->timer.data = (unsigned long) new_mpath; |
176 | new_mpath->timer.function = mesh_path_timer; | 182 | new_mpath->timer.function = mesh_path_timer; |
@@ -202,7 +208,6 @@ int mesh_path_add(u8 *dst, struct net_device *dev) | |||
202 | 208 | ||
203 | endadd: | 209 | endadd: |
204 | spin_unlock(&mesh_paths->hashwlock[hash_idx]); | 210 | spin_unlock(&mesh_paths->hashwlock[hash_idx]); |
205 | endadd2: | ||
206 | read_unlock(&pathtbl_resize_lock); | 211 | read_unlock(&pathtbl_resize_lock); |
207 | if (!err && grow) { | 212 | if (!err && grow) { |
208 | struct mesh_table *oldtbl, *newtbl; | 213 | struct mesh_table *oldtbl, *newtbl; |
@@ -215,10 +220,12 @@ endadd2: | |||
215 | return -ENOMEM; | 220 | return -ENOMEM; |
216 | } | 221 | } |
217 | rcu_assign_pointer(mesh_paths, newtbl); | 222 | rcu_assign_pointer(mesh_paths, newtbl); |
223 | write_unlock(&pathtbl_resize_lock); | ||
224 | |||
218 | synchronize_rcu(); | 225 | synchronize_rcu(); |
219 | mesh_table_free(oldtbl, false); | 226 | mesh_table_free(oldtbl, false); |
220 | write_unlock(&pathtbl_resize_lock); | ||
221 | } | 227 | } |
228 | endadd2: | ||
222 | return err; | 229 | return err; |
223 | } | 230 | } |
224 | 231 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a5e5c31c23ab..4adba09e80ca 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -665,6 +665,26 @@ static void ieee80211_authenticate(struct net_device *dev, | |||
665 | mod_timer(&ifsta->timer, jiffies + IEEE80211_AUTH_TIMEOUT); | 665 | mod_timer(&ifsta->timer, jiffies + IEEE80211_AUTH_TIMEOUT); |
666 | } | 666 | } |
667 | 667 | ||
668 | static int ieee80211_compatible_rates(struct ieee80211_sta_bss *bss, | ||
669 | struct ieee80211_supported_band *sband, | ||
670 | u64 *rates) | ||
671 | { | ||
672 | int i, j, count; | ||
673 | *rates = 0; | ||
674 | count = 0; | ||
675 | for (i = 0; i < bss->supp_rates_len; i++) { | ||
676 | int rate = (bss->supp_rates[i] & 0x7F) * 5; | ||
677 | |||
678 | for (j = 0; j < sband->n_bitrates; j++) | ||
679 | if (sband->bitrates[j].bitrate == rate) { | ||
680 | *rates |= BIT(j); | ||
681 | count++; | ||
682 | break; | ||
683 | } | ||
684 | } | ||
685 | |||
686 | return count; | ||
687 | } | ||
668 | 688 | ||
669 | static void ieee80211_send_assoc(struct net_device *dev, | 689 | static void ieee80211_send_assoc(struct net_device *dev, |
670 | struct ieee80211_if_sta *ifsta) | 690 | struct ieee80211_if_sta *ifsta) |
@@ -673,11 +693,12 @@ static void ieee80211_send_assoc(struct net_device *dev, | |||
673 | struct sk_buff *skb; | 693 | struct sk_buff *skb; |
674 | struct ieee80211_mgmt *mgmt; | 694 | struct ieee80211_mgmt *mgmt; |
675 | u8 *pos, *ies; | 695 | u8 *pos, *ies; |
676 | int i, len; | 696 | int i, len, count, rates_len, supp_rates_len; |
677 | u16 capab; | 697 | u16 capab; |
678 | struct ieee80211_sta_bss *bss; | 698 | struct ieee80211_sta_bss *bss; |
679 | int wmm = 0; | 699 | int wmm = 0; |
680 | struct ieee80211_supported_band *sband; | 700 | struct ieee80211_supported_band *sband; |
701 | u64 rates = 0; | ||
681 | 702 | ||
682 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + | 703 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + |
683 | sizeof(*mgmt) + 200 + ifsta->extra_ie_len + | 704 | sizeof(*mgmt) + 200 + ifsta->extra_ie_len + |
@@ -740,24 +761,39 @@ static void ieee80211_send_assoc(struct net_device *dev, | |||
740 | *pos++ = ifsta->ssid_len; | 761 | *pos++ = ifsta->ssid_len; |
741 | memcpy(pos, ifsta->ssid, ifsta->ssid_len); | 762 | memcpy(pos, ifsta->ssid, ifsta->ssid_len); |
742 | 763 | ||
764 | /* all supported rates should be added here but some APs | ||
765 | * (e.g. D-Link DAP 1353 in b-only mode) don't like that | ||
766 | * Therefore only add rates the AP supports */ | ||
767 | rates_len = ieee80211_compatible_rates(bss, sband, &rates); | ||
768 | supp_rates_len = rates_len; | ||
769 | if (supp_rates_len > 8) | ||
770 | supp_rates_len = 8; | ||
771 | |||
743 | len = sband->n_bitrates; | 772 | len = sband->n_bitrates; |
744 | if (len > 8) | 773 | pos = skb_put(skb, supp_rates_len + 2); |
745 | len = 8; | ||
746 | pos = skb_put(skb, len + 2); | ||
747 | *pos++ = WLAN_EID_SUPP_RATES; | 774 | *pos++ = WLAN_EID_SUPP_RATES; |
748 | *pos++ = len; | 775 | *pos++ = supp_rates_len; |
749 | for (i = 0; i < len; i++) { | ||
750 | int rate = sband->bitrates[i].bitrate; | ||
751 | *pos++ = (u8) (rate / 5); | ||
752 | } | ||
753 | 776 | ||
754 | if (sband->n_bitrates > len) { | 777 | count = 0; |
755 | pos = skb_put(skb, sband->n_bitrates - len + 2); | 778 | for (i = 0; i < sband->n_bitrates; i++) { |
756 | *pos++ = WLAN_EID_EXT_SUPP_RATES; | 779 | if (BIT(i) & rates) { |
757 | *pos++ = sband->n_bitrates - len; | ||
758 | for (i = len; i < sband->n_bitrates; i++) { | ||
759 | int rate = sband->bitrates[i].bitrate; | 780 | int rate = sband->bitrates[i].bitrate; |
760 | *pos++ = (u8) (rate / 5); | 781 | *pos++ = (u8) (rate / 5); |
782 | if (++count == 8) | ||
783 | break; | ||
784 | } | ||
785 | } | ||
786 | |||
787 | if (count == 8) { | ||
788 | pos = skb_put(skb, rates_len - count + 2); | ||
789 | *pos++ = WLAN_EID_EXT_SUPP_RATES; | ||
790 | *pos++ = rates_len - count; | ||
791 | |||
792 | for (i++; i < sband->n_bitrates; i++) { | ||
793 | if (BIT(i) & rates) { | ||
794 | int rate = sband->bitrates[i].bitrate; | ||
795 | *pos++ = (u8) (rate / 5); | ||
796 | } | ||
761 | } | 797 | } |
762 | } | 798 | } |
763 | 799 | ||
diff --git a/net/mac80211/rc80211_pid_debugfs.c b/net/mac80211/rc80211_pid_debugfs.c index ae75d4178739..ff5c380f3c13 100644 --- a/net/mac80211/rc80211_pid_debugfs.c +++ b/net/mac80211/rc80211_pid_debugfs.c | |||
@@ -85,7 +85,7 @@ static int rate_control_pid_events_open(struct inode *inode, struct file *file) | |||
85 | struct rc_pid_sta_info *sinfo = inode->i_private; | 85 | struct rc_pid_sta_info *sinfo = inode->i_private; |
86 | struct rc_pid_event_buffer *events = &sinfo->events; | 86 | struct rc_pid_event_buffer *events = &sinfo->events; |
87 | struct rc_pid_events_file_info *file_info; | 87 | struct rc_pid_events_file_info *file_info; |
88 | unsigned int status; | 88 | unsigned long status; |
89 | 89 | ||
90 | /* Allocate a state struct */ | 90 | /* Allocate a state struct */ |
91 | file_info = kmalloc(sizeof(*file_info), GFP_KERNEL); | 91 | file_info = kmalloc(sizeof(*file_info), GFP_KERNEL); |
@@ -135,7 +135,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf, | |||
135 | char pb[RC_PID_PRINT_BUF_SIZE]; | 135 | char pb[RC_PID_PRINT_BUF_SIZE]; |
136 | int ret; | 136 | int ret; |
137 | int p; | 137 | int p; |
138 | unsigned int status; | 138 | unsigned long status; |
139 | 139 | ||
140 | /* Check if there is something to read. */ | 140 | /* Check if there is something to read. */ |
141 | if (events->next_entry == file_info->next_entry) { | 141 | if (events->next_entry == file_info->next_entry) { |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 02f436a86061..1958bfb361c6 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1305,11 +1305,11 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx) | |||
1305 | if (is_multicast_ether_addr(skb->data)) { | 1305 | if (is_multicast_ether_addr(skb->data)) { |
1306 | if (*mesh_ttl > 0) { | 1306 | if (*mesh_ttl > 0) { |
1307 | xmit_skb = skb_copy(skb, GFP_ATOMIC); | 1307 | xmit_skb = skb_copy(skb, GFP_ATOMIC); |
1308 | if (!xmit_skb && net_ratelimit()) | 1308 | if (xmit_skb) |
1309 | xmit_skb->pkt_type = PACKET_OTHERHOST; | ||
1310 | else if (net_ratelimit()) | ||
1309 | printk(KERN_DEBUG "%s: failed to clone " | 1311 | printk(KERN_DEBUG "%s: failed to clone " |
1310 | "multicast frame\n", dev->name); | 1312 | "multicast frame\n", dev->name); |
1311 | else | ||
1312 | xmit_skb->pkt_type = PACKET_OTHERHOST; | ||
1313 | } else | 1313 | } else |
1314 | IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.sta, | 1314 | IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.sta, |
1315 | dropped_frames_ttl); | 1315 | dropped_frames_ttl); |
@@ -1395,7 +1395,7 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx) | |||
1395 | padding = ((4 - subframe_len) & 0x3); | 1395 | padding = ((4 - subframe_len) & 0x3); |
1396 | /* the last MSDU has no padding */ | 1396 | /* the last MSDU has no padding */ |
1397 | if (subframe_len > remaining) { | 1397 | if (subframe_len > remaining) { |
1398 | printk(KERN_DEBUG "%s: wrong buffer size", dev->name); | 1398 | printk(KERN_DEBUG "%s: wrong buffer size\n", dev->name); |
1399 | return RX_DROP_UNUSABLE; | 1399 | return RX_DROP_UNUSABLE; |
1400 | } | 1400 | } |
1401 | 1401 | ||
@@ -1418,7 +1418,7 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx) | |||
1418 | eth = (struct ethhdr *) skb_pull(skb, ntohs(len) + | 1418 | eth = (struct ethhdr *) skb_pull(skb, ntohs(len) + |
1419 | padding); | 1419 | padding); |
1420 | if (!eth) { | 1420 | if (!eth) { |
1421 | printk(KERN_DEBUG "%s: wrong buffer size ", | 1421 | printk(KERN_DEBUG "%s: wrong buffer size\n", |
1422 | dev->name); | 1422 | dev->name); |
1423 | dev_kfree_skb(frame); | 1423 | dev_kfree_skb(frame); |
1424 | return RX_DROP_UNUSABLE; | 1424 | return RX_DROP_UNUSABLE; |
@@ -1952,7 +1952,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | |||
1952 | if (!skb_new) { | 1952 | if (!skb_new) { |
1953 | if (net_ratelimit()) | 1953 | if (net_ratelimit()) |
1954 | printk(KERN_DEBUG "%s: failed to copy " | 1954 | printk(KERN_DEBUG "%s: failed to copy " |
1955 | "multicast frame for %s", | 1955 | "multicast frame for %s\n", |
1956 | wiphy_name(local->hw.wiphy), | 1956 | wiphy_name(local->hw.wiphy), |
1957 | prev->dev->name); | 1957 | prev->dev->name); |
1958 | continue; | 1958 | continue; |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index f35eaea98e73..28d8bd53bd3a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1898,6 +1898,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
1898 | control->flags |= IEEE80211_TXCTL_SHORT_PREAMBLE; | 1898 | control->flags |= IEEE80211_TXCTL_SHORT_PREAMBLE; |
1899 | control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; | 1899 | control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; |
1900 | control->flags |= IEEE80211_TXCTL_NO_ACK; | 1900 | control->flags |= IEEE80211_TXCTL_NO_ACK; |
1901 | control->flags |= IEEE80211_TXCTL_DO_NOT_ENCRYPT; | ||
1901 | control->retry_limit = 1; | 1902 | control->retry_limit = 1; |
1902 | control->flags |= IEEE80211_TXCTL_CLEAR_PS_FILT; | 1903 | control->flags |= IEEE80211_TXCTL_CLEAR_PS_FILT; |
1903 | } | 1904 | } |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index cc9f715c7bfc..24a465c4df09 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -153,15 +153,15 @@ int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr) | |||
153 | /* 7.1.3.5a.2 */ | 153 | /* 7.1.3.5a.2 */ |
154 | switch (ae) { | 154 | switch (ae) { |
155 | case 0: | 155 | case 0: |
156 | return 5; | 156 | return 6; |
157 | case 1: | 157 | case 1: |
158 | return 11; | 158 | return 12; |
159 | case 2: | 159 | case 2: |
160 | return 17; | 160 | return 18; |
161 | case 3: | 161 | case 3: |
162 | return 23; | 162 | return 24; |
163 | default: | 163 | default: |
164 | return 5; | 164 | return 6; |
165 | } | 165 | } |
166 | } | 166 | } |
167 | 167 | ||
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 64faa3dc488f..dc1598b86004 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
@@ -394,7 +394,8 @@ static int wme_qdiscop_init(struct Qdisc *qd, struct nlattr *opt) | |||
394 | qd->handle); | 394 | qd->handle); |
395 | if (!q->queues[i]) { | 395 | if (!q->queues[i]) { |
396 | q->queues[i] = &noop_qdisc; | 396 | q->queues[i] = &noop_qdisc; |
397 | printk(KERN_ERR "%s child qdisc %i creation failed", dev->name, i); | 397 | printk(KERN_ERR "%s child qdisc %i creation failed\n", |
398 | dev->name, i); | ||
398 | } | 399 | } |
399 | } | 400 | } |
400 | 401 | ||