diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ath9k.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 39 |
1 files changed, 6 insertions, 33 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index c92d46fa9d51..10ffc9442859 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -576,8 +576,8 @@ struct ath_softc { | |||
576 | struct ath_tx tx; | 576 | struct ath_tx tx; |
577 | struct ath_beacon beacon; | 577 | struct ath_beacon beacon; |
578 | struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX]; | 578 | struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX]; |
579 | struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX]; | 579 | const struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX]; |
580 | struct ath_rate_table *cur_rate_table; | 580 | const struct ath_rate_table *cur_rate_table; |
581 | struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; | 581 | struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; |
582 | 582 | ||
583 | struct ath_led radio_led; | 583 | struct ath_led radio_led; |
@@ -590,6 +590,8 @@ struct ath_softc { | |||
590 | int led_on_cnt; | 590 | int led_on_cnt; |
591 | int led_off_cnt; | 591 | int led_off_cnt; |
592 | 592 | ||
593 | int beacon_interval; | ||
594 | |||
593 | struct ath_rfkill rf_kill; | 595 | struct ath_rfkill rf_kill; |
594 | struct ath_ani ani; | 596 | struct ath_ani ani; |
595 | struct ath9k_node_stats nodestats; | 597 | struct ath9k_node_stats nodestats; |
@@ -695,36 +697,7 @@ void ath9k_wiphy_pause_all_forced(struct ath_softc *sc, | |||
695 | bool ath9k_wiphy_scanning(struct ath_softc *sc); | 697 | bool ath9k_wiphy_scanning(struct ath_softc *sc); |
696 | void ath9k_wiphy_work(struct work_struct *work); | 698 | void ath9k_wiphy_work(struct work_struct *work); |
697 | 699 | ||
698 | /* | 700 | void ath9k_iowrite32(struct ath_hw *ah, u32 reg_offset, u32 val); |
699 | * Read and write, they both share the same lock. We do this to serialize | 701 | unsigned int ath9k_ioread32(struct ath_hw *ah, u32 reg_offset); |
700 | * reads and writes on Atheros 802.11n PCI devices only. This is required | ||
701 | * as the FIFO on these devices can only accept sanely 2 requests. After | ||
702 | * that the device goes bananas. Serializing the reads/writes prevents this | ||
703 | * from happening. | ||
704 | */ | ||
705 | |||
706 | static inline void ath9k_iowrite32(struct ath_hw *ah, u32 reg_offset, u32 val) | ||
707 | { | ||
708 | if (ah->config.serialize_regmode == SER_REG_MODE_ON) { | ||
709 | unsigned long flags; | ||
710 | spin_lock_irqsave(&ah->ah_sc->sc_serial_rw, flags); | ||
711 | iowrite32(val, ah->ah_sc->mem + reg_offset); | ||
712 | spin_unlock_irqrestore(&ah->ah_sc->sc_serial_rw, flags); | ||
713 | } else | ||
714 | iowrite32(val, ah->ah_sc->mem + reg_offset); | ||
715 | } | ||
716 | |||
717 | static inline unsigned int ath9k_ioread32(struct ath_hw *ah, u32 reg_offset) | ||
718 | { | ||
719 | u32 val; | ||
720 | if (ah->config.serialize_regmode == SER_REG_MODE_ON) { | ||
721 | unsigned long flags; | ||
722 | spin_lock_irqsave(&ah->ah_sc->sc_serial_rw, flags); | ||
723 | val = ioread32(ah->ah_sc->mem + reg_offset); | ||
724 | spin_unlock_irqrestore(&ah->ah_sc->sc_serial_rw, flags); | ||
725 | } else | ||
726 | val = ioread32(ah->ah_sc->mem + reg_offset); | ||
727 | return val; | ||
728 | } | ||
729 | 702 | ||
730 | #endif /* ATH9K_H */ | 703 | #endif /* ATH9K_H */ |