diff options
Diffstat (limited to 'drivers/net/wireless/ath/carl9170')
-rw-r--r-- | drivers/net/wireless/ath/carl9170/carl9170.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/fw.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/phy.c | 9 |
3 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h index c5427a72a1e2..f7dbdaa74c63 100644 --- a/drivers/net/wireless/ath/carl9170/carl9170.h +++ b/drivers/net/wireless/ath/carl9170/carl9170.h | |||
@@ -282,6 +282,7 @@ struct ar9170 { | |||
282 | bool rx_stream; | 282 | bool rx_stream; |
283 | bool tx_stream; | 283 | bool tx_stream; |
284 | bool rx_filter; | 284 | bool rx_filter; |
285 | bool hw_counters; | ||
285 | unsigned int mem_blocks; | 286 | unsigned int mem_blocks; |
286 | unsigned int mem_block_size; | 287 | unsigned int mem_block_size; |
287 | unsigned int rx_size; | 288 | unsigned int rx_size; |
diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c index 39ddea5794f7..f4cae1cccbff 100644 --- a/drivers/net/wireless/ath/carl9170/fw.c +++ b/drivers/net/wireless/ath/carl9170/fw.c | |||
@@ -266,6 +266,9 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len) | |||
266 | FIF_PROMISC_IN_BSS; | 266 | FIF_PROMISC_IN_BSS; |
267 | } | 267 | } |
268 | 268 | ||
269 | if (SUPP(CARL9170FW_HW_COUNTERS)) | ||
270 | ar->fw.hw_counters = true; | ||
271 | |||
269 | if (SUPP(CARL9170FW_WOL)) | 272 | if (SUPP(CARL9170FW_WOL)) |
270 | device_set_wakeup_enable(&ar->udev->dev, true); | 273 | device_set_wakeup_enable(&ar->udev->dev, true); |
271 | 274 | ||
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c index aa147a9120b6..8635c5c8463c 100644 --- a/drivers/net/wireless/ath/carl9170/phy.c +++ b/drivers/net/wireless/ath/carl9170/phy.c | |||
@@ -578,11 +578,10 @@ static int carl9170_init_phy(struct ar9170 *ar, enum ieee80211_band band) | |||
578 | if (err) | 578 | if (err) |
579 | return err; | 579 | return err; |
580 | 580 | ||
581 | /* XXX: remove magic! */ | 581 | if (!ar->fw.hw_counters) { |
582 | if (is_2ghz) | 582 | err = carl9170_write_reg(ar, AR9170_PWR_REG_PLL_ADDAC, |
583 | err = carl9170_write_reg(ar, AR9170_PWR_REG_PLL_ADDAC, 0x5163); | 583 | is_2ghz ? 0x5163 : 0x5143); |
584 | else | 584 | } |
585 | err = carl9170_write_reg(ar, AR9170_PWR_REG_PLL_ADDAC, 0x5143); | ||
586 | 585 | ||
587 | return err; | 586 | return err; |
588 | } | 587 | } |