Commit bb6fa826 authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

rtlwifi: rtl8192de: Convert driver to use common 5G channels

This driver defines its owh copy of the 5G channels. Change it to use
the common definitions.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 9696a159
...@@ -924,19 +924,11 @@ static void _rtl92d_ccxpower_index_check(struct ieee80211_hw *hw, ...@@ -924,19 +924,11 @@ static void _rtl92d_ccxpower_index_check(struct ieee80211_hw *hw,
static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl) 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; u8 place = chnl;
if (chnl > 14) { if (chnl > 14) {
for (place = 14; place < sizeof(channel_5g); place++) { for (place = 14; place < sizeof(channel5g); place++) {
if (channel_5g[place] == chnl) { if (channel5g[place] == chnl) {
place++; place++;
break; break;
} }
...@@ -2471,16 +2463,9 @@ static bool _rtl92d_is_legal_5g_channel(struct ieee80211_hw *hw, u8 channel) ...@@ -2471,16 +2463,9 @@ static bool _rtl92d_is_legal_5g_channel(struct ieee80211_hw *hw, u8 channel)
{ {
int i; 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++) for (i = 0; i < sizeof(channel5g); i++)
if (channel == channel_5g[i]) if (channel == channel5g[i])
return true; return true;
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment