mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
Merge 1d1c2e7f9a on remote branch
Change-Id: I7ac7a913e859ee389d9aa70f88c2a3756693e3e6
This commit is contained in:
commit
4142ad0b53
31 changed files with 422 additions and 329 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -59,12 +59,12 @@ struct pkt_capture_cb_context {
|
|||
* @cb_ctx: pointer to packet capture mon callback context
|
||||
* @frame_filter: config filter set by vendor command
|
||||
* @cfg_params: packet capture config params
|
||||
* @rx_avg_rssi: avg rssi of rx data packets
|
||||
* @ppdu_stats_q: list used for storing smu related ppdu stats
|
||||
* @lock_q: spinlock for ppdu_stats q
|
||||
* @tx_nss: nss of tx data packets received from ppdu stats
|
||||
* @last_freq: Last connected freq
|
||||
* @curr_freq: current connected freq
|
||||
* @rx_vht_sgi: guard interval of vht rx packet
|
||||
*/
|
||||
struct pkt_capture_vdev_priv {
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
|
@ -72,12 +72,12 @@ struct pkt_capture_vdev_priv {
|
|||
struct pkt_capture_cb_context *cb_ctx;
|
||||
struct pkt_capture_frame_filter frame_filter;
|
||||
struct pkt_capture_cfg cfg_params;
|
||||
int32_t rx_avg_rssi;
|
||||
qdf_list_t ppdu_stats_q;
|
||||
qdf_spinlock_t lock_q;
|
||||
uint8_t tx_nss;
|
||||
qdf_freq_t last_freq;
|
||||
qdf_freq_t curr_freq;
|
||||
uint8_t rx_vht_sgi;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -687,6 +687,7 @@ static void pkt_capture_rx_get_phy_info(void *context, void *psoc,
|
|||
struct dp_soc *soc = psoc;
|
||||
hal_soc_handle_t hal_soc;
|
||||
struct wlan_objmgr_vdev *vdev = context;
|
||||
struct pkt_capture_vdev_priv *vdev_priv;
|
||||
|
||||
hal_soc = soc->hal_soc;
|
||||
preamble_type = hal_rx_msdu_start_get_pkt_type(rx_tlv_hdr);
|
||||
|
|
@ -694,6 +695,7 @@ static void pkt_capture_rx_get_phy_info(void *context, void *psoc,
|
|||
bw = hal_rx_msdu_start_bw_get(rx_tlv_hdr);
|
||||
mcs = hal_rx_msdu_start_rate_mcs_get(rx_tlv_hdr);
|
||||
sgi = hal_rx_msdu_start_sgi_get(rx_tlv_hdr);
|
||||
vdev_priv = pkt_capture_vdev_get_priv(vdev);
|
||||
|
||||
switch (preamble_type) {
|
||||
case HAL_RX_PKT_TYPE_11A:
|
||||
|
|
@ -712,6 +714,7 @@ static void pkt_capture_rx_get_phy_info(void *context, void *psoc,
|
|||
rx_status->ht_mcs = mcs;
|
||||
break;
|
||||
case HAL_RX_PKT_TYPE_11AC:
|
||||
sgi = vdev_priv->rx_vht_sgi;
|
||||
rx_status->vht_flags = 1;
|
||||
rx_status->vht_flag_values3[0] = mcs << 0x4 | nss;
|
||||
bw = vdev->vdev_mlme.des_chan->ch_width;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ struct mgmt_offload_event_params {
|
|||
|
||||
struct smu_event_params {
|
||||
uint32_t vdev_id;
|
||||
int32_t rx_avg_rssi;
|
||||
uint8_t rx_vht_sgi;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -222,7 +222,7 @@ tgt_pkt_capture_smu_event(struct wlan_objmgr_psoc *psoc,
|
|||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
vdev_priv->rx_avg_rssi = param->rx_avg_rssi;
|
||||
vdev_priv->rx_vht_sgi = param->rx_vht_sgi;
|
||||
|
||||
pkt_capture_vdev_put_ref(vdev);
|
||||
|
||||
|
|
|
|||
|
|
@ -1901,6 +1901,7 @@ QDF_STATUS dp_fisa_rx(struct dp_soc *soc, struct dp_vdev *vdev,
|
|||
struct dp_fisa_rx_sw_ft *fisa_flow;
|
||||
int fisa_ret;
|
||||
uint8_t rx_ctx_id = QDF_NBUF_CB_RX_CTX_ID(nbuf_list);
|
||||
uint32_t tlv_reo_dest_ind;
|
||||
|
||||
head_nbuf = nbuf_list;
|
||||
|
||||
|
|
@ -1929,6 +1930,17 @@ QDF_STATUS dp_fisa_rx(struct dp_soc *soc, struct dp_vdev *vdev,
|
|||
qdf_nbuf_push_head(head_nbuf, RX_PKT_TLVS_LEN +
|
||||
QDF_NBUF_CB_RX_PACKET_L3_HDR_PAD(head_nbuf));
|
||||
|
||||
hal_rx_msdu_get_reo_destination_indication(soc->hal_soc,
|
||||
(uint8_t *)qdf_nbuf_data(head_nbuf),
|
||||
&tlv_reo_dest_ind);
|
||||
/* Skip FISA aggregation and drop the frame if RDI is REO2TCL */
|
||||
if (qdf_unlikely(tlv_reo_dest_ind == REO_REMAP_TCL)) {
|
||||
qdf_nbuf_free(head_nbuf);
|
||||
head_nbuf = next_nbuf;
|
||||
DP_STATS_INC(dp_fisa_rx_hdl, incorrect_rdi, 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Add new flow if the there is no ongoing flow */
|
||||
fisa_flow = dp_rx_get_fisa_flow(dp_fisa_rx_hdl, vdev,
|
||||
head_nbuf);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -273,6 +274,17 @@ struct hdd_adapter *hdd_get_sta_connection_in_progress(
|
|||
*/
|
||||
void hdd_abort_ongoing_sta_connection(struct hdd_context *hdd_ctx);
|
||||
|
||||
/**
|
||||
* hdd_abort_ongoing_sta_sae_connection() - Disconnect the sta for which the
|
||||
* sae connection is in progress.
|
||||
* @hdd_ctx: hdd context
|
||||
* @adapter: pointer to the adapter
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hdd_abort_ongoing_sta_sae_connection(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter);
|
||||
|
||||
/**
|
||||
* hdd_is_any_sta_connected() - check if any sta in connected state
|
||||
* @hdd_ctx: hdd context
|
||||
|
|
|
|||
|
|
@ -460,6 +460,47 @@ void hdd_abort_ongoing_sta_connection(struct hdd_context *hdd_ctx)
|
|||
}
|
||||
}
|
||||
|
||||
void hdd_abort_ongoing_sta_sae_connection(struct hdd_context *hdd_ctx,
|
||||
struct hdd_adapter *adapter)
|
||||
{
|
||||
struct hdd_adapter *sta_adapter;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
int32_t key_mgmt;
|
||||
QDF_STATUS status;
|
||||
|
||||
sta_adapter = hdd_get_sta_connection_in_progress(hdd_ctx);
|
||||
if (!sta_adapter) {
|
||||
hdd_err("sta_adapter is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
vdev = hdd_objmgr_get_vdev(adapter);
|
||||
if (!vdev) {
|
||||
hdd_err("vdev is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
key_mgmt = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT);
|
||||
hdd_objmgr_put_vdev(vdev);
|
||||
|
||||
if (key_mgmt < 0) {
|
||||
hdd_debug_rl("Invalid key_mgmt: %d", key_mgmt);
|
||||
return;
|
||||
}
|
||||
|
||||
if (QDF_HAS_PARAM(key_mgmt, WLAN_CRYPTO_KEY_MGMT_SAE) ||
|
||||
QDF_HAS_PARAM(key_mgmt, WLAN_CRYPTO_KEY_MGMT_FT_SAE)) {
|
||||
hdd_debug("Disconnecting STA on vdev: %d",
|
||||
sta_adapter->vdev_id);
|
||||
status = wlan_hdd_disconnect(sta_adapter,
|
||||
eCSR_DISCONNECT_REASON_DEAUTH,
|
||||
REASON_DISASSOC_NETWORK_LEAVING);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
hdd_err("wlan_hdd_disconnect failed, status: %d",
|
||||
status);
|
||||
}
|
||||
}
|
||||
|
||||
bool hdd_is_any_sta_connected(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
||||
|
|
|
|||
|
|
@ -5274,6 +5274,21 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* For STA+SAP/GO concurrency support from GUI, In case if
|
||||
* START AP/GO request comes just before the SAE authentication
|
||||
* completion on STA, SAE AUTH REQ waits for START AP RSP and
|
||||
* START AP RSP waits to complete SAE AUTH REQ.
|
||||
* Driver completes START AP RSP only upon SAE AUTH REQ timeout(5 sec)
|
||||
* as start ap will be in serialization pending queue, and SAE auth
|
||||
* sequence cannot complete as hostap thread is blocked in start ap
|
||||
* cfg80211 ops.
|
||||
* To avoid above deadlock until SAE timeout, abort the SAE connection
|
||||
* immediately and complete START AP/GO asap so that the upper layer
|
||||
* can trigger a fresh connection after START AP/GO completion.
|
||||
*/
|
||||
hdd_abort_ongoing_sta_sae_connection(hdd_ctx, adapter);
|
||||
|
||||
mac_handle = hdd_ctx->mac_handle;
|
||||
|
||||
sme_config = qdf_mem_malloc(sizeof(*sme_config));
|
||||
|
|
@ -6043,6 +6058,21 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* For STA+SAP/GO concurrency support from GUI, In case if
|
||||
* STOP AP/GO request comes just before the SAE authentication
|
||||
* completion on STA, SAE AUTH REQ waits for STOP AP RSP and
|
||||
* STOP AP RSP waits to complete SAE AUTH REQ.
|
||||
* Driver completes STOP AP RSP only upon SAE AUTH REQ timeout(5 sec)
|
||||
* as stop ap will be in serialization pending queue, and SAE auth
|
||||
* sequence cannot complete as hostap thread is blocked in stop ap
|
||||
* cfg80211 ops.
|
||||
* To avoid above deadlock until SAE timeout, abort the SAE connection
|
||||
* immediately and complete STOP AP/GO asap so that the upper layer
|
||||
* can trigger a fresh connection after STOP AP/GO completion.
|
||||
*/
|
||||
hdd_abort_ongoing_sta_sae_connection(hdd_ctx, adapter);
|
||||
|
||||
/* Clear SOFTAP_INIT_DONE flag to mark stop_ap deinit. So that we do
|
||||
* not restart SAP after SSR as SAP is already stopped from user space.
|
||||
* This update is moved to start of this function to resolve stop_ap
|
||||
|
|
|
|||
|
|
@ -9696,7 +9696,6 @@ void hdd_prevent_suspend_timeout(uint32_t timeout, uint32_t reason)
|
|||
QDF_STATUS hdd_set_sme_chan_list(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
return sme_init_chan_list(hdd_ctx->mac_handle,
|
||||
hdd_ctx->reg.alpha2,
|
||||
hdd_ctx->reg.cc_src);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@
|
|||
#define QWLAN_VERSION_MAJOR 2
|
||||
#define QWLAN_VERSION_MINOR 0
|
||||
#define QWLAN_VERSION_PATCH 8
|
||||
#define QWLAN_VERSION_EXTRA "M"
|
||||
#define QWLAN_VERSION_EXTRA "R"
|
||||
#define QWLAN_VERSION_BUILD 33
|
||||
|
||||
#define QWLAN_VERSIONSTR "2.0.8.33M"
|
||||
#define QWLAN_VERSIONSTR "2.0.8.33R"
|
||||
|
||||
#endif /* QWLAN_VERSION_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2007, 2014-2018, 2020-2021 The Linux Foundation.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -3861,6 +3862,7 @@ FRAME AssocResponse // 7.2.3.5
|
|||
OPTIE P2PAssocRes;
|
||||
OPTIE VHTCaps;
|
||||
OPTIE VHTOperation;
|
||||
OPTIE OperatingMode;
|
||||
OPTIE ExtCap;
|
||||
OPTIE OBSSScanParameters;
|
||||
OPTIE QosMapSet;
|
||||
|
|
@ -3950,6 +3952,7 @@ FRAME ReAssocResponse // 7.2.3.7
|
|||
OPTIE P2PAssocRes;
|
||||
OPTIE VHTCaps;
|
||||
OPTIE VHTOperation;
|
||||
OPTIE OperatingMode;
|
||||
OPTIE ExtCap;
|
||||
OPTIE OBSSScanParameters;
|
||||
OPTIE QosMapSet;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
*
|
||||
*
|
||||
* This file was automatically generated by 'framesc'
|
||||
* Wed Sep 29 13:23:21 2021 from the following file(s):
|
||||
* Mon May 30 20:50:39 2022 from the following file(s):
|
||||
*
|
||||
* dot11f.frms
|
||||
*
|
||||
|
|
@ -10110,6 +10111,7 @@ typedef struct sDot11fAssocResponse{
|
|||
tDot11fIEP2PAssocRes P2PAssocRes;
|
||||
tDot11fIEVHTCaps VHTCaps;
|
||||
tDot11fIEVHTOperation VHTOperation;
|
||||
tDot11fIEOperatingMode OperatingMode;
|
||||
tDot11fIEExtCap ExtCap;
|
||||
tDot11fIEOBSSScanParameters OBSSScanParameters;
|
||||
tDot11fIEQosMapSet QosMapSet;
|
||||
|
|
@ -11061,6 +11063,7 @@ typedef struct sDot11fReAssocResponse{
|
|||
tDot11fIEP2PAssocRes P2PAssocRes;
|
||||
tDot11fIEVHTCaps VHTCaps;
|
||||
tDot11fIEVHTOperation VHTOperation;
|
||||
tDot11fIEOperatingMode OperatingMode;
|
||||
tDot11fIEExtCap ExtCap;
|
||||
tDot11fIEOBSSScanParameters OBSSScanParameters;
|
||||
tDot11fIEQosMapSet QosMapSet;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -471,6 +471,7 @@ typedef struct sSirAssocRsp {
|
|||
tDot11fIEVHTCaps VHTCaps;
|
||||
tDot11fIEVHTOperation VHTOperation;
|
||||
tDot11fIEExtCap ExtCap;
|
||||
tDot11fIEOperatingMode oper_mode_ntf;
|
||||
struct qos_map_set QosMapSet;
|
||||
#ifdef WLAN_FEATURE_11W
|
||||
tDot11fIETimeoutInterval TimeoutInterval;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -3410,30 +3410,30 @@ void lim_update_vhtcaps_assoc_resp(struct mac_context *mac_ctx,
|
|||
* lim_update_vht_oper_assoc_resp : Update VHT Operations in assoc response.
|
||||
* @mac_ctx Pointer to Global MAC structure
|
||||
* @pAddBssParams: parameters required for add bss params.
|
||||
* @vht_caps: VHT CAP IE to update.
|
||||
* @vht_oper: VHT Operations to update.
|
||||
* @ht_info: HT Info IE to update.
|
||||
* @pe_session : session entry.
|
||||
*
|
||||
* Return : void
|
||||
*/
|
||||
static void lim_update_vht_oper_assoc_resp(struct mac_context *mac_ctx,
|
||||
struct bss_params *pAddBssParams,
|
||||
tDot11fIEVHTOperation *vht_oper, struct pe_session *pe_session)
|
||||
tDot11fIEVHTCaps *vht_caps, tDot11fIEVHTOperation *vht_oper,
|
||||
tDot11fIEHTInfo *ht_info, struct pe_session *pe_session)
|
||||
{
|
||||
int16_t ccfs0 = vht_oper->chan_center_freq_seg0;
|
||||
int16_t ccfs1 = vht_oper->chan_center_freq_seg1;
|
||||
int16_t offset = abs((ccfs0 - ccfs1));
|
||||
uint8_t ch_width;
|
||||
|
||||
ch_width = pAddBssParams->ch_width;
|
||||
if (vht_oper->chanWidth && pe_session->ch_width) {
|
||||
ch_width = CH_WIDTH_80MHZ;
|
||||
if (ccfs1 && offset == 8)
|
||||
ch_width = CH_WIDTH_160MHZ;
|
||||
else if (ccfs1 && offset > 16)
|
||||
ch_width = CH_WIDTH_80P80MHZ;
|
||||
}
|
||||
|
||||
if (vht_oper->chanWidth == WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ &&
|
||||
pe_session->ch_width)
|
||||
ch_width =
|
||||
lim_get_vht_ch_width(vht_caps, vht_oper, ht_info) + 1;
|
||||
|
||||
if (ch_width > pe_session->ch_width)
|
||||
ch_width = pe_session->ch_width;
|
||||
|
||||
pAddBssParams->ch_width = ch_width;
|
||||
pAddBssParams->staContext.ch_width = ch_width;
|
||||
}
|
||||
|
|
@ -3529,11 +3529,34 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
|||
lim_get_ht_capability(mac,
|
||||
eHT_SUPPORTED_CHANNEL_WIDTH_SET,
|
||||
pe_session);
|
||||
|
||||
lim_sta_add_bss_update_ht_parameter(bssDescription->chan_freq,
|
||||
&pAssocRsp->HTCaps,
|
||||
&pAssocRsp->HTInfo,
|
||||
chan_width_support,
|
||||
pAddBssParams);
|
||||
/**
|
||||
* in limExtractApCapability function intersection of FW
|
||||
* advertised channel width and AP advertised channel
|
||||
* width has been taken into account for calculating
|
||||
* pe_session->ch_width
|
||||
*/
|
||||
|
||||
if (chan_width_support &&
|
||||
((pAssocRsp->HTCaps.present &&
|
||||
pAssocRsp->HTCaps.supportedChannelWidthSet) ||
|
||||
(pBeaconStruct->HTCaps.present &&
|
||||
pBeaconStruct->HTCaps.supportedChannelWidthSet))) {
|
||||
pAddBssParams->ch_width =
|
||||
pe_session->ch_width;
|
||||
pAddBssParams->staContext.ch_width =
|
||||
pe_session->ch_width;
|
||||
} else {
|
||||
pAddBssParams->ch_width = CH_WIDTH_20MHZ;
|
||||
pAddBssParams->staContext.ch_width = CH_WIDTH_20MHZ;
|
||||
if (!vht_cap_info->enable_txbf_20mhz)
|
||||
pAddBssParams->staContext.vhtTxBFCapable = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (pe_session->vhtCapability && (pAssocRsp->VHTCaps.present)) {
|
||||
|
|
@ -3553,7 +3576,9 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
|||
if (pAddBssParams->vhtCapable) {
|
||||
if (vht_oper)
|
||||
lim_update_vht_oper_assoc_resp(mac, pAddBssParams,
|
||||
vht_oper, pe_session);
|
||||
vht_caps, vht_oper,
|
||||
&pAssocRsp->HTInfo,
|
||||
pe_session);
|
||||
if (vht_caps)
|
||||
lim_update_vhtcaps_assoc_resp(mac, pAddBssParams,
|
||||
vht_caps, pe_session);
|
||||
|
|
@ -3664,26 +3689,6 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
|
|||
sta);
|
||||
}
|
||||
|
||||
/*
|
||||
* in limExtractApCapability function intersection of FW
|
||||
* advertised channel width and AP advertised channel
|
||||
* width has been taken into account for calculating
|
||||
* pe_session->ch_width
|
||||
*/
|
||||
if (chan_width_support &&
|
||||
((pAssocRsp->HTCaps.supportedChannelWidthSet) ||
|
||||
(pBeaconStruct->HTCaps.supportedChannelWidthSet))) {
|
||||
pAddBssParams->ch_width =
|
||||
pe_session->ch_width;
|
||||
pAddBssParams->staContext.ch_width =
|
||||
pe_session->ch_width;
|
||||
} else {
|
||||
pAddBssParams->ch_width = CH_WIDTH_20MHZ;
|
||||
sta_context->ch_width = CH_WIDTH_20MHZ;
|
||||
if (!vht_cap_info->enable_txbf_20mhz)
|
||||
sta_context->vhtTxBFCapable = 0;
|
||||
}
|
||||
|
||||
pAddBssParams->staContext.mimoPS =
|
||||
(tSirMacHTMIMOPowerSaveState)
|
||||
pAssocRsp->HTCaps.mimoPowerSave;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -244,10 +244,7 @@ static void __lim_process_operating_mode_action_frame(struct mac_context *mac_ct
|
|||
uint32_t status;
|
||||
tpDphHashNode sta_ptr;
|
||||
uint16_t aid;
|
||||
uint8_t oper_mode;
|
||||
uint8_t cb_mode;
|
||||
uint8_t ch_bw = 0;
|
||||
uint8_t skip_opmode_update = false;
|
||||
|
||||
mac_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
|
||||
body_ptr = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
|
||||
|
|
@ -287,87 +284,13 @@ static void __lim_process_operating_mode_action_frame(struct mac_context *mac_ct
|
|||
goto end;
|
||||
}
|
||||
|
||||
if (wlan_reg_is_24ghz_ch_freq(session->curr_op_freq))
|
||||
cb_mode = mac_ctx->roam.configParam.channelBondingMode24GHz;
|
||||
else
|
||||
cb_mode = mac_ctx->roam.configParam.channelBondingMode5GHz;
|
||||
/*
|
||||
* Do not update the channel bonding mode if channel bonding
|
||||
* mode is disabled in INI.
|
||||
*/
|
||||
if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE == cb_mode) {
|
||||
pe_debug("channel bonding disabled");
|
||||
goto update_nss;
|
||||
}
|
||||
lim_update_nss(mac_ctx, sta_ptr,
|
||||
operating_mode_frm->OperatingMode.rxNSS,
|
||||
session);
|
||||
|
||||
if (sta_ptr->htSupportedChannelWidthSet) {
|
||||
if (WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ <
|
||||
sta_ptr->vhtSupportedChannelWidthSet)
|
||||
oper_mode = eHT_CHANNEL_WIDTH_160MHZ;
|
||||
else
|
||||
oper_mode = sta_ptr->vhtSupportedChannelWidthSet + 1;
|
||||
} else {
|
||||
oper_mode = eHT_CHANNEL_WIDTH_20MHZ;
|
||||
}
|
||||
|
||||
if ((oper_mode == eHT_CHANNEL_WIDTH_80MHZ) &&
|
||||
(operating_mode_frm->OperatingMode.chanWidth >
|
||||
eHT_CHANNEL_WIDTH_80MHZ))
|
||||
skip_opmode_update = true;
|
||||
|
||||
if (!skip_opmode_update && (oper_mode !=
|
||||
operating_mode_frm->OperatingMode.chanWidth)) {
|
||||
uint32_t fw_vht_ch_wd = wma_get_vht_ch_width();
|
||||
|
||||
pe_debug("received Chanwidth: %d",
|
||||
operating_mode_frm->OperatingMode.chanWidth);
|
||||
|
||||
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 (operating_mode_frm->OperatingMode.chanWidth >=
|
||||
eHT_CHANNEL_WIDTH_160MHZ
|
||||
&& (fw_vht_ch_wd >= eHT_CHANNEL_WIDTH_160MHZ)) {
|
||||
sta_ptr->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ;
|
||||
sta_ptr->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
ch_bw = eHT_CHANNEL_WIDTH_160MHZ;
|
||||
} else if (operating_mode_frm->OperatingMode.chanWidth >=
|
||||
eHT_CHANNEL_WIDTH_80MHZ) {
|
||||
sta_ptr->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ;
|
||||
sta_ptr->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
ch_bw = eHT_CHANNEL_WIDTH_80MHZ;
|
||||
} else if (operating_mode_frm->OperatingMode.chanWidth ==
|
||||
eHT_CHANNEL_WIDTH_40MHZ) {
|
||||
sta_ptr->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
|
||||
sta_ptr->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
ch_bw = eHT_CHANNEL_WIDTH_40MHZ;
|
||||
} else if (operating_mode_frm->OperatingMode.chanWidth ==
|
||||
eHT_CHANNEL_WIDTH_20MHZ) {
|
||||
sta_ptr->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
|
||||
sta_ptr->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_20MHZ;
|
||||
ch_bw = eHT_CHANNEL_WIDTH_20MHZ;
|
||||
}
|
||||
lim_check_vht_op_mode_change(mac_ctx, session, ch_bw,
|
||||
mac_hdr->sa);
|
||||
}
|
||||
|
||||
update_nss:
|
||||
if (sta_ptr->vhtSupportedRxNss !=
|
||||
(operating_mode_frm->OperatingMode.rxNSS + 1)) {
|
||||
sta_ptr->vhtSupportedRxNss =
|
||||
operating_mode_frm->OperatingMode.rxNSS + 1;
|
||||
lim_set_nss_change(mac_ctx, session, sta_ptr->vhtSupportedRxNss,
|
||||
mac_hdr->sa);
|
||||
}
|
||||
lim_update_channel_width(mac_ctx, sta_ptr, session,
|
||||
operating_mode_frm->OperatingMode.chanWidth,
|
||||
&ch_bw);
|
||||
|
||||
end:
|
||||
qdf_mem_free(operating_mode_frm);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -139,6 +139,7 @@ void lim_update_assoc_sta_datas(struct mac_context *mac_ctx,
|
|||
tDot11fIEVHTCaps *vht_caps = NULL;
|
||||
tDot11fIEhe_cap *he_cap = NULL;
|
||||
struct bss_description *bss_desc = NULL;
|
||||
tDot11fIEVHTOperation *vht_oper = NULL;
|
||||
|
||||
lim_get_phy_mode(mac_ctx, &phy_mode, session_entry);
|
||||
sta_ds->staType = STA_ENTRY_SELF;
|
||||
|
|
@ -155,10 +156,13 @@ void lim_update_assoc_sta_datas(struct mac_context *mac_ctx,
|
|||
lim_update_stads_htcap(mac_ctx, sta_ds, assoc_rsp,
|
||||
session_entry);
|
||||
|
||||
if (assoc_rsp->VHTCaps.present)
|
||||
if (assoc_rsp->VHTCaps.present) {
|
||||
vht_caps = &assoc_rsp->VHTCaps;
|
||||
else if (assoc_rsp->vendor_vht_ie.VHTCaps.present)
|
||||
vht_oper = &assoc_rsp->VHTOperation;
|
||||
} else if (assoc_rsp->vendor_vht_ie.VHTCaps.present) {
|
||||
vht_caps = &assoc_rsp->vendor_vht_ie.VHTCaps;
|
||||
vht_oper = &assoc_rsp->vendor_vht_ie.VHTOperation;
|
||||
}
|
||||
|
||||
if (session_entry->vhtCapability && (vht_caps && vht_caps->present)) {
|
||||
sta_ds->mlmStaContext.vhtCapability =
|
||||
|
|
@ -171,13 +175,16 @@ void lim_update_assoc_sta_datas(struct mac_context *mac_ctx,
|
|||
*/
|
||||
sta_ds->htMaxRxAMpduFactor = vht_caps->maxAMPDULenExp;
|
||||
if (session_entry->htSupportedChannelWidthSet) {
|
||||
if (assoc_rsp->VHTOperation.present)
|
||||
if (vht_oper && vht_oper->present)
|
||||
sta_ds->vhtSupportedChannelWidthSet =
|
||||
assoc_rsp->VHTOperation.chanWidth;
|
||||
lim_get_vht_ch_width(vht_caps,
|
||||
vht_oper,
|
||||
&assoc_rsp->HTInfo);
|
||||
else
|
||||
sta_ds->vhtSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
|
||||
}
|
||||
|
||||
sta_ds->vht_mcs_10_11_supp = 0;
|
||||
if (mac_ctx->mlme_cfg->vht_caps.vht_cap_info.
|
||||
vht_mcs_10_11_supp &&
|
||||
|
|
@ -289,6 +296,13 @@ void lim_update_assoc_sta_datas(struct mac_context *mac_ctx,
|
|||
if (session_entry->limRmfEnabled)
|
||||
sta_ds->rmfEnabled = 1;
|
||||
#endif
|
||||
if (session_entry->vhtCapability && assoc_rsp->oper_mode_ntf.present) {
|
||||
/**
|
||||
* OMN IE is present in the Assoc response, but the channel
|
||||
* width/Rx NSS update will happen through the peer_assoc cmd.
|
||||
*/
|
||||
pe_debug("OMN IE is present in the assoc response frame");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -205,6 +205,7 @@ static void populate_dot11f_tdls_offchannel_params(
|
|||
uint8_t nss_2g;
|
||||
uint8_t nss_5g;
|
||||
qdf_freq_t ch_freq;
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
numChans = mac->mlme_cfg->reg.valid_channel_list_num;
|
||||
|
||||
|
|
@ -270,13 +271,14 @@ static void populate_dot11f_tdls_offchannel_params(
|
|||
break;
|
||||
}
|
||||
|
||||
wlan_reg_read_current_country(mac->psoc, reg_cc);
|
||||
op_class = wlan_reg_dmn_get_opclass_from_channel(
|
||||
mac->scan.countryCodeCurrent,
|
||||
reg_cc,
|
||||
wlan_reg_freq_to_chan(mac->pdev, pe_session->curr_op_freq),
|
||||
chanOffset);
|
||||
|
||||
pe_debug("countryCodeCurrent: %s, curr_op_freq: %d, htSecondaryChannelOffset: %d, chanOffset: %d op class: %d",
|
||||
mac->scan.countryCodeCurrent,
|
||||
reg_cc,
|
||||
pe_session->curr_op_freq,
|
||||
pe_session->htSecondaryChannelOffset,
|
||||
chanOffset, op_class);
|
||||
|
|
|
|||
|
|
@ -4288,6 +4288,7 @@ lim_send_extended_chan_switch_action_frame(struct mac_context *mac_ctx,
|
|||
uint8_t vdev_id = 0;
|
||||
uint8_t ch_spacing;
|
||||
tLimWiderBWChannelSwitchInfo *wide_bw_ie;
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
if (!session_entry) {
|
||||
pe_err("Session entry is NULL!!!");
|
||||
|
|
@ -4306,9 +4307,9 @@ lim_send_extended_chan_switch_action_frame(struct mac_context *mac_ctx,
|
|||
frm.ext_chan_switch_ann_action.new_channel = new_channel;
|
||||
frm.ext_chan_switch_ann_action.switch_count = count;
|
||||
|
||||
wlan_reg_read_current_country(mac_ctx->psoc, reg_cc);
|
||||
ch_spacing = wlan_reg_dmn_get_chanwidth_from_opclass(
|
||||
mac_ctx->scan.countryCodeCurrent, new_channel,
|
||||
new_op_class);
|
||||
reg_cc, new_channel, new_op_class);
|
||||
|
||||
if ((ch_spacing == 80) || (ch_spacing == 160)) {
|
||||
wide_bw_ie = &session_entry->gLimWiderBWChannelSwitch;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -477,6 +478,7 @@ QDF_STATUS lim_send_ht40_obss_scanind(struct mac_context *mac_ctx,
|
|||
uint32_t channelnum, chan_freq;
|
||||
struct scheduler_msg msg = {0};
|
||||
uint8_t channel24gnum, count;
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
ht40_obss_scanind = qdf_mem_malloc(sizeof(struct obss_ht40_scanind));
|
||||
if (!ht40_obss_scanind)
|
||||
|
|
@ -485,6 +487,7 @@ QDF_STATUS lim_send_ht40_obss_scanind(struct mac_context *mac_ctx,
|
|||
"OBSS Scan Indication bssid " QDF_MAC_ADDR_FMT,
|
||||
QDF_MAC_ADDR_REF(session->bssId));
|
||||
|
||||
wlan_reg_read_current_country(mac_ctx->psoc, reg_cc);
|
||||
ht40_obss_scanind->cmd = HT40_OBSS_SCAN_PARAM_START;
|
||||
ht40_obss_scanind->scan_type = eSIR_ACTIVE_SCAN;
|
||||
ht40_obss_scanind->obss_passive_dwelltime =
|
||||
|
|
@ -503,7 +506,7 @@ QDF_STATUS lim_send_ht40_obss_scanind(struct mac_context *mac_ctx,
|
|||
session->obss_ht40_scanparam.obss_activity_threshold;
|
||||
ht40_obss_scanind->current_operatingclass =
|
||||
wlan_reg_dmn_get_opclass_from_channel(
|
||||
mac_ctx->scan.countryCodeCurrent,
|
||||
reg_cc,
|
||||
wlan_reg_freq_to_chan(
|
||||
mac_ctx->pdev, session->curr_op_freq),
|
||||
session->ch_width);
|
||||
|
|
|
|||
|
|
@ -9301,3 +9301,129 @@ QDF_STATUS lim_pre_vdev_start(struct mac_context *mac,
|
|||
|
||||
return lim_set_ch_phy_mode(mlme_obj->vdev, session->dot11mode);
|
||||
}
|
||||
|
||||
void lim_update_nss(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
|
||||
uint8_t rx_nss, struct pe_session *session)
|
||||
{
|
||||
if (sta_ds->vhtSupportedRxNss != (rx_nss + 1)) {
|
||||
if (session->nss_forced_1x1) {
|
||||
pe_debug("Not Updating NSS for special AP");
|
||||
return;
|
||||
}
|
||||
sta_ds->vhtSupportedRxNss = rx_nss + 1;
|
||||
lim_set_nss_change(mac_ctx, session,
|
||||
sta_ds->vhtSupportedRxNss,
|
||||
sta_ds->staAddr);
|
||||
}
|
||||
}
|
||||
|
||||
bool lim_update_channel_width(struct mac_context *mac_ctx,
|
||||
tpDphHashNode sta_ptr,
|
||||
struct pe_session *session,
|
||||
uint8_t ch_width, uint8_t *new_ch_width)
|
||||
{
|
||||
uint8_t cb_mode, oper_mode;
|
||||
uint32_t fw_vht_ch_wd;
|
||||
|
||||
if (wlan_reg_is_24ghz_ch_freq(session->curr_op_freq))
|
||||
cb_mode = mac_ctx->roam.configParam.channelBondingMode24GHz;
|
||||
else
|
||||
cb_mode = mac_ctx->roam.configParam.channelBondingMode5GHz;
|
||||
/*
|
||||
* Do not update the channel bonding mode if channel bonding
|
||||
* mode is disabled in INI.
|
||||
*/
|
||||
if (cb_mode == WNI_CFG_CHANNEL_BONDING_MODE_DISABLE) {
|
||||
pe_debug("channel bonding disabled");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sta_ptr->htSupportedChannelWidthSet) {
|
||||
if (sta_ptr->vhtSupportedChannelWidthSet >
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
|
||||
oper_mode = eHT_CHANNEL_WIDTH_160MHZ;
|
||||
else
|
||||
oper_mode = sta_ptr->vhtSupportedChannelWidthSet + 1;
|
||||
} else {
|
||||
oper_mode = eHT_CHANNEL_WIDTH_20MHZ;
|
||||
}
|
||||
|
||||
if (((oper_mode == eHT_CHANNEL_WIDTH_80MHZ) &&
|
||||
(ch_width > eHT_CHANNEL_WIDTH_80MHZ)) ||
|
||||
(oper_mode == ch_width))
|
||||
return false;
|
||||
|
||||
fw_vht_ch_wd = wma_get_vht_ch_width();
|
||||
|
||||
pe_debug("ChannelWidth - Current : %d, New: %d mac : " QDF_MAC_ADDR_FMT,
|
||||
oper_mode, ch_width, QDF_MAC_ADDR_REF(sta_ptr->staAddr));
|
||||
|
||||
if (ch_width >= eHT_CHANNEL_WIDTH_160MHZ &&
|
||||
(fw_vht_ch_wd >= eHT_CHANNEL_WIDTH_160MHZ)) {
|
||||
sta_ptr->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ;
|
||||
sta_ptr->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
*new_ch_width = eHT_CHANNEL_WIDTH_160MHZ;
|
||||
} else if (ch_width >= eHT_CHANNEL_WIDTH_80MHZ) {
|
||||
sta_ptr->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ;
|
||||
sta_ptr->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
*new_ch_width = eHT_CHANNEL_WIDTH_80MHZ;
|
||||
} else if (ch_width == eHT_CHANNEL_WIDTH_40MHZ) {
|
||||
sta_ptr->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
|
||||
sta_ptr->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
*new_ch_width = eHT_CHANNEL_WIDTH_40MHZ;
|
||||
} else if (ch_width == eHT_CHANNEL_WIDTH_20MHZ) {
|
||||
sta_ptr->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
|
||||
sta_ptr->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_20MHZ;
|
||||
*new_ch_width = eHT_CHANNEL_WIDTH_20MHZ;
|
||||
}
|
||||
|
||||
lim_check_vht_op_mode_change(mac_ctx, session, *new_ch_width,
|
||||
sta_ptr->staAddr);
|
||||
return true;
|
||||
}
|
||||
|
||||
uint8_t lim_get_vht_ch_width(tDot11fIEVHTCaps *vht_cap,
|
||||
tDot11fIEVHTOperation *vht_op,
|
||||
tDot11fIEHTInfo *ht_info)
|
||||
{
|
||||
uint8_t ccfs0, ccfs1, offset;
|
||||
uint8_t ch_width;
|
||||
|
||||
ccfs0 = vht_op->chan_center_freq_seg0;
|
||||
ccfs1 = vht_op->chan_center_freq_seg1;
|
||||
ch_width = vht_op->chanWidth;
|
||||
|
||||
if (ch_width > WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ) {
|
||||
pe_err("Invalid ch width in vht operation IE %d", ch_width);
|
||||
return WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
|
||||
}
|
||||
|
||||
if (vht_cap->vht_extended_nss_bw_cap &&
|
||||
vht_cap->extended_nss_bw_supp && ht_info && ht_info->present)
|
||||
ccfs1 = ht_info->chan_center_freq_seg2;
|
||||
|
||||
/* According to new VHTOP IE definition, vht ch_width will
|
||||
* be 1 for 80MHz, 160MHz and 80+80MHz.
|
||||
*
|
||||
* To get the correct operation ch_width, find center
|
||||
* frequency difference.
|
||||
*/
|
||||
if (ch_width == WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ && ccfs1) {
|
||||
offset = abs(ccfs0 - ccfs1);
|
||||
|
||||
if (offset == 8)
|
||||
ch_width = WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ;
|
||||
else if (offset > 16)
|
||||
ch_width = WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ;
|
||||
}
|
||||
pe_debug("The VHT Operation channel width is %d", ch_width);
|
||||
return ch_width;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2261,4 +2261,49 @@ static inline void lim_process_sae_msg(struct mac_context *mac, void *body);
|
|||
{}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* lim_update_nss() - Function to update NSS
|
||||
* @mac_ctx: pointer to Global Mac structure
|
||||
* @sta_ds: pointer to tpDphHashNode
|
||||
* @rx_nss: Rx NSS in operating mode notification
|
||||
* @session: pointer to pe_session
|
||||
*
|
||||
* function to update NSS
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void lim_update_nss(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
|
||||
uint8_t rx_nss, struct pe_session *session);
|
||||
|
||||
/**
|
||||
* lim_update_channel_width() - Function to update channel width
|
||||
* @mac_ctx: pointer to Global Mac structure
|
||||
* @sta_ptr: pointer to tpDphHashNode
|
||||
* @session: pointer to pe_session
|
||||
* @ch_width: Channel width in operating mode notification
|
||||
* @new_ch_width: Final channel bandwifdth
|
||||
*
|
||||
* function to update channel width
|
||||
*
|
||||
* Return: Success or Failure
|
||||
*/
|
||||
bool lim_update_channel_width(struct mac_context *mac_ctx,
|
||||
tpDphHashNode sta_ptr,
|
||||
struct pe_session *session,
|
||||
uint8_t ch_width,
|
||||
uint8_t *new_ch_width);
|
||||
|
||||
/**
|
||||
* lim_get_vht_ch_width() - Function to get the VHT
|
||||
* operating channel width based on frequency params
|
||||
*
|
||||
* @vht_cap: Pointer to VHT Caps IE.
|
||||
* @vht_op: Pointer to VHT Operation IE.
|
||||
* @ht_info: Pointer to HT Info IE.
|
||||
*
|
||||
* Return: VHT channel width
|
||||
*/
|
||||
uint8_t lim_get_vht_ch_width(tDot11fIEVHTCaps *vht_cap,
|
||||
tDot11fIEVHTOperation *vht_op,
|
||||
tDot11fIEHTInfo *ht_info);
|
||||
#endif /* __LIM_UTILS_H */
|
||||
|
|
|
|||
|
|
@ -241,36 +241,6 @@ ap_beacon_process(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
|
|||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* get_operating_channel_width() - Get operating channel width
|
||||
* @stads - station entry.
|
||||
*
|
||||
* This function returns the operating channel width based on
|
||||
* the supported channel width entry.
|
||||
*
|
||||
* Return: tSirMacHTChannelWidth on success
|
||||
*/
|
||||
static tSirMacHTChannelWidth get_operating_channel_width(tpDphHashNode stads)
|
||||
{
|
||||
tSirMacHTChannelWidth ch_width = eHT_CHANNEL_WIDTH_20MHZ;
|
||||
|
||||
if (stads->vhtSupportedChannelWidthSet ==
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ)
|
||||
ch_width = eHT_CHANNEL_WIDTH_160MHZ;
|
||||
else if (stads->vhtSupportedChannelWidthSet ==
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ)
|
||||
ch_width = eHT_CHANNEL_WIDTH_160MHZ;
|
||||
else if (stads->vhtSupportedChannelWidthSet ==
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
|
||||
ch_width = eHT_CHANNEL_WIDTH_80MHZ;
|
||||
else if (stads->htSupportedChannelWidthSet)
|
||||
ch_width = eHT_CHANNEL_WIDTH_40MHZ;
|
||||
else
|
||||
ch_width = eHT_CHANNEL_WIDTH_20MHZ;
|
||||
|
||||
return ch_width;
|
||||
}
|
||||
|
||||
/*
|
||||
* sch_bcn_process_sta() - Process the received beacon frame for sta
|
||||
* @mac_ctx: mac_ctx
|
||||
|
|
@ -415,35 +385,6 @@ sch_bcn_process_sta(struct mac_context *mac_ctx,
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* update_nss() - Function to update NSS
|
||||
* @mac_ctx: pointer to Global Mac structure
|
||||
* @sta_ds: pointer to tpDphHashNode
|
||||
* @beacon: pointer to tpSchBeaconStruct
|
||||
* @session_entry: pointer to struct pe_session *
|
||||
* @mgmt_hdr: pointer to tpSirMacMgmtHdr
|
||||
*
|
||||
* function to update NSS
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void update_nss(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
|
||||
tpSchBeaconStruct beacon, struct pe_session *session_entry,
|
||||
tpSirMacMgmtHdr mgmt_hdr)
|
||||
{
|
||||
if (sta_ds->vhtSupportedRxNss != (beacon->OperatingMode.rxNSS + 1)) {
|
||||
if (session_entry->nss_forced_1x1) {
|
||||
pe_debug("Not Updating NSS for special AP");
|
||||
return;
|
||||
}
|
||||
sta_ds->vhtSupportedRxNss =
|
||||
beacon->OperatingMode.rxNSS + 1;
|
||||
lim_set_nss_change(mac_ctx, session_entry,
|
||||
sta_ds->vhtSupportedRxNss,
|
||||
mgmt_hdr->sa);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11AX_BSS_COLOR
|
||||
static void
|
||||
sch_bcn_update_he_ies(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
|
||||
|
|
@ -499,7 +440,7 @@ sch_bcn_update_opmode_change(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
|
|||
bool skip_opmode_update = false;
|
||||
uint8_t oper_mode;
|
||||
uint32_t fw_vht_ch_wd = wma_get_vht_ch_width();
|
||||
uint8_t ch_width = 0;
|
||||
uint8_t ch_width = 0, ch_bw;
|
||||
|
||||
/*
|
||||
* Ignore opmode change during channel change The opmode will be updated
|
||||
|
|
@ -511,72 +452,10 @@ sch_bcn_update_opmode_change(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
|
|||
}
|
||||
|
||||
if (session->vhtCapability && bcn->OperatingMode.present) {
|
||||
update_nss(mac_ctx, sta_ds, bcn, session, mac_hdr);
|
||||
oper_mode = get_operating_channel_width(sta_ds);
|
||||
if ((oper_mode == eHT_CHANNEL_WIDTH_80MHZ) &&
|
||||
(bcn->OperatingMode.chanWidth > eHT_CHANNEL_WIDTH_80MHZ))
|
||||
skip_opmode_update = true;
|
||||
|
||||
if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE == cb_mode) {
|
||||
/*
|
||||
* if channel bonding is disabled from INI do not
|
||||
* update the chan width
|
||||
*/
|
||||
pe_debug_rl("CB disabled skip bw update: old[%d] new[%d]",
|
||||
oper_mode,
|
||||
bcn->OperatingMode.chanWidth);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!skip_opmode_update &&
|
||||
((oper_mode != bcn->OperatingMode.chanWidth) ||
|
||||
(sta_ds->vhtSupportedRxNss !=
|
||||
(bcn->OperatingMode.rxNSS + 1)))) {
|
||||
pe_debug("received OpMode Chanwidth %d",
|
||||
bcn->OperatingMode.chanWidth);
|
||||
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->OperatingMode.chanWidth >=
|
||||
eHT_CHANNEL_WIDTH_160MHZ) &&
|
||||
(fw_vht_ch_wd > eHT_CHANNEL_WIDTH_80MHZ)) {
|
||||
pe_debug("Updating the CH Width to 160MHz");
|
||||
sta_ds->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ;
|
||||
sta_ds->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
ch_width = eHT_CHANNEL_WIDTH_160MHZ;
|
||||
} else if (bcn->OperatingMode.chanWidth >=
|
||||
eHT_CHANNEL_WIDTH_80MHZ) {
|
||||
pe_debug("Updating the CH Width to 80MHz");
|
||||
sta_ds->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ;
|
||||
sta_ds->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
ch_width = eHT_CHANNEL_WIDTH_80MHZ;
|
||||
} else if (bcn->OperatingMode.chanWidth ==
|
||||
eHT_CHANNEL_WIDTH_40MHZ) {
|
||||
pe_debug("Updating the CH Width to 40MHz");
|
||||
sta_ds->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
|
||||
sta_ds->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_40MHZ;
|
||||
ch_width = eHT_CHANNEL_WIDTH_40MHZ;
|
||||
} else if (bcn->OperatingMode.chanWidth ==
|
||||
eHT_CHANNEL_WIDTH_20MHZ) {
|
||||
pe_debug("Updating the CH Width to 20MHz");
|
||||
sta_ds->vhtSupportedChannelWidthSet =
|
||||
WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ;
|
||||
sta_ds->htSupportedChannelWidthSet =
|
||||
eHT_CHANNEL_WIDTH_20MHZ;
|
||||
ch_width = eHT_CHANNEL_WIDTH_20MHZ;
|
||||
}
|
||||
lim_check_vht_op_mode_change(mac_ctx, session,
|
||||
ch_width, mac_hdr->sa);
|
||||
update_nss(mac_ctx, sta_ds, bcn, session, mac_hdr);
|
||||
}
|
||||
lim_update_nss(mac_ctx, sta_ds, bcn->OperatingMode.rxNSS,
|
||||
session);
|
||||
lim_update_channel_width(mac_ctx, sta_ds, session,
|
||||
bcn->OperatingMode.chanWidth, &ch_bw);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -24,7 +25,7 @@
|
|||
*
|
||||
*
|
||||
* This file was automatically generated by 'framesc'
|
||||
* Wed Sep 29 13:23:21 2021 from the following file(s):
|
||||
* Mon May 30 20:50:39 2022 from the following file(s):
|
||||
*
|
||||
* dot11f.frms
|
||||
*
|
||||
|
|
@ -10202,6 +10203,10 @@ static const tIEDefn IES_AssocResponse[] = {
|
|||
offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation",
|
||||
0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0},
|
||||
0, DOT11F_EID_VHTOPERATION, 0, 0, },
|
||||
{ offsetof(tDot11fAssocResponse, OperatingMode),
|
||||
offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode",
|
||||
0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0},
|
||||
0, DOT11F_EID_OPERATINGMODE, 0, 0, },
|
||||
{ offsetof(tDot11fAssocResponse, ExtCap), offsetof(tDot11fIEExtCap,
|
||||
present), 0, "ExtCap", 0, 3, 17, SigIeExtCap, {0, 0, 0, 0, 0},
|
||||
0, DOT11F_EID_EXTCAP, 0, 0, },
|
||||
|
|
@ -12055,6 +12060,10 @@ static const tIEDefn IES_ReAssocResponse[] = {
|
|||
offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation",
|
||||
0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0},
|
||||
0, DOT11F_EID_VHTOPERATION, 0, 0, },
|
||||
{ offsetof(tDot11fReAssocResponse, OperatingMode),
|
||||
offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode",
|
||||
0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0},
|
||||
0, DOT11F_EID_OPERATINGMODE, 0, 0, },
|
||||
{ offsetof(tDot11fReAssocResponse, ExtCap), offsetof(tDot11fIEExtCap,
|
||||
present), 0, "ExtCap", 0, 3, 17, SigIeExtCap, {0, 0, 0, 0, 0},
|
||||
0, DOT11F_EID_EXTCAP, 0, 0, },
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -185,6 +185,7 @@ void populate_dot_11_f_ext_chann_switch_ann(struct mac_context *mac_ptr,
|
|||
uint32_t sw_target_freq;
|
||||
uint8_t primary_channel;
|
||||
enum phy_ch_width ch_width;
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
ch_width = session_entry->gLimChannelSwitch.ch_width;
|
||||
ch_offset = session_entry->gLimChannelSwitch.sec_ch_offset;
|
||||
|
|
@ -201,8 +202,9 @@ void populate_dot_11_f_ext_chann_switch_ann(struct mac_context *mac_ptr,
|
|||
session_entry->gLimChannelSwitch.switchCount;
|
||||
dot_11_ptr->present = 1;
|
||||
|
||||
wlan_reg_read_current_country(mac_ptr->psoc, reg_cc);
|
||||
pe_debug("country:%s chan:%d freq %d width:%d reg:%d off:%d",
|
||||
mac_ptr->scan.countryCodeCurrent,
|
||||
reg_cc,
|
||||
session_entry->gLimChannelSwitch.primaryChannel,
|
||||
sw_target_freq,
|
||||
session_entry->gLimChannelSwitch.ch_width,
|
||||
|
|
@ -3512,6 +3514,10 @@ sir_convert_assoc_resp_frame2_struct(struct mac_context *mac,
|
|||
ext_cap->fine_time_meas_responder);
|
||||
}
|
||||
|
||||
if (ar->OperatingMode.present) {
|
||||
qdf_mem_copy(&pAssocRsp->oper_mode_ntf, &ar->OperatingMode,
|
||||
sizeof(tDot11fIEOperatingMode));
|
||||
}
|
||||
if (ar->QosMapSet.present) {
|
||||
pAssocRsp->QosMapSet.present = 1;
|
||||
convert_qos_mapset_frame(mac, &pAssocRsp->QosMapSet,
|
||||
|
|
|
|||
|
|
@ -274,7 +274,6 @@ typedef struct sCsrChnPower_ {
|
|||
|
||||
typedef struct tagCsr11dinfo {
|
||||
sCsrChannel Channels;
|
||||
uint8_t countryCode[REG_ALPHA2_LEN + 1];
|
||||
/* max power channel list */
|
||||
sCsrChnPower ChnPower[CFG_VALID_CHANNEL_LIST_LEN];
|
||||
} tCsr11dinfo;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -399,8 +399,6 @@ struct csr_scanstruct {
|
|||
tDblLinkList channelPowerInfoList5G;
|
||||
uint32_t nLastAgeTimeOut;
|
||||
uint32_t nAgingCountDown;
|
||||
uint8_t countryCodeDefault[REG_ALPHA2_LEN + 1];
|
||||
uint8_t countryCodeCurrent[REG_ALPHA2_LEN + 1];
|
||||
uint8_t countryCode11d[REG_ALPHA2_LEN + 1];
|
||||
v_REGDOMAIN_t domainIdDefault; /* default regulatory domain */
|
||||
v_REGDOMAIN_t domainIdCurrent; /* current regulatory domain */
|
||||
|
|
@ -895,7 +893,7 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
|
|||
struct csr_config_params *pParam);
|
||||
QDF_STATUS csr_msg_processor(struct mac_context *mac, void *msg_buf);
|
||||
QDF_STATUS csr_open(struct mac_context *mac);
|
||||
QDF_STATUS csr_init_chan_list(struct mac_context *mac, uint8_t *alpha2);
|
||||
QDF_STATUS csr_init_chan_list(struct mac_context *mac);
|
||||
QDF_STATUS csr_close(struct mac_context *mac);
|
||||
QDF_STATUS csr_start(struct mac_context *mac);
|
||||
QDF_STATUS csr_stop(struct mac_context *mac);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -256,8 +257,7 @@ enum {
|
|||
Function declarations and documenation
|
||||
------------------------------------------------------------------------*/
|
||||
QDF_STATUS sme_open(mac_handle_t mac_handle);
|
||||
QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, uint8_t *alpha2,
|
||||
enum country_src cc_src);
|
||||
QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, enum country_src cc_src);
|
||||
QDF_STATUS sme_close(mac_handle_t mac_handle);
|
||||
QDF_STATUS sme_start(mac_handle_t mac_handle);
|
||||
|
||||
|
|
|
|||
|
|
@ -861,8 +861,7 @@ QDF_STATUS sme_open(mac_handle_t mac_handle)
|
|||
/*
|
||||
* sme_init_chan_list, triggers channel setup based on country code.
|
||||
*/
|
||||
QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, uint8_t *alpha2,
|
||||
enum country_src cc_src)
|
||||
QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, enum country_src cc_src)
|
||||
{
|
||||
struct mac_context *pmac = MAC_CONTEXT(mac_handle);
|
||||
|
||||
|
|
@ -871,7 +870,7 @@ QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, uint8_t *alpha2,
|
|||
pmac->mlme_cfg->gen.enabled_11d = false;
|
||||
}
|
||||
|
||||
return csr_init_chan_list(pmac, alpha2);
|
||||
return csr_init_chan_list(pmac);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -13090,7 +13089,9 @@ void sme_get_opclass(mac_handle_t mac_handle, uint8_t channel,
|
|||
uint8_t bw_offset, uint8_t *opclass)
|
||||
{
|
||||
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
wlan_reg_read_current_country(mac_ctx->psoc, reg_cc);
|
||||
/* redgm opclass table contains opclass for 40MHz low primary,
|
||||
* 40MHz high primary and 20MHz. No support for 80MHz yet. So
|
||||
* first we will check if bit for 40MHz is set and if so find
|
||||
|
|
@ -13100,21 +13101,17 @@ void sme_get_opclass(mac_handle_t mac_handle, uint8_t channel,
|
|||
*/
|
||||
if (bw_offset & (1 << BW_40_OFFSET_BIT)) {
|
||||
*opclass = wlan_reg_dmn_get_opclass_from_channel(
|
||||
mac_ctx->scan.countryCodeCurrent,
|
||||
channel, BW40_LOW_PRIMARY);
|
||||
reg_cc, channel, BW40_LOW_PRIMARY);
|
||||
if (!(*opclass)) {
|
||||
*opclass = wlan_reg_dmn_get_opclass_from_channel(
|
||||
mac_ctx->scan.countryCodeCurrent,
|
||||
channel, BW40_HIGH_PRIMARY);
|
||||
reg_cc, channel, BW40_HIGH_PRIMARY);
|
||||
}
|
||||
} else if (bw_offset & (1 << BW_20_OFFSET_BIT)) {
|
||||
*opclass = wlan_reg_dmn_get_opclass_from_channel(
|
||||
mac_ctx->scan.countryCodeCurrent,
|
||||
channel, BW20);
|
||||
reg_cc, channel, BW20);
|
||||
} else {
|
||||
*opclass = wlan_reg_dmn_get_opclass_from_channel(
|
||||
mac_ctx->scan.countryCodeCurrent,
|
||||
channel, BWALL);
|
||||
reg_cc, channel, BWALL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -637,23 +637,19 @@ QDF_STATUS csr_open(struct mac_context *mac)
|
|||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS csr_init_chan_list(struct mac_context *mac, uint8_t *alpha2)
|
||||
QDF_STATUS csr_init_chan_list(struct mac_context *mac)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
mac->scan.countryCodeDefault[0] = alpha2[0];
|
||||
mac->scan.countryCodeDefault[1] = alpha2[1];
|
||||
mac->scan.countryCodeDefault[2] = alpha2[2];
|
||||
|
||||
sme_debug("init time country code %.2s", mac->scan.countryCodeDefault);
|
||||
wlan_reg_read_current_country(mac->psoc, reg_cc);
|
||||
sme_debug("init time country code %.2s", reg_cc);
|
||||
|
||||
mac->scan.domainIdDefault = 0;
|
||||
mac->scan.domainIdCurrent = 0;
|
||||
|
||||
qdf_mem_copy(mac->scan.countryCodeCurrent,
|
||||
mac->scan.countryCodeDefault, REG_ALPHA2_LEN + 1);
|
||||
qdf_mem_copy(mac->scan.countryCodeElected,
|
||||
mac->scan.countryCodeDefault, REG_ALPHA2_LEN + 1);
|
||||
reg_cc, REG_ALPHA2_LEN + 1);
|
||||
status = csr_get_channel_and_power_list(mac);
|
||||
|
||||
return status;
|
||||
|
|
@ -665,8 +661,6 @@ QDF_STATUS csr_set_channels(struct mac_context *mac,
|
|||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
uint8_t index = 0;
|
||||
|
||||
qdf_mem_copy(pParam->Csr11dinfo.countryCode,
|
||||
mac->scan.countryCodeCurrent, REG_ALPHA2_LEN + 1);
|
||||
for (index = 0; index < mac->scan.base_channels.numChannels;
|
||||
index++) {
|
||||
pParam->Csr11dinfo.Channels.channel_freq_list[index] =
|
||||
|
|
@ -2796,8 +2790,7 @@ QDF_STATUS csr_apply_channel_and_power_list(struct mac_context *mac)
|
|||
csr_save_channel_power_for_band(mac, false);
|
||||
csr_save_channel_power_for_band(mac, true);
|
||||
csr_apply_channel_power_info_to_fw(mac,
|
||||
&mac->scan.base_channels,
|
||||
mac->scan.countryCodeCurrent);
|
||||
&mac->scan.base_channels);
|
||||
|
||||
csr_init_operating_classes(mac);
|
||||
return status;
|
||||
|
|
@ -2829,17 +2822,6 @@ static QDF_STATUS csr_init11d_info(struct mac_context *mac, tCsr11dinfo *ps11din
|
|||
}
|
||||
/* legacy maintenance */
|
||||
|
||||
qdf_mem_copy(mac->scan.countryCodeDefault, ps11dinfo->countryCode,
|
||||
REG_ALPHA2_LEN + 1);
|
||||
|
||||
/* Tush: at csropen get this initialized with default,
|
||||
* during csr reset if this already set with some value
|
||||
* no need initilaize with default again
|
||||
*/
|
||||
if (0 == mac->scan.countryCodeCurrent[0]) {
|
||||
qdf_mem_copy(mac->scan.countryCodeCurrent,
|
||||
ps11dinfo->countryCode, REG_ALPHA2_LEN + 1);
|
||||
}
|
||||
/* need to add the max power channel list */
|
||||
pChanInfo =
|
||||
qdf_mem_malloc(sizeof(tSirMacChanInfo) *
|
||||
|
|
@ -2881,9 +2863,7 @@ static QDF_STATUS csr_init11d_info(struct mac_context *mac, tCsr11dinfo *ps11din
|
|||
*/
|
||||
csr_apply_channel_power_info_to_fw(mac,
|
||||
&mac->scan.
|
||||
base_channels,
|
||||
mac->scan.
|
||||
countryCodeCurrent);
|
||||
base_channels);
|
||||
}
|
||||
}
|
||||
return status;
|
||||
|
|
@ -15050,6 +15030,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
|
|||
uint8_t programmed_country[REG_ALPHA2_LEN + 1];
|
||||
enum reg_6g_ap_type power_type_6g;
|
||||
bool ctry_code_match;
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
if (!pSession) {
|
||||
sme_err("session %d not found", sessionId);
|
||||
|
|
@ -15136,8 +15117,9 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
|
|||
qdf_mem_copy(&csr_join_req->self_mac_addr,
|
||||
&pSession->self_mac_addr,
|
||||
sizeof(tSirMacAddr));
|
||||
wlan_reg_read_current_country(mac->psoc, reg_cc);
|
||||
sme_nofl_info("vdev-%d: Connecting to %.*s " QDF_MAC_ADDR_FMT
|
||||
" rssi: %d freq: %d akm %d cipher: uc %d mc %d, CC: %c%c",
|
||||
" rssi: %d freq: %d akm %d cipher: uc %d mc %d, CC: %s",
|
||||
sessionId, csr_join_req->ssId.length,
|
||||
csr_join_req->ssId.ssId,
|
||||
QDF_MAC_ADDR_REF(pBssDescription->bssId),
|
||||
|
|
@ -15145,8 +15127,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
|
|||
pProfile->negotiatedAuthType,
|
||||
pProfile->negotiatedUCEncryptionType,
|
||||
pProfile->negotiatedMCEncryptionType,
|
||||
mac->scan.countryCodeCurrent[0],
|
||||
mac->scan.countryCodeCurrent[1]);
|
||||
reg_cc);
|
||||
wlan_rec_conn_info(sessionId, DEBUG_CONN_CONNECTING,
|
||||
pBssDescription->bssId,
|
||||
pProfile->negotiatedAuthType,
|
||||
|
|
@ -20311,10 +20292,10 @@ static void csr_init_operating_classes(struct mac_context *mac)
|
|||
uint8_t swap = 0;
|
||||
uint8_t numClasses = 0;
|
||||
uint8_t opClasses[REG_MAX_SUPP_OPER_CLASSES] = {0,};
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
sme_debug("Current Country = %c%c",
|
||||
mac->scan.countryCodeCurrent[0],
|
||||
mac->scan.countryCodeCurrent[1]);
|
||||
wlan_reg_read_current_country(mac->psoc, reg_cc);
|
||||
sme_debug("Current Country = %s", reg_cc);
|
||||
|
||||
csr_update_op_class_array(mac, opClasses,
|
||||
&mac->scan.base_channels, "20MHz", &i);
|
||||
|
|
|
|||
|
|
@ -566,8 +566,7 @@ void csr_apply_power2_current(struct mac_context *mac)
|
|||
}
|
||||
|
||||
void csr_apply_channel_power_info_to_fw(struct mac_context *mac_ctx,
|
||||
struct csr_channel *ch_lst,
|
||||
uint8_t *countryCode)
|
||||
struct csr_channel *ch_lst)
|
||||
{
|
||||
int i;
|
||||
uint8_t num_ch = 0;
|
||||
|
|
@ -598,6 +597,7 @@ static void csr_diag_reset_country_information(struct mac_context *mac)
|
|||
|
||||
host_log_802_11d_pkt_type *p11dLog;
|
||||
int Index;
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
WLAN_HOST_DIAG_LOG_ALLOC(p11dLog, host_log_802_11d_pkt_type,
|
||||
LOG_WLAN_80211D_C);
|
||||
|
|
@ -605,7 +605,8 @@ static void csr_diag_reset_country_information(struct mac_context *mac)
|
|||
return;
|
||||
|
||||
p11dLog->eventId = WLAN_80211D_EVENT_RESET;
|
||||
qdf_mem_copy(p11dLog->countryCode, mac->scan.countryCodeCurrent, 3);
|
||||
wlan_reg_read_current_country(mac->psoc, reg_cc);
|
||||
qdf_mem_copy(p11dLog->countryCode, reg_cc, 3);
|
||||
p11dLog->numChannel = mac->scan.base_channels.numChannels;
|
||||
if (p11dLog->numChannel <= HOST_LOG_MAX_NUM_CHANNEL) {
|
||||
for (Index = 0;
|
||||
|
|
@ -640,8 +641,7 @@ void csr_apply_channel_power_info_wrapper(struct mac_context *mac)
|
|||
csr_save_channel_power_for_band(mac, false);
|
||||
csr_save_channel_power_for_band(mac, true);
|
||||
/* apply the channel list, power settings, and the country code. */
|
||||
csr_apply_channel_power_info_to_fw(mac,
|
||||
&mac->scan.base_channels, mac->scan.countryCodeCurrent);
|
||||
csr_apply_channel_power_info_to_fw(mac, &mac->scan.base_channels);
|
||||
/* clear the 11d channel list */
|
||||
qdf_mem_zero(&mac->scan.channels11d, sizeof(mac->scan.channels11d));
|
||||
}
|
||||
|
|
@ -846,6 +846,7 @@ bool csr_learn_11dcountry_information(struct mac_context *mac,
|
|||
v_REGDOMAIN_t domainId;
|
||||
tDot11fBeaconIEs *pIesLocal = pIes;
|
||||
bool useVoting = false;
|
||||
uint8_t reg_cc[REG_ALPHA2_LEN + 1];
|
||||
|
||||
if ((!pSirBssDesc) && (!pIes))
|
||||
useVoting = true;
|
||||
|
|
@ -877,10 +878,11 @@ bool csr_learn_11dcountry_information(struct mac_context *mac,
|
|||
else
|
||||
pCountryCodeSelected = mac->scan.countryCodeElected;
|
||||
|
||||
if (qdf_mem_cmp(pCountryCodeSelected, mac->scan.countryCodeCurrent,
|
||||
wlan_reg_read_current_country(mac->psoc, reg_cc);
|
||||
if (qdf_mem_cmp(pCountryCodeSelected, reg_cc,
|
||||
CDS_COUNTRY_CODE_LEN) == 0) {
|
||||
qdf_mem_copy(mac->scan.countryCode11d,
|
||||
mac->scan.countryCodeCurrent,
|
||||
reg_cc,
|
||||
CDS_COUNTRY_CODE_LEN);
|
||||
goto free_ie;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,8 +337,7 @@ uint32_t csr_translate_to_wni_cfg_dot11_mode(struct mac_context *mac,
|
|||
enum csr_cfgdot11mode csrDot11Mode);
|
||||
void csr_save_channel_power_for_band(struct mac_context *mac, bool fPopulate5GBand);
|
||||
void csr_apply_channel_power_info_to_fw(struct mac_context *mac,
|
||||
struct csr_channel *pChannelList,
|
||||
uint8_t *countryCode);
|
||||
struct csr_channel *pChannelList);
|
||||
void csr_apply_power2_current(struct mac_context *mac);
|
||||
|
||||
/* return a bool to indicate whether roaming completed or continue. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue