]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ath9k: move ath9k_hw_fbin2freq function to eeprom.h
authorGabor Juhos <juhosg@openwrt.org>
Mon, 16 Apr 2012 20:46:31 +0000 (22:46 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 17 Apr 2012 18:57:13 +0000 (14:57 -0400)
Both eeprom.c and ar9003_eeprom.c has an indentical
'ath9k_hw_fbin2freq' function. Move the function to
a common place and remove the duplicates.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
drivers/net/wireless/ath/ath9k/eeprom.c
drivers/net/wireless/ath/ath9k/eeprom.h

index 8bfd0ef7f23baa58e5ce3a8b9f3ddd673e05b666..f2333135738e3e64dfbb305501bf372c837952c0 100644 (file)
@@ -2931,15 +2931,6 @@ static const struct ar9300_eeprom *ar9003_eeprom_struct_find_by_id(int id)
 #undef N_LOOP
 }
 
-
-static u16 ath9k_hw_fbin2freq(u8 fbin, bool is2GHz)
-{
-       if (fbin == AR5416_BCHAN_UNUSED)
-               return fbin;
-
-       return (u16) ((is2GHz) ? (2300 + fbin) : (4800 + 5 * fbin));
-}
-
 static int ath9k_hw_ar9300_check_eeprom(struct ath_hw *ah)
 {
        return 0;
index 9457825c2c7cd9ecefb51255da34654a7cb6da08..0512397a293c9a50a41cb61389f6aeb1c6da2d7a 100644 (file)
 
 #include "hw.h"
 
-static inline u16 ath9k_hw_fbin2freq(u8 fbin, bool is2GHz)
-{
-       if (fbin == AR5416_BCHAN_UNUSED)
-               return fbin;
-
-       return (u16) ((is2GHz) ? (2300 + fbin) : (4800 + 5 * fbin));
-}
-
 void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val)
 {
         REG_WRITE(ah, reg, val);
index 689f0d02ca0c03a476da33ab9daaecc05b14efe0..33acb920ed3fc5931d52828b3c1b16f5b32aedbf 100644 (file)
@@ -699,6 +699,14 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
                                u16 *pPdGainBoundaries, u8 *pPDADCValues,
                                u16 numXpdGains);
 
+static inline u16 ath9k_hw_fbin2freq(u8 fbin, bool is2GHz)
+{
+       if (fbin == AR5416_BCHAN_UNUSED)
+               return fbin;
+
+       return (u16) ((is2GHz) ? (2300 + fbin) : (4800 + 5 * fbin));
+}
+
 #define ar5416_get_ntxchains(_txchainmask)                     \
        (((_txchainmask >> 2) & 1) +                            \
         ((_txchainmask >> 1) & 1) + (_txchainmask & 1))