diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_9287.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_init.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/reg.h | 1 |
7 files changed, 23 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h index 8750c558c221..7f48df1e2903 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.h +++ b/drivers/net/wireless/ath/ath9k/eeprom.h | |||
@@ -191,6 +191,7 @@ | |||
191 | #define AR9287_EEP_NO_BACK_VER AR9287_EEP_MINOR_VER_1 | 191 | #define AR9287_EEP_NO_BACK_VER AR9287_EEP_MINOR_VER_1 |
192 | 192 | ||
193 | #define AR9287_EEP_START_LOC 128 | 193 | #define AR9287_EEP_START_LOC 128 |
194 | #define AR9287_HTC_EEP_START_LOC 256 | ||
194 | #define AR9287_NUM_2G_CAL_PIERS 3 | 195 | #define AR9287_NUM_2G_CAL_PIERS 3 |
195 | #define AR9287_NUM_2G_CCK_TARGET_POWERS 3 | 196 | #define AR9287_NUM_2G_CCK_TARGET_POWERS 3 |
196 | #define AR9287_NUM_2G_20_TARGET_POWERS 3 | 197 | #define AR9287_NUM_2G_20_TARGET_POWERS 3 |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index 4a52cf03808b..dff2da777312 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c | |||
@@ -34,9 +34,14 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) | |||
34 | struct ar9287_eeprom *eep = &ah->eeprom.map9287; | 34 | struct ar9287_eeprom *eep = &ah->eeprom.map9287; |
35 | struct ath_common *common = ath9k_hw_common(ah); | 35 | struct ath_common *common = ath9k_hw_common(ah); |
36 | u16 *eep_data; | 36 | u16 *eep_data; |
37 | int addr, eep_start_loc = AR9287_EEP_START_LOC; | 37 | int addr, eep_start_loc; |
38 | eep_data = (u16 *)eep; | 38 | eep_data = (u16 *)eep; |
39 | 39 | ||
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 | |||
40 | if (!ath9k_hw_use_flash(ah)) { | 45 | if (!ath9k_hw_use_flash(ah)) { |
41 | ath_print(common, ATH_DBG_EEPROM, | 46 | ath_print(common, ATH_DBG_EEPROM, |
42 | "Reading from EEPROM, not flash\n"); | 47 | "Reading from EEPROM, not flash\n"); |
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 61c1bee3f26a..17e7a9a367e7 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
@@ -799,7 +799,7 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev) | |||
799 | } | 799 | } |
800 | kfree(buf); | 800 | kfree(buf); |
801 | 801 | ||
802 | if (hif_dev->device_id == 0x7010) | 802 | if ((hif_dev->device_id == 0x7010) || (hif_dev->device_id == 0x7015)) |
803 | firm_offset = AR7010_FIRMWARE_TEXT; | 803 | firm_offset = AR7010_FIRMWARE_TEXT; |
804 | else | 804 | else |
805 | firm_offset = AR9271_FIRMWARE_TEXT; | 805 | firm_offset = AR9271_FIRMWARE_TEXT; |
@@ -901,6 +901,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface, | |||
901 | 901 | ||
902 | switch(hif_dev->device_id) { | 902 | switch(hif_dev->device_id) { |
903 | case 0x7010: | 903 | case 0x7010: |
904 | case 0x7015: | ||
904 | case 0x9018: | 905 | case 0x9018: |
905 | if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202) | 906 | if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x0202) |
906 | hif_dev->fw_name = FIRMWARE_AR7010_1_1; | 907 | hif_dev->fw_name = FIRMWARE_AR7010_1_1; |
@@ -912,11 +913,6 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface, | |||
912 | break; | 913 | break; |
913 | } | 914 | } |
914 | 915 | ||
915 | if (!hif_dev->fw_name) { | ||
916 | dev_err(&udev->dev, "Can't determine firmware !\n"); | ||
917 | goto err_htc_hw_alloc; | ||
918 | } | ||
919 | |||
920 | ret = ath9k_hif_usb_dev_init(hif_dev); | 916 | ret = ath9k_hif_usb_dev_init(hif_dev); |
921 | if (ret) { | 917 | if (ret) { |
922 | ret = -EINVAL; | 918 | ret = -EINVAL; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 148b43317fdb..2d4279191d7a 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
@@ -245,6 +245,7 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid) | |||
245 | 245 | ||
246 | switch(devid) { | 246 | switch(devid) { |
247 | case 0x7010: | 247 | case 0x7010: |
248 | case 0x7015: | ||
248 | case 0x9018: | 249 | case 0x9018: |
249 | priv->htc->credits = 45; | 250 | priv->htc->credits = 45; |
250 | break; | 251 | break; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index ebed9d1691a5..7d09b4b17bbd 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -366,7 +366,8 @@ static void ath9k_htc_setup_rate(struct ath9k_htc_priv *priv, | |||
366 | caps = WLAN_RC_HT_FLAG; | 366 | caps = WLAN_RC_HT_FLAG; |
367 | if (sta->ht_cap.mcs.rx_mask[1]) | 367 | if (sta->ht_cap.mcs.rx_mask[1]) |
368 | caps |= WLAN_RC_DS_FLAG; | 368 | 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))) | ||
370 | caps |= WLAN_RC_40_FLAG; | 371 | caps |= WLAN_RC_40_FLAG; |
371 | if (conf_is_ht40(&priv->hw->conf) && | 372 | if (conf_is_ht40(&priv->hw->conf) && |
372 | (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40)) | 373 | (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40)) |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index bd0b4acc3ece..2a6e45a293a9 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -78,18 +78,23 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) | |||
78 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 78 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
79 | struct ieee80211_sta *sta = tx_info->control.sta; | 79 | struct ieee80211_sta *sta = tx_info->control.sta; |
80 | struct ath9k_htc_sta *ista; | 80 | struct ath9k_htc_sta *ista; |
81 | struct ath9k_htc_vif *avp; | ||
82 | struct ath9k_htc_tx_ctl tx_ctl; | 81 | struct ath9k_htc_tx_ctl tx_ctl; |
83 | enum htc_endpoint_id epid; | 82 | enum htc_endpoint_id epid; |
84 | u16 qnum; | 83 | u16 qnum; |
85 | __le16 fc; | 84 | __le16 fc; |
86 | u8 *tx_fhdr; | 85 | u8 *tx_fhdr; |
87 | u8 sta_idx; | 86 | u8 sta_idx, vif_idx; |
88 | 87 | ||
89 | hdr = (struct ieee80211_hdr *) skb->data; | 88 | hdr = (struct ieee80211_hdr *) skb->data; |
90 | fc = hdr->frame_control; | 89 | fc = hdr->frame_control; |
91 | 90 | ||
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 | |||
93 | if (sta) { | 98 | if (sta) { |
94 | ista = (struct ath9k_htc_sta *) sta->drv_priv; | 99 | ista = (struct ath9k_htc_sta *) sta->drv_priv; |
95 | sta_idx = ista->index; | 100 | sta_idx = ista->index; |
@@ -106,7 +111,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) | |||
106 | memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr)); | 111 | memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr)); |
107 | 112 | ||
108 | tx_hdr.node_idx = sta_idx; | 113 | tx_hdr.node_idx = sta_idx; |
109 | tx_hdr.vif_idx = avp->index; | 114 | tx_hdr.vif_idx = vif_idx; |
110 | 115 | ||
111 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { | 116 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { |
112 | tx_ctl.type = ATH9K_HTC_AMPDU; | 117 | tx_ctl.type = ATH9K_HTC_AMPDU; |
@@ -169,7 +174,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) | |||
169 | tx_ctl.type = ATH9K_HTC_NORMAL; | 174 | tx_ctl.type = ATH9K_HTC_NORMAL; |
170 | 175 | ||
171 | mgmt_hdr.node_idx = sta_idx; | 176 | mgmt_hdr.node_idx = sta_idx; |
172 | mgmt_hdr.vif_idx = avp->index; | 177 | mgmt_hdr.vif_idx = vif_idx; |
173 | mgmt_hdr.tidno = 0; | 178 | mgmt_hdr.tidno = 0; |
174 | mgmt_hdr.flags = 0; | 179 | mgmt_hdr.flags = 0; |
175 | 180 | ||
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h index 633e3d949ec0..d01c4adab8d6 100644 --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h | |||
@@ -899,6 +899,7 @@ | |||
899 | 899 | ||
900 | #define AR_DEVID_7010(_ah) \ | 900 | #define AR_DEVID_7010(_ah) \ |
901 | (((_ah)->hw_version.devid == 0x7010) || \ | 901 | (((_ah)->hw_version.devid == 0x7010) || \ |
902 | ((_ah)->hw_version.devid == 0x7015) || \ | ||
902 | ((_ah)->hw_version.devid == 0x9018)) | 903 | ((_ah)->hw_version.devid == 0x9018)) |
903 | 904 | ||
904 | #define AR_RADIO_SREV_MAJOR 0xf0 | 905 | #define AR_RADIO_SREV_MAJOR 0xf0 |