Add all Europe 5GHz channel support into driver

This commit is contained in:
Xianjun Jiao 2022-03-28 13:58:05 +02:00
parent 6a9949ee81
commit 0b4b8cc75d

View File

@ -127,11 +127,11 @@ union u16_byte2 {
//#define HIGH_PRIORITY_DISCARD_FLAG ((~0x140)<<16) // don't force drop OTHER_BSS and PROB_REQ by high priority discard
/* 5G chan 36 - chan 64*/
#define SDR_5GHZ_CH36_64 \
REG_RULE(5150-10, 5350+10, 80, 0, 20, 0)
#define SDR_5GHZ_CH36_64 REG_RULE(5150-10, 5350+10, 80, 0, 20, 0)
/* 5G chan 32 - chan 173*/
#define SDR_5GHZ_CH32_173 REG_RULE(5160-10, 5865+10, 80, 0, 20, 0)
/* 5G chan 36 - chan 48*/
#define SDR_5GHZ_CH36_48 \
REG_RULE(5150-10, 5270+10, 80, 0, 20, 0)
#define SDR_5GHZ_CH36_48 REG_RULE(5150-10, 5270+10, 80, 0, 20, 0)
/*
*Only these channels all allow active
@ -153,7 +153,8 @@ static const struct ieee80211_regdomain sdr_regd = { // for wiphy_apply_custom_r
//SDR_2GHZ_CH01_13,
//SDR_5GHZ_CH36_48, //Avoid radar!
SDR_2GHZ_CH01_14,
SDR_5GHZ_CH36_64,
// SDR_5GHZ_CH36_64,
SDR_5GHZ_CH32_173,
}
};
@ -223,6 +224,8 @@ static const struct ieee80211_channel openwifi_2GHz_channels[] = {
};
static const struct ieee80211_channel openwifi_5GHz_channels[] = {
CHAN5G(32, 5160, 0),
CHAN5G(34, 5170, 0),
CHAN5G(36, 5180, 0),
CHAN5G(38, 5190, 0),
CHAN5G(40, 5200, 0),
@ -230,28 +233,51 @@ static const struct ieee80211_channel openwifi_5GHz_channels[] = {
CHAN5G(44, 5220, 0),
CHAN5G(46, 5230, 0),
CHAN5G(48, 5240, 0),
CHAN5G(52, 5260, IEEE80211_CHAN_RADAR),
CHAN5G(56, 5280, IEEE80211_CHAN_RADAR),
CHAN5G(60, 5300, IEEE80211_CHAN_RADAR),
CHAN5G(64, 5320, IEEE80211_CHAN_RADAR),
// CHAN5G(100, 5500, 0),
// CHAN5G(104, 5520, 0),
// CHAN5G(108, 5540, 0),
// CHAN5G(112, 5560, 0),
// CHAN5G(116, 5580, 0),
// CHAN5G(120, 5600, 0),
// CHAN5G(124, 5620, 0),
// CHAN5G(128, 5640, 0),
// CHAN5G(132, 5660, 0),
// CHAN5G(136, 5680, 0),
// CHAN5G(140, 5700, 0),
// CHAN5G(144, 5720, 0),
// CHAN5G(149, 5745, 0),
// CHAN5G(153, 5765, 0),
// CHAN5G(157, 5785, 0),
// CHAN5G(161, 5805, 0),
// CHAN5G(165, 5825, 0),
// CHAN5G(169, 5845, 0),
CHAN5G( 50, 5250, IEEE80211_CHAN_RADAR),
CHAN5G( 52, 5260, IEEE80211_CHAN_RADAR),
CHAN5G( 54, 5270, IEEE80211_CHAN_RADAR),
CHAN5G( 56, 5280, IEEE80211_CHAN_RADAR),
CHAN5G( 58, 5290, IEEE80211_CHAN_RADAR),
CHAN5G( 60, 5300, IEEE80211_CHAN_RADAR),
CHAN5G( 62, 5310, IEEE80211_CHAN_RADAR),
CHAN5G( 64, 5320, IEEE80211_CHAN_RADAR),
CHAN5G( 68, 5340, IEEE80211_CHAN_RADAR),
CHAN5G( 96, 5480, IEEE80211_CHAN_RADAR),
CHAN5G(100, 5500, IEEE80211_CHAN_RADAR),
CHAN5G(102, 5510, IEEE80211_CHAN_RADAR),
CHAN5G(104, 5520, IEEE80211_CHAN_RADAR),
CHAN5G(106, 5530, IEEE80211_CHAN_RADAR),
CHAN5G(108, 5540, IEEE80211_CHAN_RADAR),
CHAN5G(110, 5550, IEEE80211_CHAN_RADAR),
CHAN5G(112, 5560, IEEE80211_CHAN_RADAR),
CHAN5G(114, 5570, IEEE80211_CHAN_RADAR),
CHAN5G(116, 5580, IEEE80211_CHAN_RADAR),
CHAN5G(118, 5590, IEEE80211_CHAN_RADAR),
CHAN5G(120, 5600, IEEE80211_CHAN_RADAR),
CHAN5G(122, 5610, IEEE80211_CHAN_RADAR),
CHAN5G(124, 5620, IEEE80211_CHAN_RADAR),
CHAN5G(126, 5630, IEEE80211_CHAN_RADAR),
CHAN5G(128, 5640, IEEE80211_CHAN_RADAR),
CHAN5G(132, 5660, IEEE80211_CHAN_RADAR),
CHAN5G(134, 5670, IEEE80211_CHAN_RADAR),
CHAN5G(136, 5680, IEEE80211_CHAN_RADAR),
CHAN5G(138, 5690, IEEE80211_CHAN_RADAR),
CHAN5G(140, 5700, IEEE80211_CHAN_RADAR),
CHAN5G(142, 5710, IEEE80211_CHAN_RADAR),
CHAN5G(144, 5720, IEEE80211_CHAN_RADAR),
CHAN5G(149, 5745, IEEE80211_CHAN_RADAR),
CHAN5G(151, 5755, IEEE80211_CHAN_RADAR),
CHAN5G(153, 5765, IEEE80211_CHAN_RADAR),
CHAN5G(155, 5775, IEEE80211_CHAN_RADAR),
CHAN5G(157, 5785, IEEE80211_CHAN_RADAR),
CHAN5G(159, 5795, IEEE80211_CHAN_RADAR),
CHAN5G(161, 5805, IEEE80211_CHAN_RADAR),
// CHAN5G(163, 5815, IEEE80211_CHAN_RADAR),
CHAN5G(165, 5825, IEEE80211_CHAN_RADAR),
CHAN5G(167, 5835, IEEE80211_CHAN_RADAR),
CHAN5G(169, 5845, IEEE80211_CHAN_RADAR),
CHAN5G(171, 5855, IEEE80211_CHAN_RADAR),
CHAN5G(173, 5865, IEEE80211_CHAN_RADAR),
};
static const struct ieee80211_iface_limit openwifi_if_limits[] = {
@ -333,7 +359,7 @@ struct openwifi_priv {
struct ieee80211_rate rates_2GHz[12];
struct ieee80211_rate rates_5GHz[12];
struct ieee80211_channel channels_2GHz[14];
struct ieee80211_channel channels_5GHz[11];
struct ieee80211_channel channels_5GHz[53];
struct ieee80211_supported_band band_2GHz;
struct ieee80211_supported_band band_5GHz;
bool rfkill_off;