Skip to content

Commit 5ca6f7c

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2 parents daa3766 + 6ccf15a commit 5ca6f7c

File tree

10 files changed

+48
-16
lines changed

10 files changed

+48
-16
lines changed

drivers/net/wireless/ath/ath5k/base.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#include <linux/netdevice.h>
4949
#include <linux/cache.h>
5050
#include <linux/pci.h>
51+
#include <linux/pci-aspm.h>
5152
#include <linux/ethtool.h>
5253
#include <linux/uaccess.h>
5354
#include <linux/slab.h>
@@ -476,6 +477,26 @@ ath5k_pci_probe(struct pci_dev *pdev,
476477
int ret;
477478
u8 csz;
478479

480+
/*
481+
* L0s needs to be disabled on all ath5k cards.
482+
*
483+
* For distributions shipping with CONFIG_PCIEASPM (this will be enabled
484+
* by default in the future in 2.6.36) this will also mean both L1 and
485+
* L0s will be disabled when a pre 1.1 PCIe device is detected. We do
486+
* know L1 works correctly even for all ath5k pre 1.1 PCIe devices
487+
* though but cannot currently undue the effect of a blacklist, for
488+
* details you can read pcie_aspm_sanity_check() and see how it adjusts
489+
* the device link capability.
490+
*
491+
* It may be possible in the future to implement some PCI API to allow
492+
* drivers to override blacklists for pre 1.1 PCIe but for now it is
493+
* best to accept that both L0s and L1 will be disabled completely for
494+
* distributions shipping with CONFIG_PCIEASPM rather than having this
495+
* issue present. Motivation for adding this new API will be to help
496+
* with power consumption for some of these devices.
497+
*/
498+
pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
499+
479500
ret = pci_enable_device(pdev);
480501
if (ret) {
481502
dev_err(&pdev->dev, "can't enable device\n");

drivers/net/wireless/ath/ath9k/eeprom.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
#define AR9287_EEP_NO_BACK_VER AR9287_EEP_MINOR_VER_1
192192

193193
#define AR9287_EEP_START_LOC 128
194+
#define AR9287_HTC_EEP_START_LOC 256
194195
#define AR9287_NUM_2G_CAL_PIERS 3
195196
#define AR9287_NUM_2G_CCK_TARGET_POWERS 3
196197
#define AR9287_NUM_2G_20_TARGET_POWERS 3

drivers/net/wireless/ath/ath9k/eeprom_9287.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
3434
struct ar9287_eeprom *eep = &ah->eeprom.map9287;
3535
struct ath_common *common = ath9k_hw_common(ah);
3636
u16 *eep_data;
37-
int addr, eep_start_loc = AR9287_EEP_START_LOC;
37+
int addr, eep_start_loc;
3838
eep_data = (u16 *)eep;
3939

40+
if (ah->hw_version.devid == 0x7015)
41+
eep_start_loc = AR9287_HTC_EEP_START_LOC;
42+
else
43+
eep_start_loc = AR9287_EEP_START_LOC;
44+
4045
if (!ath9k_hw_use_flash(ah)) {
4146
ath_print(common, ATH_DBG_EEPROM,
4247
"Reading from EEPROM, not flash\n");

drivers/net/wireless/ath/ath9k/hif_usb.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
799799
}
800800
kfree(buf);
801801

802-
if (hif_dev->device_id == 0x7010)
802+
if ((hif_dev->device_id == 0x7010) || (hif_dev->device_id == 0x7015))
803803
firm_offset = AR7010_FIRMWARE_TEXT;
804804
else
805805
firm_offset = AR9271_FIRMWARE_TEXT;
@@ -901,6 +901,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
901901

902902
switch(hif_dev->device_id) {
903903
case 0x7010:
904+
case 0x7015:
904905
case 0x9018:
905906
if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202)
906907
hif_dev->fw_name = FIRMWARE_AR7010_1_1;
@@ -912,11 +913,6 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface,
912913
break;
913914
}
914915

915-
if (!hif_dev->fw_name) {
916-
dev_err(&udev->dev, "Can't determine firmware !\n");
917-
goto err_htc_hw_alloc;
918-
}
919-
920916
ret = ath9k_hif_usb_dev_init(hif_dev);
921917
if (ret) {
922918
ret = -EINVAL;

drivers/net/wireless/ath/ath9k/htc_drv_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid)
245245

246246
switch(devid) {
247247
case 0x7010:
248+
case 0x7015:
248249
case 0x9018:
249250
priv->htc->credits = 45;
250251
break;

drivers/net/wireless/ath/ath9k/htc_drv_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ static void ath9k_htc_setup_rate(struct ath9k_htc_priv *priv,
366366
caps = WLAN_RC_HT_FLAG;
367367
if (sta->ht_cap.mcs.rx_mask[1])
368368
caps |= WLAN_RC_DS_FLAG;
369-
if (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
369+
if ((sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
370+
(conf_is_ht40(&priv->hw->conf)))
370371
caps |= WLAN_RC_40_FLAG;
371372
if (conf_is_ht40(&priv->hw->conf) &&
372373
(sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40))

drivers/net/wireless/ath/ath9k/htc_drv_txrx.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,23 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
7878
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
7979
struct ieee80211_sta *sta = tx_info->control.sta;
8080
struct ath9k_htc_sta *ista;
81-
struct ath9k_htc_vif *avp;
8281
struct ath9k_htc_tx_ctl tx_ctl;
8382
enum htc_endpoint_id epid;
8483
u16 qnum;
8584
__le16 fc;
8685
u8 *tx_fhdr;
87-
u8 sta_idx;
86+
u8 sta_idx, vif_idx;
8887

8988
hdr = (struct ieee80211_hdr *) skb->data;
9089
fc = hdr->frame_control;
9190

92-
avp = (struct ath9k_htc_vif *) tx_info->control.vif->drv_priv;
91+
if (tx_info->control.vif &&
92+
(struct ath9k_htc_vif *) tx_info->control.vif->drv_priv)
93+
vif_idx = ((struct ath9k_htc_vif *)
94+
tx_info->control.vif->drv_priv)->index;
95+
else
96+
vif_idx = priv->nvifs;
97+
9398
if (sta) {
9499
ista = (struct ath9k_htc_sta *) sta->drv_priv;
95100
sta_idx = ista->index;
@@ -106,7 +111,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
106111
memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr));
107112

108113
tx_hdr.node_idx = sta_idx;
109-
tx_hdr.vif_idx = avp->index;
114+
tx_hdr.vif_idx = vif_idx;
110115

111116
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
112117
tx_ctl.type = ATH9K_HTC_AMPDU;
@@ -169,7 +174,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
169174
tx_ctl.type = ATH9K_HTC_NORMAL;
170175

171176
mgmt_hdr.node_idx = sta_idx;
172-
mgmt_hdr.vif_idx = avp->index;
177+
mgmt_hdr.vif_idx = vif_idx;
173178
mgmt_hdr.tidno = 0;
174179
mgmt_hdr.flags = 0;
175180

drivers/net/wireless/ath/ath9k/reg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@
899899

900900
#define AR_DEVID_7010(_ah) \
901901
(((_ah)->hw_version.devid == 0x7010) || \
902+
((_ah)->hw_version.devid == 0x7015) || \
902903
((_ah)->hw_version.devid == 0x9018))
903904

904905
#define AR_RADIO_SREV_MAJOR 0xf0

drivers/net/wireless/ipw2x00/ipw2100.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6665,12 +6665,13 @@ static int __init ipw2100_init(void)
66656665
printk(KERN_INFO DRV_NAME ": %s, %s\n", DRV_DESCRIPTION, DRV_VERSION);
66666666
printk(KERN_INFO DRV_NAME ": %s\n", DRV_COPYRIGHT);
66676667

6668+
pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
6669+
PM_QOS_DEFAULT_VALUE);
6670+
66686671
ret = pci_register_driver(&ipw2100_pci_driver);
66696672
if (ret)
66706673
goto out;
66716674

6672-
pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
6673-
PM_QOS_DEFAULT_VALUE);
66746675
#ifdef CONFIG_IPW2100_DEBUG
66756676
ipw2100_debug_level = debug;
66766677
ret = driver_create_file(&ipw2100_pci_driver.driver,

drivers/net/wireless/wl12xx/wl1251_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ int wl1251_cmd_trigger_scan_to(struct wl1251 *wl, u32 timeout)
484484

485485
cmd->timeout = timeout;
486486

487-
ret = wl1251_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd));
487+
ret = wl1251_cmd_send(wl, CMD_TRIGGER_SCAN_TO, cmd, sizeof(*cmd));
488488
if (ret < 0) {
489489
wl1251_error("cmd trigger scan to failed: %d", ret);
490490
goto out;

0 commit comments

Comments
 (0)