qcacmn: Check channel invalid for disabled channel
If the requested power mode is not supported, the API reg_get_chan_state_on_given_pwr_mode may return CHANNEL_STATE_INVALID flag. Besides check CHANNEL_STATE_DISABLE for disabled channel, add check CHANNEL_STATE_INVALID also. If partner link frequency is not supported by regdomain, do not enable the partner entry. Change-Id: Ic7adfdcc4e535d6303fa0f4253d1499d369bc222 CRs-Fixed: 3302241
This commit is contained in:

committed by
Madan Koyyalamudi

父節點
7fdbe9bdc7
當前提交
4639aa873c
@@ -6383,7 +6383,8 @@ bool reg_is_disable_for_pwrmode(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq,
|
||||
freq,
|
||||
in_6g_pwr_mode);
|
||||
|
||||
return ch_state == CHANNEL_STATE_DISABLE;
|
||||
return (ch_state == CHANNEL_STATE_DISABLE) ||
|
||||
(ch_state == CHANNEL_STATE_INVALID);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -690,12 +690,14 @@ static bool scm_check_dot11mode(struct scan_cache_entry *db_entry,
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
static bool util_mlo_filter_match(struct scan_filter *filter,
|
||||
static bool util_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
|
||||
struct scan_filter *filter,
|
||||
struct scan_cache_entry *db_entry)
|
||||
{
|
||||
uint8_t i, band_bitmap, assoc_band_bitmap;
|
||||
enum reg_wifi_band band;
|
||||
struct partner_link_info *partner_link;
|
||||
bool is_disabled;
|
||||
|
||||
if (!db_entry->ie_list.multi_link)
|
||||
return true;
|
||||
@@ -716,10 +718,26 @@ static bool util_mlo_filter_match(struct scan_filter *filter,
|
||||
for (i = 0; i < db_entry->ml_info.num_links; i++) {
|
||||
partner_link = &db_entry->ml_info.link_info[i];
|
||||
band = wlan_reg_freq_to_band(partner_link->freq);
|
||||
if (band_bitmap & BIT(band)) {
|
||||
scm_debug("partner freq %d match band bitmap: 0x%x",
|
||||
|
||||
is_disabled = wlan_reg_is_disable_for_pwrmode(
|
||||
pdev,
|
||||
partner_link->freq,
|
||||
REG_BEST_PWR_MODE);
|
||||
if (is_disabled) {
|
||||
scm_debug("partner link id %d freq %d disabled : "QDF_MAC_ADDR_FMT,
|
||||
partner_link->link_id,
|
||||
partner_link->freq,
|
||||
filter->band_bitmap);
|
||||
QDF_MAC_ADDR_REF(
|
||||
partner_link->link_addr.bytes));
|
||||
continue;
|
||||
}
|
||||
if (band_bitmap & BIT(band)) {
|
||||
scm_debug("partner link id %d freq %d match band bitmap: 0x%x "QDF_MAC_ADDR_FMT,
|
||||
partner_link->link_id,
|
||||
partner_link->freq,
|
||||
filter->band_bitmap,
|
||||
QDF_MAC_ADDR_REF(
|
||||
partner_link->link_addr.bytes));
|
||||
partner_link->is_valid_link = true;
|
||||
}
|
||||
}
|
||||
@@ -727,7 +745,8 @@ static bool util_mlo_filter_match(struct scan_filter *filter,
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
static bool util_mlo_filter_match(struct scan_filter *filter,
|
||||
static bool util_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
|
||||
struct scan_filter *filter,
|
||||
struct scan_cache_entry *db_entry)
|
||||
{
|
||||
return true;
|
||||
@@ -966,7 +985,7 @@ bool scm_filter_match(struct wlan_objmgr_psoc *psoc,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!util_mlo_filter_match(filter, db_entry)) {
|
||||
if (!util_mlo_filter_match(pdev, filter, db_entry)) {
|
||||
scm_debug(QDF_MAC_ADDR_FMT ": Ignore as mlo filter didn't match",
|
||||
QDF_MAC_ADDR_REF(db_entry->bssid.bytes));
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user