]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rtlwifi: rtl8192de: Convert driver to use common 5G channels
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 11 Feb 2016 16:53:10 +0000 (10:53 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 25 Feb 2016 10:01:36 +0000 (12:01 +0200)
This driver defines its owh copy of the 5G channels. Change it to use
the common definitions.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c

index bb06fe836fe753037925bf18dcfa6f8d4186ffb8..7810fe87dca795b57eec8e9cc7895f4bcd1f615d 100644 (file)
@@ -924,19 +924,11 @@ static void _rtl92d_ccxpower_index_check(struct ieee80211_hw *hw,
 
 static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl)
 {
-       u8 channel_5g[59] = {
-               1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-               36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
-               60, 62, 64, 100, 102, 104, 106, 108, 110, 112,
-               114, 116, 118, 120, 122, 124, 126, 128,
-               130, 132, 134, 136, 138, 140, 149, 151,
-               153, 155, 157, 159, 161, 163, 165
-       };
        u8 place = chnl;
 
        if (chnl > 14) {
-               for (place = 14; place < sizeof(channel_5g); place++) {
-                       if (channel_5g[place] == chnl) {
+               for (place = 14; place < sizeof(channel5g); place++) {
+                       if (channel5g[place] == chnl) {
                                place++;
                                break;
                        }
@@ -2471,16 +2463,9 @@ static bool _rtl92d_is_legal_5g_channel(struct ieee80211_hw *hw, u8 channel)
 {
 
        int i;
-       u8 channel_5g[45] = {
-               36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
-               60, 62, 64, 100, 102, 104, 106, 108, 110, 112,
-               114, 116, 118, 120, 122, 124, 126, 128, 130, 132,
-               134, 136, 138, 140, 149, 151, 153, 155, 157, 159,
-               161, 163, 165
-       };
 
-       for (i = 0; i < sizeof(channel_5g); i++)
-               if (channel == channel_5g[i])
+       for (i = 0; i < sizeof(channel5g); i++)
+               if (channel == channel5g[i])
                        return true;
        return false;
 }