diff options
| author | John W. Linville <linville@tuxdriver.com> | 2011-09-20 09:19:14 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2011-09-20 09:19:14 -0400 |
| commit | eebb6fb4ae2f60a82e38afb6d8b373a4216bf891 (patch) | |
| tree | b87cbdea36983870d767c89d0a0df0f3d8229779 | |
| parent | 9d037a777695993ec7437e5f451647dea7919d4c (diff) | |
| parent | 8c23516fbb209ccf8f8c36268311c721faff29ee (diff) | |
Merge branch 'master' of ssh://infradead/~/public_git/wireless into for-davem
| -rw-r--r-- | drivers/bluetooth/btusb.c | 6 | ||||
| -rw-r--r-- | drivers/bluetooth/btwilink.c | 16 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/main.c | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2100.c | 21 | ||||
| -rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 39 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 5 | ||||
| -rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 47 | ||||
| -rw-r--r-- | net/bluetooth/hci_event.c | 17 | ||||
| -rw-r--r-- | net/wireless/reg.c | 1 | ||||
| -rw-r--r-- | net/wireless/sme.c | 2 |
10 files changed, 98 insertions, 59 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 3ef476070baf..9cbac6b445e1 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
| @@ -72,9 +72,15 @@ static struct usb_device_id btusb_table[] = { | |||
| 72 | /* Apple MacBookAir3,1, MacBookAir3,2 */ | 72 | /* Apple MacBookAir3,1, MacBookAir3,2 */ |
| 73 | { USB_DEVICE(0x05ac, 0x821b) }, | 73 | { USB_DEVICE(0x05ac, 0x821b) }, |
| 74 | 74 | ||
| 75 | /* Apple MacBookAir4,1 */ | ||
| 76 | { USB_DEVICE(0x05ac, 0x821f) }, | ||
| 77 | |||
| 75 | /* Apple MacBookPro8,2 */ | 78 | /* Apple MacBookPro8,2 */ |
| 76 | { USB_DEVICE(0x05ac, 0x821a) }, | 79 | { USB_DEVICE(0x05ac, 0x821a) }, |
| 77 | 80 | ||
| 81 | /* Apple MacMini5,1 */ | ||
| 82 | { USB_DEVICE(0x05ac, 0x8281) }, | ||
| 83 | |||
| 78 | /* AVM BlueFRITZ! USB v2.0 */ | 84 | /* AVM BlueFRITZ! USB v2.0 */ |
| 79 | { USB_DEVICE(0x057c, 0x3800) }, | 85 | { USB_DEVICE(0x057c, 0x3800) }, |
| 80 | 86 | ||
diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c index 65d27aff553a..04d353f58d71 100644 --- a/drivers/bluetooth/btwilink.c +++ b/drivers/bluetooth/btwilink.c | |||
| @@ -125,6 +125,13 @@ static long st_receive(void *priv_data, struct sk_buff *skb) | |||
| 125 | /* protocol structure registered with shared transport */ | 125 | /* protocol structure registered with shared transport */ |
| 126 | static struct st_proto_s ti_st_proto[MAX_BT_CHNL_IDS] = { | 126 | static struct st_proto_s ti_st_proto[MAX_BT_CHNL_IDS] = { |
| 127 | { | 127 | { |
| 128 | .chnl_id = HCI_EVENT_PKT, /* HCI Events */ | ||
| 129 | .hdr_len = sizeof(struct hci_event_hdr), | ||
| 130 | .offset_len_in_hdr = offsetof(struct hci_event_hdr, plen), | ||
| 131 | .len_size = 1, /* sizeof(plen) in struct hci_event_hdr */ | ||
| 132 | .reserve = 8, | ||
| 133 | }, | ||
| 134 | { | ||
| 128 | .chnl_id = HCI_ACLDATA_PKT, /* ACL */ | 135 | .chnl_id = HCI_ACLDATA_PKT, /* ACL */ |
| 129 | .hdr_len = sizeof(struct hci_acl_hdr), | 136 | .hdr_len = sizeof(struct hci_acl_hdr), |
| 130 | .offset_len_in_hdr = offsetof(struct hci_acl_hdr, dlen), | 137 | .offset_len_in_hdr = offsetof(struct hci_acl_hdr, dlen), |
| @@ -138,13 +145,6 @@ static struct st_proto_s ti_st_proto[MAX_BT_CHNL_IDS] = { | |||
| 138 | .len_size = 1, /* sizeof(dlen) in struct hci_sco_hdr */ | 145 | .len_size = 1, /* sizeof(dlen) in struct hci_sco_hdr */ |
| 139 | .reserve = 8, | 146 | .reserve = 8, |
| 140 | }, | 147 | }, |
| 141 | { | ||
| 142 | .chnl_id = HCI_EVENT_PKT, /* HCI Events */ | ||
| 143 | .hdr_len = sizeof(struct hci_event_hdr), | ||
| 144 | .offset_len_in_hdr = offsetof(struct hci_event_hdr, plen), | ||
| 145 | .len_size = 1, /* sizeof(plen) in struct hci_event_hdr */ | ||
| 146 | .reserve = 8, | ||
| 147 | }, | ||
| 148 | }; | 148 | }; |
| 149 | 149 | ||
| 150 | /* Called from HCI core to initialize the device */ | 150 | /* Called from HCI core to initialize the device */ |
| @@ -240,7 +240,7 @@ static int ti_st_close(struct hci_dev *hdev) | |||
| 240 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) | 240 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) |
| 241 | return 0; | 241 | return 0; |
| 242 | 242 | ||
| 243 | for (i = 0; i < MAX_BT_CHNL_IDS; i++) { | 243 | for (i = MAX_BT_CHNL_IDS-1; i >= 0; i--) { |
| 244 | err = st_unregister(&ti_st_proto[i]); | 244 | err = st_unregister(&ti_st_proto[i]); |
| 245 | if (err) | 245 | if (err) |
| 246 | BT_ERR("st_unregister(%d) failed with error %d", | 246 | BT_ERR("st_unregister(%d) failed with error %d", |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 26f1ab840cc7..e293a7921bf0 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -1632,7 +1632,8 @@ static void handle_irq_beacon(struct b43_wldev *dev) | |||
| 1632 | u32 cmd, beacon0_valid, beacon1_valid; | 1632 | u32 cmd, beacon0_valid, beacon1_valid; |
| 1633 | 1633 | ||
| 1634 | if (!b43_is_mode(wl, NL80211_IFTYPE_AP) && | 1634 | if (!b43_is_mode(wl, NL80211_IFTYPE_AP) && |
| 1635 | !b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT)) | 1635 | !b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT) && |
| 1636 | !b43_is_mode(wl, NL80211_IFTYPE_ADHOC)) | ||
| 1636 | return; | 1637 | return; |
| 1637 | 1638 | ||
| 1638 | /* This is the bottom half of the asynchronous beacon update. */ | 1639 | /* This is the bottom half of the asynchronous beacon update. */ |
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 3774dd034746..ef9ad79d1bfd 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
| @@ -1903,15 +1903,17 @@ static void ipw2100_down(struct ipw2100_priv *priv) | |||
| 1903 | static int ipw2100_net_init(struct net_device *dev) | 1903 | static int ipw2100_net_init(struct net_device *dev) |
| 1904 | { | 1904 | { |
| 1905 | struct ipw2100_priv *priv = libipw_priv(dev); | 1905 | struct ipw2100_priv *priv = libipw_priv(dev); |
| 1906 | |||
| 1907 | return ipw2100_up(priv, 1); | ||
| 1908 | } | ||
| 1909 | |||
| 1910 | static int ipw2100_wdev_init(struct net_device *dev) | ||
| 1911 | { | ||
| 1912 | struct ipw2100_priv *priv = libipw_priv(dev); | ||
| 1906 | const struct libipw_geo *geo = libipw_get_geo(priv->ieee); | 1913 | const struct libipw_geo *geo = libipw_get_geo(priv->ieee); |
| 1907 | struct wireless_dev *wdev = &priv->ieee->wdev; | 1914 | struct wireless_dev *wdev = &priv->ieee->wdev; |
| 1908 | int ret; | ||
| 1909 | int i; | 1915 | int i; |
| 1910 | 1916 | ||
| 1911 | ret = ipw2100_up(priv, 1); | ||
| 1912 | if (ret) | ||
| 1913 | return ret; | ||
| 1914 | |||
| 1915 | memcpy(wdev->wiphy->perm_addr, priv->mac_addr, ETH_ALEN); | 1917 | memcpy(wdev->wiphy->perm_addr, priv->mac_addr, ETH_ALEN); |
| 1916 | 1918 | ||
| 1917 | /* fill-out priv->ieee->bg_band */ | 1919 | /* fill-out priv->ieee->bg_band */ |
| @@ -6350,9 +6352,13 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, | |||
| 6350 | "Error calling register_netdev.\n"); | 6352 | "Error calling register_netdev.\n"); |
| 6351 | goto fail; | 6353 | goto fail; |
| 6352 | } | 6354 | } |
| 6355 | registered = 1; | ||
| 6356 | |||
| 6357 | err = ipw2100_wdev_init(dev); | ||
| 6358 | if (err) | ||
| 6359 | goto fail; | ||
| 6353 | 6360 | ||
| 6354 | mutex_lock(&priv->action_mutex); | 6361 | mutex_lock(&priv->action_mutex); |
| 6355 | registered = 1; | ||
| 6356 | 6362 | ||
| 6357 | IPW_DEBUG_INFO("%s: Bound to %s\n", dev->name, pci_name(pci_dev)); | 6363 | IPW_DEBUG_INFO("%s: Bound to %s\n", dev->name, pci_name(pci_dev)); |
| 6358 | 6364 | ||
| @@ -6389,7 +6395,8 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, | |||
| 6389 | 6395 | ||
| 6390 | fail_unlock: | 6396 | fail_unlock: |
| 6391 | mutex_unlock(&priv->action_mutex); | 6397 | mutex_unlock(&priv->action_mutex); |
| 6392 | 6398 | wiphy_unregister(priv->ieee->wdev.wiphy); | |
| 6399 | kfree(priv->ieee->bg_band.channels); | ||
| 6393 | fail: | 6400 | fail: |
| 6394 | if (dev) { | 6401 | if (dev) { |
| 6395 | if (registered) | 6402 | if (registered) |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 87813c33bdc2..4ffebede5e03 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
| @@ -11425,16 +11425,23 @@ static void ipw_bg_down(struct work_struct *work) | |||
| 11425 | /* Called by register_netdev() */ | 11425 | /* Called by register_netdev() */ |
| 11426 | static int ipw_net_init(struct net_device *dev) | 11426 | static int ipw_net_init(struct net_device *dev) |
| 11427 | { | 11427 | { |
| 11428 | int rc = 0; | ||
| 11429 | struct ipw_priv *priv = libipw_priv(dev); | ||
| 11430 | |||
| 11431 | mutex_lock(&priv->mutex); | ||
| 11432 | if (ipw_up(priv)) | ||
| 11433 | rc = -EIO; | ||
| 11434 | mutex_unlock(&priv->mutex); | ||
| 11435 | |||
| 11436 | return rc; | ||
| 11437 | } | ||
| 11438 | |||
| 11439 | static int ipw_wdev_init(struct net_device *dev) | ||
| 11440 | { | ||
| 11428 | int i, rc = 0; | 11441 | int i, rc = 0; |
| 11429 | struct ipw_priv *priv = libipw_priv(dev); | 11442 | struct ipw_priv *priv = libipw_priv(dev); |
| 11430 | const struct libipw_geo *geo = libipw_get_geo(priv->ieee); | 11443 | const struct libipw_geo *geo = libipw_get_geo(priv->ieee); |
| 11431 | struct wireless_dev *wdev = &priv->ieee->wdev; | 11444 | struct wireless_dev *wdev = &priv->ieee->wdev; |
| 11432 | mutex_lock(&priv->mutex); | ||
| 11433 | |||
| 11434 | if (ipw_up(priv)) { | ||
| 11435 | rc = -EIO; | ||
| 11436 | goto out; | ||
| 11437 | } | ||
| 11438 | 11445 | ||
| 11439 | memcpy(wdev->wiphy->perm_addr, priv->mac_addr, ETH_ALEN); | 11446 | memcpy(wdev->wiphy->perm_addr, priv->mac_addr, ETH_ALEN); |
| 11440 | 11447 | ||
| @@ -11519,13 +11526,9 @@ static int ipw_net_init(struct net_device *dev) | |||
| 11519 | set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev); | 11526 | set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev); |
| 11520 | 11527 | ||
| 11521 | /* With that information in place, we can now register the wiphy... */ | 11528 | /* With that information in place, we can now register the wiphy... */ |
| 11522 | if (wiphy_register(wdev->wiphy)) { | 11529 | if (wiphy_register(wdev->wiphy)) |
| 11523 | rc = -EIO; | 11530 | rc = -EIO; |
| 11524 | goto out; | ||
| 11525 | } | ||
| 11526 | |||
| 11527 | out: | 11531 | out: |
| 11528 | mutex_unlock(&priv->mutex); | ||
| 11529 | return rc; | 11532 | return rc; |
| 11530 | } | 11533 | } |
| 11531 | 11534 | ||
| @@ -11832,14 +11835,22 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev, | |||
| 11832 | goto out_remove_sysfs; | 11835 | goto out_remove_sysfs; |
| 11833 | } | 11836 | } |
| 11834 | 11837 | ||
| 11838 | err = ipw_wdev_init(net_dev); | ||
| 11839 | if (err) { | ||
| 11840 | IPW_ERROR("failed to register wireless device\n"); | ||
| 11841 | goto out_unregister_netdev; | ||
| 11842 | } | ||
| 11843 | |||
| 11835 | #ifdef CONFIG_IPW2200_PROMISCUOUS | 11844 | #ifdef CONFIG_IPW2200_PROMISCUOUS |
| 11836 | if (rtap_iface) { | 11845 | if (rtap_iface) { |
| 11837 | err = ipw_prom_alloc(priv); | 11846 | err = ipw_prom_alloc(priv); |
| 11838 | if (err) { | 11847 | if (err) { |
| 11839 | IPW_ERROR("Failed to register promiscuous network " | 11848 | IPW_ERROR("Failed to register promiscuous network " |
| 11840 | "device (error %d).\n", err); | 11849 | "device (error %d).\n", err); |
| 11841 | unregister_netdev(priv->net_dev); | 11850 | wiphy_unregister(priv->ieee->wdev.wiphy); |
| 11842 | goto out_remove_sysfs; | 11851 | kfree(priv->ieee->a_band.channels); |
| 11852 | kfree(priv->ieee->bg_band.channels); | ||
| 11853 | goto out_unregister_netdev; | ||
| 11843 | } | 11854 | } |
| 11844 | } | 11855 | } |
| 11845 | #endif | 11856 | #endif |
| @@ -11851,6 +11862,8 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev, | |||
| 11851 | 11862 | ||
| 11852 | return 0; | 11863 | return 0; |
| 11853 | 11864 | ||
| 11865 | out_unregister_netdev: | ||
| 11866 | unregister_netdev(priv->net_dev); | ||
| 11854 | out_remove_sysfs: | 11867 | out_remove_sysfs: |
| 11855 | sysfs_remove_group(&pdev->dev.kobj, &ipw_attribute_group); | 11868 | sysfs_remove_group(&pdev->dev.kobj, &ipw_attribute_group); |
| 11856 | out_release_irq: | 11869 | out_release_irq: |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index b0ae4de7f083..f9c3cd95d614 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
| @@ -2140,7 +2140,12 @@ static int iwl_mac_setup_register(struct iwl_priv *priv, | |||
| 2140 | IEEE80211_HW_SPECTRUM_MGMT | | 2140 | IEEE80211_HW_SPECTRUM_MGMT | |
| 2141 | IEEE80211_HW_REPORTS_TX_ACK_STATUS; | 2141 | IEEE80211_HW_REPORTS_TX_ACK_STATUS; |
| 2142 | 2142 | ||
| 2143 | /* | ||
| 2144 | * Including the following line will crash some AP's. This | ||
| 2145 | * workaround removes the stimulus which causes the crash until | ||
| 2146 | * the AP software can be fixed. | ||
| 2143 | hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF; | 2147 | hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF; |
| 2148 | */ | ||
| 2144 | 2149 | ||
| 2145 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | | 2150 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | |
| 2146 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; | 2151 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index ef67f6786a84..0019dfd8fb01 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
| @@ -3697,14 +3697,15 @@ static void rt2800_efuse_read(struct rt2x00_dev *rt2x00dev, unsigned int i) | |||
| 3697 | rt2800_regbusy_read(rt2x00dev, EFUSE_CTRL, EFUSE_CTRL_KICK, ®); | 3697 | rt2800_regbusy_read(rt2x00dev, EFUSE_CTRL, EFUSE_CTRL_KICK, ®); |
| 3698 | 3698 | ||
| 3699 | /* Apparently the data is read from end to start */ | 3699 | /* Apparently the data is read from end to start */ |
| 3700 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, | 3700 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, ®); |
| 3701 | (u32 *)&rt2x00dev->eeprom[i]); | 3701 | /* The returned value is in CPU order, but eeprom is le */ |
| 3702 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA2, | 3702 | rt2x00dev->eeprom[i] = cpu_to_le32(reg); |
| 3703 | (u32 *)&rt2x00dev->eeprom[i + 2]); | 3703 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA2, ®); |
| 3704 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA1, | 3704 | *(u32 *)&rt2x00dev->eeprom[i + 2] = cpu_to_le32(reg); |
| 3705 | (u32 *)&rt2x00dev->eeprom[i + 4]); | 3705 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA1, ®); |
| 3706 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA0, | 3706 | *(u32 *)&rt2x00dev->eeprom[i + 4] = cpu_to_le32(reg); |
| 3707 | (u32 *)&rt2x00dev->eeprom[i + 6]); | 3707 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA0, ®); |
| 3708 | *(u32 *)&rt2x00dev->eeprom[i + 6] = cpu_to_le32(reg); | ||
| 3708 | 3709 | ||
| 3709 | mutex_unlock(&rt2x00dev->csr_mutex); | 3710 | mutex_unlock(&rt2x00dev->csr_mutex); |
| 3710 | } | 3711 | } |
| @@ -3870,19 +3871,23 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
| 3870 | return -ENODEV; | 3871 | return -ENODEV; |
| 3871 | } | 3872 | } |
| 3872 | 3873 | ||
| 3873 | if (!rt2x00_rf(rt2x00dev, RF2820) && | 3874 | switch (rt2x00dev->chip.rf) { |
| 3874 | !rt2x00_rf(rt2x00dev, RF2850) && | 3875 | case RF2820: |
| 3875 | !rt2x00_rf(rt2x00dev, RF2720) && | 3876 | case RF2850: |
| 3876 | !rt2x00_rf(rt2x00dev, RF2750) && | 3877 | case RF2720: |
| 3877 | !rt2x00_rf(rt2x00dev, RF3020) && | 3878 | case RF2750: |
| 3878 | !rt2x00_rf(rt2x00dev, RF2020) && | 3879 | case RF3020: |
| 3879 | !rt2x00_rf(rt2x00dev, RF3021) && | 3880 | case RF2020: |
| 3880 | !rt2x00_rf(rt2x00dev, RF3022) && | 3881 | case RF3021: |
| 3881 | !rt2x00_rf(rt2x00dev, RF3052) && | 3882 | case RF3022: |
| 3882 | !rt2x00_rf(rt2x00dev, RF3320) && | 3883 | case RF3052: |
| 3883 | !rt2x00_rf(rt2x00dev, RF5370) && | 3884 | case RF3320: |
| 3884 | !rt2x00_rf(rt2x00dev, RF5390)) { | 3885 | case RF5370: |
| 3885 | ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); | 3886 | case RF5390: |
| 3887 | break; | ||
| 3888 | default: | ||
| 3889 | ERROR(rt2x00dev, "Invalid RF chipset 0x%x detected.\n", | ||
| 3890 | rt2x00dev->chip.rf); | ||
| 3886 | return -ENODEV; | 3891 | return -ENODEV; |
| 3887 | } | 3892 | } |
| 3888 | 3893 | ||
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index a40170e022e8..7ef4eb4435fb 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
| @@ -58,8 +58,8 @@ static void hci_cc_inquiry_cancel(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 58 | if (status) | 58 | if (status) |
| 59 | return; | 59 | return; |
| 60 | 60 | ||
| 61 | if (test_bit(HCI_MGMT, &hdev->flags) && | 61 | if (test_and_clear_bit(HCI_INQUIRY, &hdev->flags) && |
| 62 | test_and_clear_bit(HCI_INQUIRY, &hdev->flags)) | 62 | test_bit(HCI_MGMT, &hdev->flags)) |
| 63 | mgmt_discovering(hdev->id, 0); | 63 | mgmt_discovering(hdev->id, 0); |
| 64 | 64 | ||
| 65 | hci_req_complete(hdev, HCI_OP_INQUIRY_CANCEL, status); | 65 | hci_req_complete(hdev, HCI_OP_INQUIRY_CANCEL, status); |
| @@ -76,8 +76,8 @@ static void hci_cc_exit_periodic_inq(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 76 | if (status) | 76 | if (status) |
| 77 | return; | 77 | return; |
| 78 | 78 | ||
| 79 | if (test_bit(HCI_MGMT, &hdev->flags) && | 79 | if (test_and_clear_bit(HCI_INQUIRY, &hdev->flags) && |
| 80 | test_and_clear_bit(HCI_INQUIRY, &hdev->flags)) | 80 | test_bit(HCI_MGMT, &hdev->flags)) |
| 81 | mgmt_discovering(hdev->id, 0); | 81 | mgmt_discovering(hdev->id, 0); |
| 82 | 82 | ||
| 83 | hci_conn_check_pending(hdev); | 83 | hci_conn_check_pending(hdev); |
| @@ -959,9 +959,8 @@ static inline void hci_cs_inquiry(struct hci_dev *hdev, __u8 status) | |||
| 959 | return; | 959 | return; |
| 960 | } | 960 | } |
| 961 | 961 | ||
| 962 | if (test_bit(HCI_MGMT, &hdev->flags) && | 962 | if (!test_and_set_bit(HCI_INQUIRY, &hdev->flags) && |
| 963 | !test_and_set_bit(HCI_INQUIRY, | 963 | test_bit(HCI_MGMT, &hdev->flags)) |
| 964 | &hdev->flags)) | ||
| 965 | mgmt_discovering(hdev->id, 1); | 964 | mgmt_discovering(hdev->id, 1); |
| 966 | } | 965 | } |
| 967 | 966 | ||
| @@ -1340,8 +1339,8 @@ static inline void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff | |||
| 1340 | 1339 | ||
| 1341 | BT_DBG("%s status %d", hdev->name, status); | 1340 | BT_DBG("%s status %d", hdev->name, status); |
| 1342 | 1341 | ||
| 1343 | if (test_bit(HCI_MGMT, &hdev->flags) && | 1342 | if (test_and_clear_bit(HCI_INQUIRY, &hdev->flags) && |
| 1344 | test_and_clear_bit(HCI_INQUIRY, &hdev->flags)) | 1343 | test_bit(HCI_MGMT, &hdev->flags)) |
| 1345 | mgmt_discovering(hdev->id, 0); | 1344 | mgmt_discovering(hdev->id, 0); |
| 1346 | 1345 | ||
| 1347 | hci_req_complete(hdev, HCI_OP_INQUIRY, status); | 1346 | hci_req_complete(hdev, HCI_OP_INQUIRY, status); |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 02751dbc5a97..68a471ba193f 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
| @@ -852,6 +852,7 @@ static void handle_channel(struct wiphy *wiphy, | |||
| 852 | return; | 852 | return; |
| 853 | } | 853 | } |
| 854 | 854 | ||
| 855 | chan->beacon_found = false; | ||
| 855 | chan->flags = flags | bw_flags | map_regdom_flags(reg_rule->flags); | 856 | chan->flags = flags | bw_flags | map_regdom_flags(reg_rule->flags); |
| 856 | chan->max_antenna_gain = min(chan->orig_mag, | 857 | chan->max_antenna_gain = min(chan->orig_mag, |
| 857 | (int) MBI_TO_DBI(power_rule->max_antenna_gain)); | 858 | (int) MBI_TO_DBI(power_rule->max_antenna_gain)); |
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index b7b6ff8be553..dec0fa28372e 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
| @@ -118,6 +118,8 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) | |||
| 118 | i++, j++) | 118 | i++, j++) |
| 119 | request->channels[i] = | 119 | request->channels[i] = |
| 120 | &wdev->wiphy->bands[band]->channels[j]; | 120 | &wdev->wiphy->bands[band]->channels[j]; |
| 121 | request->rates[band] = | ||
| 122 | (1 << wdev->wiphy->bands[band]->n_bitrates) - 1; | ||
| 121 | } | 123 | } |
| 122 | } | 124 | } |
| 123 | request->n_channels = n_channels; | 125 | request->n_channels = n_channels; |
