Commit 07bfa524d4c67acbb6b6fbdd1dea923d07853c04
Exists in
master
and in
7 other branches
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Showing 9 changed files Side-by-side Diff
- drivers/net/wireless/ath/ath9k/eeprom_9287.c
- drivers/net/wireless/ath/ath9k/hif_usb.c
- drivers/net/wireless/ath/ath9k/htc_drv_init.c
- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
- drivers/net/wireless/ath/ath9k/init.c
- drivers/net/wireless/ath/ath9k/reg.h
- drivers/net/wireless/ath/carl9170/usb.c
- include/net/cfg80211.h
- net/wireless/chan.c
drivers/net/wireless/ath/ath9k/eeprom_9287.c
drivers/net/wireless/ath/ath9k/hif_usb.c
... | ... | @@ -36,8 +36,13 @@ |
36 | 36 | { USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */ |
37 | 37 | { USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */ |
38 | 38 | { USB_DEVICE(0x13D3, 0x3346) }, /* IMC Networks */ |
39 | + { USB_DEVICE(0x13D3, 0x3348) }, /* Azurewave */ | |
40 | + { USB_DEVICE(0x13D3, 0x3349) }, /* Azurewave */ | |
41 | + { USB_DEVICE(0x13D3, 0x3350) }, /* Azurewave */ | |
39 | 42 | { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ |
40 | 43 | { USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */ |
44 | + { USB_DEVICE(0x040D, 0x3801) }, /* VIA */ | |
45 | + { USB_DEVICE(0x1668, 0x1200) }, /* Verizon */ | |
41 | 46 | { }, |
42 | 47 | }; |
43 | 48 | |
... | ... | @@ -806,6 +811,8 @@ |
806 | 811 | case 0x7010: |
807 | 812 | case 0x7015: |
808 | 813 | case 0x9018: |
814 | + case 0xA704: | |
815 | + case 0x1200: | |
809 | 816 | firm_offset = AR7010_FIRMWARE_TEXT; |
810 | 817 | break; |
811 | 818 | default: |
... | ... | @@ -928,6 +935,8 @@ |
928 | 935 | case 0x7010: |
929 | 936 | case 0x7015: |
930 | 937 | case 0x9018: |
938 | + case 0xA704: | |
939 | + case 0x1200: | |
931 | 940 | if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202) |
932 | 941 | hif_dev->fw_name = FIRMWARE_AR7010_1_1; |
933 | 942 | else |
drivers/net/wireless/ath/ath9k/htc_drv_init.c
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
drivers/net/wireless/ath/ath9k/init.c
... | ... | @@ -817,8 +817,6 @@ |
817 | 817 | |
818 | 818 | ath9k_ps_wakeup(sc); |
819 | 819 | |
820 | - pm_qos_remove_request(&ath9k_pm_qos_req); | |
821 | - | |
822 | 820 | wiphy_rfkill_stop_polling(sc->hw->wiphy); |
823 | 821 | ath_deinit_leds(sc); |
824 | 822 | |
... | ... | @@ -832,6 +830,7 @@ |
832 | 830 | } |
833 | 831 | |
834 | 832 | ieee80211_unregister_hw(hw); |
833 | + pm_qos_remove_request(&ath9k_pm_qos_req); | |
835 | 834 | ath_rx_cleanup(sc); |
836 | 835 | ath_tx_cleanup(sc); |
837 | 836 | ath9k_deinit_softc(sc); |
drivers/net/wireless/ath/ath9k/reg.h
... | ... | @@ -866,7 +866,13 @@ |
866 | 866 | #define AR_DEVID_7010(_ah) \ |
867 | 867 | (((_ah)->hw_version.devid == 0x7010) || \ |
868 | 868 | ((_ah)->hw_version.devid == 0x7015) || \ |
869 | - ((_ah)->hw_version.devid == 0x9018)) | |
869 | + ((_ah)->hw_version.devid == 0x9018) || \ | |
870 | + ((_ah)->hw_version.devid == 0xA704) || \ | |
871 | + ((_ah)->hw_version.devid == 0x1200)) | |
872 | + | |
873 | +#define AR9287_HTC_DEVID(_ah) \ | |
874 | + (((_ah)->hw_version.devid == 0x7015) || \ | |
875 | + ((_ah)->hw_version.devid == 0x1200)) | |
870 | 876 | |
871 | 877 | #define AR_RADIO_SREV_MAJOR 0xf0 |
872 | 878 | #define AR_RAD5133_SREV_MAJOR 0xc0 |
drivers/net/wireless/ath/carl9170/usb.c
... | ... | @@ -553,12 +553,12 @@ |
553 | 553 | usb_free_urb(urb); |
554 | 554 | } |
555 | 555 | |
556 | - ret = usb_wait_anchor_empty_timeout(&ar->tx_cmd, HZ); | |
556 | + ret = usb_wait_anchor_empty_timeout(&ar->tx_cmd, 1000); | |
557 | 557 | if (ret == 0) |
558 | 558 | err = -ETIMEDOUT; |
559 | 559 | |
560 | 560 | /* lets wait a while until the tx - queues are dried out */ |
561 | - ret = usb_wait_anchor_empty_timeout(&ar->tx_anch, HZ); | |
561 | + ret = usb_wait_anchor_empty_timeout(&ar->tx_anch, 1000); | |
562 | 562 | if (ret == 0) |
563 | 563 | err = -ETIMEDOUT; |
564 | 564 |
include/net/cfg80211.h
net/wireless/chan.c
... | ... | @@ -44,6 +44,38 @@ |
44 | 44 | return chan; |
45 | 45 | } |
46 | 46 | |
47 | +static bool can_beacon_sec_chan(struct wiphy *wiphy, | |
48 | + struct ieee80211_channel *chan, | |
49 | + enum nl80211_channel_type channel_type) | |
50 | +{ | |
51 | + struct ieee80211_channel *sec_chan; | |
52 | + int diff; | |
53 | + | |
54 | + switch (channel_type) { | |
55 | + case NL80211_CHAN_HT40PLUS: | |
56 | + diff = 20; | |
57 | + break; | |
58 | + case NL80211_CHAN_HT40MINUS: | |
59 | + diff = -20; | |
60 | + break; | |
61 | + default: | |
62 | + return false; | |
63 | + } | |
64 | + | |
65 | + sec_chan = ieee80211_get_channel(wiphy, chan->center_freq + diff); | |
66 | + if (!sec_chan) | |
67 | + return false; | |
68 | + | |
69 | + /* we'll need a DFS capability later */ | |
70 | + if (sec_chan->flags & (IEEE80211_CHAN_DISABLED | | |
71 | + IEEE80211_CHAN_PASSIVE_SCAN | | |
72 | + IEEE80211_CHAN_NO_IBSS | | |
73 | + IEEE80211_CHAN_RADAR)) | |
74 | + return false; | |
75 | + | |
76 | + return true; | |
77 | +} | |
78 | + | |
47 | 79 | int cfg80211_set_freq(struct cfg80211_registered_device *rdev, |
48 | 80 | struct wireless_dev *wdev, int freq, |
49 | 81 | enum nl80211_channel_type channel_type) |
... | ... | @@ -67,6 +99,28 @@ |
67 | 99 | chan = rdev_freq_to_chan(rdev, freq, channel_type); |
68 | 100 | if (!chan) |
69 | 101 | return -EINVAL; |
102 | + | |
103 | + /* Both channels should be able to initiate communication */ | |
104 | + if (wdev && (wdev->iftype == NL80211_IFTYPE_ADHOC || | |
105 | + wdev->iftype == NL80211_IFTYPE_AP || | |
106 | + wdev->iftype == NL80211_IFTYPE_AP_VLAN || | |
107 | + wdev->iftype == NL80211_IFTYPE_MESH_POINT || | |
108 | + wdev->iftype == NL80211_IFTYPE_P2P_GO)) { | |
109 | + switch (channel_type) { | |
110 | + case NL80211_CHAN_HT40PLUS: | |
111 | + case NL80211_CHAN_HT40MINUS: | |
112 | + if (!can_beacon_sec_chan(&rdev->wiphy, chan, | |
113 | + channel_type)) { | |
114 | + printk(KERN_DEBUG | |
115 | + "cfg80211: Secondary channel not " | |
116 | + "allowed to initiate communication\n"); | |
117 | + return -EINVAL; | |
118 | + } | |
119 | + break; | |
120 | + default: | |
121 | + break; | |
122 | + } | |
123 | + } | |
70 | 124 | |
71 | 125 | result = rdev->ops->set_channel(&rdev->wiphy, |
72 | 126 | wdev ? wdev->netdev : NULL, |