diff options
-rw-r--r-- | drivers/net/wireless/airo.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_hw.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 2 | ||||
-rw-r--r-- | include/net/mac80211.h | 25 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 14 | ||||
-rw-r--r-- | net/mac80211/util.c | 37 |
7 files changed, 73 insertions, 18 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 45f47c1c0a35..4e1c690ff45f 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -2668,6 +2668,7 @@ static struct net_device *init_wifidev(struct airo_info *ai, | |||
2668 | dev->irq = ethdev->irq; | 2668 | dev->irq = ethdev->irq; |
2669 | dev->base_addr = ethdev->base_addr; | 2669 | dev->base_addr = ethdev->base_addr; |
2670 | dev->wireless_data = ethdev->wireless_data; | 2670 | dev->wireless_data = ethdev->wireless_data; |
2671 | SET_NETDEV_DEV(dev, ethdev->dev.parent); | ||
2671 | memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len); | 2672 | memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len); |
2672 | err = register_netdev(dev); | 2673 | err = register_netdev(dev); |
2673 | if (err<0) { | 2674 | if (err<0) { |
@@ -2904,7 +2905,7 @@ EXPORT_SYMBOL(init_airo_card); | |||
2904 | 2905 | ||
2905 | static int waitbusy (struct airo_info *ai) { | 2906 | static int waitbusy (struct airo_info *ai) { |
2906 | int delay = 0; | 2907 | int delay = 0; |
2907 | while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) & (delay < 10000)) { | 2908 | while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) && (delay < 10000)) { |
2908 | udelay (10); | 2909 | udelay (10); |
2909 | if ((++delay % 20) == 0) | 2910 | if ((++delay % 20) == 0) |
2910 | OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); | 2911 | OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index 7be68db6f300..cdf90c40f11b 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -3276,11 +3276,6 @@ while (0) | |||
3276 | } | 3276 | } |
3277 | printk(KERN_INFO "%s: Registered netdevice %s\n", dev_info, dev->name); | 3277 | printk(KERN_INFO "%s: Registered netdevice %s\n", dev_info, dev->name); |
3278 | 3278 | ||
3279 | #ifndef PRISM2_NO_PROCFS_DEBUG | ||
3280 | create_proc_read_entry("registers", 0, local->proc, | ||
3281 | prism2_registers_proc_read, local); | ||
3282 | #endif /* PRISM2_NO_PROCFS_DEBUG */ | ||
3283 | |||
3284 | hostap_init_data(local); | 3279 | hostap_init_data(local); |
3285 | return dev; | 3280 | return dev; |
3286 | 3281 | ||
@@ -3307,6 +3302,10 @@ static int hostap_hw_ready(struct net_device *dev) | |||
3307 | netif_carrier_off(local->ddev); | 3302 | netif_carrier_off(local->ddev); |
3308 | } | 3303 | } |
3309 | hostap_init_proc(local); | 3304 | hostap_init_proc(local); |
3305 | #ifndef PRISM2_NO_PROCFS_DEBUG | ||
3306 | create_proc_read_entry("registers", 0, local->proc, | ||
3307 | prism2_registers_proc_read, local); | ||
3308 | #endif /* PRISM2_NO_PROCFS_DEBUG */ | ||
3310 | hostap_init_ap_proc(local); | 3309 | hostap_init_ap_proc(local); |
3311 | return 0; | 3310 | return 0; |
3312 | } | 3311 | } |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index fa87c5c2ae0b..d74c061994ae 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -11584,6 +11584,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv) | |||
11584 | priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit; | 11584 | priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit; |
11585 | 11585 | ||
11586 | priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; | 11586 | priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; |
11587 | SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev); | ||
11587 | 11588 | ||
11588 | rc = register_netdev(priv->prom_net_dev); | 11589 | rc = register_netdev(priv->prom_net_dev); |
11589 | if (rc) { | 11590 | if (rc) { |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 406f54d40956..e1f066068590 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -756,6 +756,7 @@ static int lbs_thread(void *data) | |||
756 | priv->nr_retries = 0; | 756 | priv->nr_retries = 0; |
757 | } else { | 757 | } else { |
758 | priv->cur_cmd = NULL; | 758 | priv->cur_cmd = NULL; |
759 | priv->dnld_sent = DNLD_RES_RECEIVED; | ||
759 | lbs_pr_info("requeueing command %x due to timeout (#%d)\n", | 760 | lbs_pr_info("requeueing command %x due to timeout (#%d)\n", |
760 | le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries); | 761 | le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries); |
761 | 762 | ||
@@ -1564,6 +1565,7 @@ static int lbs_add_rtap(struct lbs_private *priv) | |||
1564 | rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; | 1565 | rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; |
1565 | rtap_dev->set_multicast_list = lbs_set_multicast_list; | 1566 | rtap_dev->set_multicast_list = lbs_set_multicast_list; |
1566 | rtap_dev->priv = priv; | 1567 | rtap_dev->priv = priv; |
1568 | SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent); | ||
1567 | 1569 | ||
1568 | ret = register_netdev(rtap_dev); | 1570 | ret = register_netdev(rtap_dev); |
1569 | if (ret) { | 1571 | if (ret) { |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 4a80d74975e8..dae3f9ec1154 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1594,13 +1594,16 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw); | |||
1594 | void ieee80211_scan_completed(struct ieee80211_hw *hw); | 1594 | void ieee80211_scan_completed(struct ieee80211_hw *hw); |
1595 | 1595 | ||
1596 | /** | 1596 | /** |
1597 | * ieee80211_iterate_active_interfaces - iterate active interfaces | 1597 | * ieee80211_iterate_active_interfaces- iterate active interfaces |
1598 | * | 1598 | * |
1599 | * This function iterates over the interfaces associated with a given | 1599 | * This function iterates over the interfaces associated with a given |
1600 | * hardware that are currently active and calls the callback for them. | 1600 | * hardware that are currently active and calls the callback for them. |
1601 | * This function allows the iterator function to sleep, when the iterator | ||
1602 | * function is atomic @ieee80211_iterate_active_interfaces_atomic can | ||
1603 | * be used. | ||
1601 | * | 1604 | * |
1602 | * @hw: the hardware struct of which the interfaces should be iterated over | 1605 | * @hw: the hardware struct of which the interfaces should be iterated over |
1603 | * @iterator: the iterator function to call, cannot sleep | 1606 | * @iterator: the iterator function to call |
1604 | * @data: first argument of the iterator function | 1607 | * @data: first argument of the iterator function |
1605 | */ | 1608 | */ |
1606 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | 1609 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, |
@@ -1609,6 +1612,24 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | |||
1609 | void *data); | 1612 | void *data); |
1610 | 1613 | ||
1611 | /** | 1614 | /** |
1615 | * ieee80211_iterate_active_interfaces_atomic - iterate active interfaces | ||
1616 | * | ||
1617 | * This function iterates over the interfaces associated with a given | ||
1618 | * hardware that are currently active and calls the callback for them. | ||
1619 | * This function requires the iterator callback function to be atomic, | ||
1620 | * if that is not desired, use @ieee80211_iterate_active_interfaces instead. | ||
1621 | * | ||
1622 | * @hw: the hardware struct of which the interfaces should be iterated over | ||
1623 | * @iterator: the iterator function to call, cannot sleep | ||
1624 | * @data: first argument of the iterator function | ||
1625 | */ | ||
1626 | void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, | ||
1627 | void (*iterator)(void *data, | ||
1628 | u8 *mac, | ||
1629 | struct ieee80211_vif *vif), | ||
1630 | void *data); | ||
1631 | |||
1632 | /** | ||
1612 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. | 1633 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. |
1613 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 1634 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1614 | * @ra: receiver address of the BA session recipient | 1635 | * @ra: receiver address of the BA session recipient |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4adba09e80ca..e470bf12b765 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3446,21 +3446,17 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
3446 | struct ieee80211_sta_bss *bss, *selected = NULL; | 3446 | struct ieee80211_sta_bss *bss, *selected = NULL; |
3447 | int top_rssi = 0, freq; | 3447 | int top_rssi = 0, freq; |
3448 | 3448 | ||
3449 | if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | | ||
3450 | IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) { | ||
3451 | ifsta->state = IEEE80211_AUTHENTICATE; | ||
3452 | ieee80211_sta_reset_auth(dev, ifsta); | ||
3453 | return 0; | ||
3454 | } | ||
3455 | |||
3456 | spin_lock_bh(&local->sta_bss_lock); | 3449 | spin_lock_bh(&local->sta_bss_lock); |
3457 | freq = local->oper_channel->center_freq; | 3450 | freq = local->oper_channel->center_freq; |
3458 | list_for_each_entry(bss, &local->sta_bss_list, list) { | 3451 | list_for_each_entry(bss, &local->sta_bss_list, list) { |
3459 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) | 3452 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) |
3460 | continue; | 3453 | continue; |
3461 | 3454 | ||
3462 | if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | 3455 | if ((ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | |
3463 | !!sdata->default_key) | 3456 | IEEE80211_STA_AUTO_BSSID_SEL | |
3457 | IEEE80211_STA_AUTO_CHANNEL_SEL)) && | ||
3458 | (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | ||
3459 | !!sdata->default_key)) | ||
3464 | continue; | 3460 | continue; |
3465 | 3461 | ||
3466 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && | 3462 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 24a465c4df09..131e9e6c8a32 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -389,6 +389,41 @@ void ieee80211_iterate_active_interfaces( | |||
389 | struct ieee80211_local *local = hw_to_local(hw); | 389 | struct ieee80211_local *local = hw_to_local(hw); |
390 | struct ieee80211_sub_if_data *sdata; | 390 | struct ieee80211_sub_if_data *sdata; |
391 | 391 | ||
392 | rtnl_lock(); | ||
393 | |||
394 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
395 | switch (sdata->vif.type) { | ||
396 | case IEEE80211_IF_TYPE_INVALID: | ||
397 | case IEEE80211_IF_TYPE_MNTR: | ||
398 | case IEEE80211_IF_TYPE_VLAN: | ||
399 | continue; | ||
400 | case IEEE80211_IF_TYPE_AP: | ||
401 | case IEEE80211_IF_TYPE_STA: | ||
402 | case IEEE80211_IF_TYPE_IBSS: | ||
403 | case IEEE80211_IF_TYPE_WDS: | ||
404 | case IEEE80211_IF_TYPE_MESH_POINT: | ||
405 | break; | ||
406 | } | ||
407 | if (sdata->dev == local->mdev) | ||
408 | continue; | ||
409 | if (netif_running(sdata->dev)) | ||
410 | iterator(data, sdata->dev->dev_addr, | ||
411 | &sdata->vif); | ||
412 | } | ||
413 | |||
414 | rtnl_unlock(); | ||
415 | } | ||
416 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | ||
417 | |||
418 | void ieee80211_iterate_active_interfaces_atomic( | ||
419 | struct ieee80211_hw *hw, | ||
420 | void (*iterator)(void *data, u8 *mac, | ||
421 | struct ieee80211_vif *vif), | ||
422 | void *data) | ||
423 | { | ||
424 | struct ieee80211_local *local = hw_to_local(hw); | ||
425 | struct ieee80211_sub_if_data *sdata; | ||
426 | |||
392 | rcu_read_lock(); | 427 | rcu_read_lock(); |
393 | 428 | ||
394 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 429 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { |
@@ -413,4 +448,4 @@ void ieee80211_iterate_active_interfaces( | |||
413 | 448 | ||
414 | rcu_read_unlock(); | 449 | rcu_read_unlock(); |
415 | } | 450 | } |
416 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | 451 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); |