qcacmn: Disable coex channels in the current_chan_list

The 5G cellular RF band and wifi frequency band of UNII-1
(IEEE channels 36, 40, 44, 48) and UNII-2A band (52, 56,
60, 64) can coexist.

UNII-1 and UNII-2A are represented by bits 0x1 and 0x2 respectively in
this implementation. The user space command should set the bits by
applying the following algorithm:

1) To disable only the UNII-1 band channels, set the value as 0x1.
2) To disable only the UNII-2A band channels, set the value as 0x2.
3) To disable both the UNII-1 and UNII-2A band channels, set the
   value as 0x3.
4) To restore both the UNII-1 and UNII-2A band channels, set the
   value as 0x0.

Change-Id: I8ff747e53b079ee9e0dc762980aee0eea32b23a5
CRs-Fixed: 2571546
Bu işleme şunda yer alıyor:
Hariharan Basuthkar
2019-11-21 10:35:23 +05:30
işlemeyi yapan: nshrivas
ebeveyn a718c757b3
işleme 52ccb5e615
10 değiştirilmiş dosya ile 292 ekleme ve 1 silme

Dosyayı Görüntüle

@@ -435,6 +435,18 @@ enum channel_enum {
INVALID_CHANNEL = 0xBAD,
#ifdef DISABLE_UNII_SHARED_BANDS
MIN_UNII_1_BAND_CHANNEL = CHAN_ENUM_5180,
MAX_UNII_1_BAND_CHANNEL = CHAN_ENUM_5240,
NUM_UNII_1_BAND_CHANNELS = (MAX_UNII_1_BAND_CHANNEL -
MIN_UNII_1_BAND_CHANNEL + 1),
MIN_UNII_2A_BAND_CHANNEL = CHAN_ENUM_5260,
MAX_UNII_2A_BAND_CHANNEL = CHAN_ENUM_5320,
NUM_UNII_2A_BAND_CHANNELS = (MAX_UNII_2A_BAND_CHANNEL -
MIN_UNII_2A_BAND_CHANNEL + 1),
#endif
#ifdef CONFIG_BAND_6GHZ
MIN_6GHZ_CHANNEL = CHAN_ENUM_5945,
MAX_6GHZ_CHANNEL = CHAN_ENUM_7105,
@@ -659,7 +671,6 @@ struct regulatory_channel {
bool nol_history;
};
/**
* struct regulatory: regulatory information
* @reg_domain: regulatory domain pair
@@ -833,6 +844,18 @@ enum reg_wifi_band {
REG_BAND_UNKNOWN
};
#ifdef DISABLE_UNII_SHARED_BANDS
/**
* enum reg_unii_band
* @REG_UNII_BAND_1: Disable UNII-1 band channels
* @REG_UNII_BAND_2A: Disable UNII-2A band channels
*/
enum reg_unii_band {
REG_UNII_BAND_1 = 0x0,
REG_UNII_BAND_2A = 0x1,
};
#endif
#define REG_BAND_MASK_ALL (BIT(REG_BAND_2G) | BIT(REG_BAND_5G) \
| BIT(REG_BAND_6G))

Dosyayı Görüntüle

@@ -894,6 +894,26 @@ bool wlan_reg_is_regdmn_en302502_applicable(struct wlan_objmgr_pdev *pdev);
*/
QDF_STATUS wlan_reg_modify_pdev_chan_range(struct wlan_objmgr_pdev *pdev);
/**
* wlan_reg_disable_chan_coex() - Disable Coexisting channels based on the input
* bitmask
* @pdev: pointer to wlan_objmgr_pdev.
* unii_5g_bitmap: UNII 5G bitmap.
*
* Return : QDF_STATUS
*/
#ifdef DISABLE_UNII_SHARED_BANDS
QDF_STATUS wlan_reg_disable_chan_coex(struct wlan_objmgr_pdev *pdev,
uint8_t unii_5g_bitmap);
#else
static inline QDF_STATUS
wlan_reg_disable_chan_coex(struct wlan_objmgr_pdev *pdev,
uint8_t unii_5g_bitmap)
{
return QDF_STATUS_SUCCESS;
}
#endif
#ifdef CONFIG_CHAN_FREQ_API
/**
* wlan_reg_is_same_band_freqs() - Check if two channel frequencies