aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/ath9k.h
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-08-07 01:24:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-07 09:49:44 -0400
commit86b89eed9aca2a4a335b9c1bf7380f9183db431f (patch)
treede9861a36de404fc74d8d7fbb87bd66e73891de4 /drivers/net/wireless/ath9k/ath9k.h
parent3b95978ddadbab594aad6280bfa660a49948af86 (diff)
ath9k: Revamp wireless mode usage
Use a single enum for managing modes, store supported modes by the HW in a bitmask. Register legacy rates with mac80211 only at init. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/ath9k.h')
-rw-r--r--drivers/net/wireless/ath9k/ath9k.h48
1 files changed, 15 insertions, 33 deletions
diff --git a/drivers/net/wireless/ath9k/ath9k.h b/drivers/net/wireless/ath9k/ath9k.h
index 82e71f9f316a..d1b0fbae5a32 100644
--- a/drivers/net/wireless/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath9k/ath9k.h
@@ -147,6 +147,19 @@ struct ath_desc {
147 147
148#define ATH9K_RXDESC_INTREQ 0x0020 148#define ATH9K_RXDESC_INTREQ 0x0020
149 149
150enum wireless_mode {
151 ATH9K_MODE_11A = 0,
152 ATH9K_MODE_11B = 2,
153 ATH9K_MODE_11G = 3,
154 ATH9K_MODE_11NA_HT20 = 6,
155 ATH9K_MODE_11NG_HT20 = 7,
156 ATH9K_MODE_11NA_HT40PLUS = 8,
157 ATH9K_MODE_11NA_HT40MINUS = 9,
158 ATH9K_MODE_11NG_HT40PLUS = 10,
159 ATH9K_MODE_11NG_HT40MINUS = 11,
160 ATH9K_MODE_MAX
161};
162
150enum ath9k_hw_caps { 163enum ath9k_hw_caps {
151 ATH9K_HW_CAP_CHAN_SPREAD = BIT(0), 164 ATH9K_HW_CAP_CHAN_SPREAD = BIT(0),
152 ATH9K_HW_CAP_MIC_AESCCM = BIT(1), 165 ATH9K_HW_CAP_MIC_AESCCM = BIT(1),
@@ -190,7 +203,7 @@ enum ath9k_capability_type {
190 203
191struct ath9k_hw_capabilities { 204struct ath9k_hw_capabilities {
192 u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */ 205 u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */
193 u32 wireless_modes; 206 DECLARE_BITMAP(wireless_modes, ATH9K_MODE_MAX); /* ATH9K_MODE_* */
194 u16 total_queues; 207 u16 total_queues;
195 u16 keycache_size; 208 u16 keycache_size;
196 u16 low_5ghz_chan, high_5ghz_chan; 209 u16 low_5ghz_chan, high_5ghz_chan;
@@ -813,37 +826,6 @@ struct ath_hal {
813#endif 826#endif
814}; 827};
815 828
816enum wireless_mode {
817 WIRELESS_MODE_11a = 0,
818 WIRELESS_MODE_11b = 2,
819 WIRELESS_MODE_11g = 3,
820 WIRELESS_MODE_11NA_HT20 = 6,
821 WIRELESS_MODE_11NG_HT20 = 7,
822 WIRELESS_MODE_11NA_HT40PLUS = 8,
823 WIRELESS_MODE_11NA_HT40MINUS = 9,
824 WIRELESS_MODE_11NG_HT40PLUS = 10,
825 WIRELESS_MODE_11NG_HT40MINUS = 11,
826 WIRELESS_MODE_MAX
827};
828
829enum {
830 ATH9K_MODE_SEL_11A = 0x00001,
831 ATH9K_MODE_SEL_11B = 0x00002,
832 ATH9K_MODE_SEL_11G = 0x00004,
833 ATH9K_MODE_SEL_11NG_HT20 = 0x00008,
834 ATH9K_MODE_SEL_11NA_HT20 = 0x00010,
835 ATH9K_MODE_SEL_11NG_HT40PLUS = 0x00020,
836 ATH9K_MODE_SEL_11NG_HT40MINUS = 0x00040,
837 ATH9K_MODE_SEL_11NA_HT40PLUS = 0x00080,
838 ATH9K_MODE_SEL_11NA_HT40MINUS = 0x00100,
839 ATH9K_MODE_SEL_2GHZ = (ATH9K_MODE_SEL_11B |
840 ATH9K_MODE_SEL_11G |
841 ATH9K_MODE_SEL_11NG_HT20),
842 ATH9K_MODE_SEL_5GHZ = (ATH9K_MODE_SEL_11A |
843 ATH9K_MODE_SEL_11NA_HT20),
844 ATH9K_MODE_SEL_ALL = 0xffffffff
845};
846
847struct chan_centers { 829struct chan_centers {
848 u16 synth_center; 830 u16 synth_center;
849 u16 ctl_center; 831 u16 ctl_center;
@@ -865,7 +847,7 @@ bool ath9k_regd_init_channels(struct ath_hal *ah,
865 u32 maxchans, u32 *nchans, 847 u32 maxchans, u32 *nchans,
866 u8 *regclassids, 848 u8 *regclassids,
867 u32 maxregids, u32 *nregids, 849 u32 maxregids, u32 *nregids,
868 u16 cc, u32 modeSelect, 850 u16 cc,
869 bool enableOutdoor, 851 bool enableOutdoor,
870 bool enableExtendedChannels); 852 bool enableExtendedChannels);
871u32 ath9k_hw_mhz2ieee(struct ath_hal *ah, u32 freq, u32 flags); 853u32 ath9k_hw_mhz2ieee(struct ath_hal *ah, u32 freq, u32 flags);