Merge 50f4e8971b on remote branch

Change-Id: I7af71ac4e307a9db17dafeeb82e8ef2f9f2373be
This commit is contained in:
Linux Build Service Account 2023-12-10 23:33:48 -08:00
commit 9381d7591a
5 changed files with 51 additions and 22 deletions

View file

@ -18339,6 +18339,9 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
policy_mgr_clear_concurrency_mode(hdd_ctx->psoc, adapter->device_mode);
if (hdd_is_client_mode(adapter->device_mode)) {
if (adapter->device_mode == QDF_STA_MODE)
hdd_cleanup_conn_info(adapter);
if (hdd_is_client_mode(new_mode)) {
errno = hdd_change_adapter_mode(adapter, new_mode);
if (errno) {

View file

@ -6619,36 +6619,47 @@ static bool check_disable_channels(struct hdd_context *hdd_ctx,
}
/**
* disconnect_sta_and_stop_sap() - Disconnect STA and stop SAP
* disconnect_sta_and_restart_sap() - Disconnect STA and restart SAP
*
* @hdd_ctx: Pointer to hdd context
* @reason: Disconnect reason code as per @enum wlan_reason_code
*
* Disable channels provided by user and disconnect STA if it is
* connected to any AP, stop SAP and send deauthentication request
* to STAs connected to SAP.
* connected to any AP, restart SAP.
*
* Return: None
*/
static void disconnect_sta_and_stop_sap(struct hdd_context *hdd_ctx,
enum wlan_reason_code reason)
static void disconnect_sta_and_restart_sap(struct hdd_context *hdd_ctx,
enum wlan_reason_code reason)
{
struct hdd_adapter *adapter, *next = NULL;
QDF_STATUS status;
uint32_t ch_list[NUM_CHANNELS];
uint32_t ch_count = 0;
bool is_valid_chan_present = true;
if (!hdd_ctx)
return;
hdd_check_and_disconnect_sta_on_invalid_channel(hdd_ctx, reason);
status = policy_mgr_get_valid_chans(hdd_ctx->psoc, ch_list, &ch_count);
if (QDF_IS_STATUS_ERROR(status) || !ch_count) {
hdd_debug("No valid channels present, stop the SAPs");
is_valid_chan_present = false;
}
status = hdd_get_front_adapter(hdd_ctx, &adapter);
while (adapter && (status == QDF_STATUS_SUCCESS)) {
if (!hdd_validate_adapter(adapter) &&
adapter->device_mode == QDF_SAP_MODE) {
if (check_disable_channels(
if (!is_valid_chan_present)
wlan_hdd_stop_sap(adapter);
else if (check_disable_channels(
hdd_ctx,
adapter->session.ap.operating_chan_freq))
wlan_hdd_stop_sap(adapter);
policy_mgr_check_sap_restart(hdd_ctx->psoc,
adapter->vdev_id);
}
status = hdd_get_next_adapter(hdd_ctx, adapter, &next);
@ -6877,8 +6888,9 @@ mem_alloc_failed:
ret = wlan_hdd_disable_channels(hdd_ctx);
if (ret)
return ret;
disconnect_sta_and_stop_sap(hdd_ctx,
REASON_OPER_CHANNEL_BAND_CHANGE);
disconnect_sta_and_restart_sap(
hdd_ctx,
REASON_OPER_CHANNEL_BAND_CHANGE);
}
hdd_exit();

View file

@ -32,9 +32,9 @@
#define QWLAN_VERSION_MAJOR 2
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 8
#define QWLAN_VERSION_EXTRA "B"
#define QWLAN_VERSION_EXTRA "F"
#define QWLAN_VERSION_BUILD 34
#define QWLAN_VERSIONSTR "2.0.8.34B"
#define QWLAN_VERSIONSTR "2.0.8.34F"
#endif /* QWLAN_VERSION_H */

View file

@ -441,6 +441,9 @@ sch_bcn_update_opmode_change(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
uint8_t oper_mode;
uint32_t fw_vht_ch_wd = wma_get_vht_ch_width();
uint8_t ch_width = 0, ch_bw;
tDot11fIEVHTCaps *vht_caps = NULL;
tDot11fIEVHTOperation *vht_op = NULL;
uint8_t bcn_vht_chwidth = 0;
/*
* Ignore opmode change during channel change The opmode will be updated
@ -459,12 +462,24 @@ sch_bcn_update_opmode_change(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
return;
}
if (!(session->vhtCapability && bcn->VHTOperation.present))
if (bcn->VHTCaps.present) {
vht_caps = &bcn->VHTCaps;
vht_op = &bcn->VHTOperation;
} else if (bcn->vendor_vht_ie.VHTCaps.present) {
vht_caps = &bcn->vendor_vht_ie.VHTCaps;
vht_op = &bcn->vendor_vht_ie.VHTOperation;
}
if (!(session->vhtCapability && (vht_op && vht_op->present)))
return;
bcn_vht_chwidth = lim_get_vht_ch_width(&bcn->VHTCaps,
&bcn->VHTOperation,
&bcn->HTInfo);
oper_mode = sta_ds->vhtSupportedChannelWidthSet;
if ((oper_mode == WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ) &&
(oper_mode < bcn->VHTOperation.chanWidth))
(oper_mode < bcn_vht_chwidth))
skip_opmode_update = true;
if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE == cb_mode) {
@ -479,24 +494,23 @@ sch_bcn_update_opmode_change(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
}
if (!skip_opmode_update &&
(oper_mode != bcn->VHTOperation.chanWidth)) {
pe_debug("received VHTOP CHWidth %d",
bcn->VHTOperation.chanWidth);
(oper_mode != bcn_vht_chwidth)) {
pe_debug("received VHTOP CHWidth %d", bcn_vht_chwidth);
pe_debug("MAC - %0x:%0x:%0x:%0x:%0x:%0x",
mac_hdr->sa[0], mac_hdr->sa[1],
mac_hdr->sa[2], mac_hdr->sa[3],
mac_hdr->sa[4], mac_hdr->sa[5]);
if ((bcn->VHTOperation.chanWidth >=
if ((bcn_vht_chwidth >=
WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ) &&
(fw_vht_ch_wd > eHT_CHANNEL_WIDTH_80MHZ)) {
pe_debug("Updating the CH Width to 160MHz");
sta_ds->vhtSupportedChannelWidthSet =
bcn->VHTOperation.chanWidth;
bcn_vht_chwidth;
sta_ds->htSupportedChannelWidthSet =
eHT_CHANNEL_WIDTH_40MHZ;
ch_width = eHT_CHANNEL_WIDTH_160MHZ;
} else if (bcn->VHTOperation.chanWidth >=
} else if (bcn_vht_chwidth >=
WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ) {
pe_debug("Updating the CH Width to 80MHz");
sta_ds->vhtSupportedChannelWidthSet =
@ -504,7 +518,7 @@ sch_bcn_update_opmode_change(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
sta_ds->htSupportedChannelWidthSet =
eHT_CHANNEL_WIDTH_40MHZ;
ch_width = eHT_CHANNEL_WIDTH_80MHZ;
} else if (bcn->VHTOperation.chanWidth ==
} else if (bcn_vht_chwidth ==
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ) {
sta_ds->vhtSupportedChannelWidthSet =
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;

View file

@ -2019,8 +2019,8 @@ static QDF_STATUS sap_cac_start_notify(mac_handle_t mac_handle)
/* Don't start CAC for non-dfs channel, its violation */
profile = &sap_context->csr_roamProfile;
ch_freq = profile->op_freq;
if (!wlan_reg_is_dfs_for_freq(mac->pdev,
ch_freq))
if (!wlan_reg_is_dfs_for_freq(mac->pdev, ch_freq) &&
wlan_reg_get_5g_bonded_channel_state_for_freq(mac->pdev, ch_freq, profile->ch_params.ch_width) != CHANNEL_STATE_DFS)
continue;
sap_debug("sapdfs: Signaling eSAP_DFS_CAC_START to HDD for sapctx[%pK]",
sap_context);