Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Merge c1e8891 on remote branch
Browse files Browse the repository at this point in the history
Change-Id: I917201796275dec505c32c4b7b74994c333b5911
  • Loading branch information
Linux Build Service Account committed Nov 15, 2021
2 parents e7add2d + c1e8891 commit cf6a28d
Show file tree
Hide file tree
Showing 23 changed files with 253 additions and 103 deletions.
13 changes: 12 additions & 1 deletion components/mlme/core/inc/wlan_mlme_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,12 +543,23 @@ mlme_get_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
* @reqs: RSO stop requestor
* @clear: clear bit if true else set bit
*
* Return: bitmap value
* Return: None
*/
void
mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
enum roam_control_requestor reqs, bool clear);

/**
* mlme_clear_operations_bitmap() - Clear mlme operations bitmap which
* indicates what mlme operations are in progress
* @psoc: PSOC pointer
* @vdev_id: vdev for which the mlme operation bitmap is requested
*
* Return: None
*/
void
mlme_clear_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);

/**
* mlme_get_cfg_wlm_level() - Get the WLM level value
* @psoc: pointer to psoc object
Expand Down
38 changes: 37 additions & 1 deletion components/mlme/core/src/wlan_mlme_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,8 @@ static void mlme_init_scoring_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_SCORING_CHAN_CONGESTION_WEIGHTAGE);
scoring_cfg->weight_cfg.oce_wan_weightage =
cfg_get(psoc, CFG_SCORING_OCE_WAN_WEIGHTAGE);
scoring_cfg->weight_cfg.sae_pk_ap_weightage =
cfg_get(psoc, CFG_SAE_PK_AP_WEIGHTAGE);

total_weight = scoring_cfg->weight_cfg.rssi_weightage +
scoring_cfg->weight_cfg.ht_caps_weightage +
Expand All @@ -1822,7 +1824,8 @@ static void mlme_init_scoring_cfg(struct wlan_objmgr_psoc *psoc,
scoring_cfg->weight_cfg.beamforming_cap_weightage +
scoring_cfg->weight_cfg.pcl_weightage +
scoring_cfg->weight_cfg.channel_congestion_weightage +
scoring_cfg->weight_cfg.oce_wan_weightage;
scoring_cfg->weight_cfg.oce_wan_weightage +
scoring_cfg->weight_cfg.sae_pk_ap_weightage;

/*
* If configured weights are greater than max weight,
Expand All @@ -1848,6 +1851,8 @@ static void mlme_init_scoring_cfg(struct wlan_objmgr_psoc *psoc,
scoring_cfg->weight_cfg.channel_congestion_weightage =
CHANNEL_CONGESTION_WEIGHTAGE;
scoring_cfg->weight_cfg.oce_wan_weightage = OCE_WAN_WEIGHTAGE;
scoring_cfg->weight_cfg.sae_pk_ap_weightage =
SAE_PK_AP_WEIGHTAGE;
}

scoring_cfg->rssi_score.best_rssi_threshold =
Expand Down Expand Up @@ -2924,6 +2929,8 @@ mlme_get_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
}

bitmap = mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap;
mlme_legacy_debug("vdev[%d] bitmap[0x%x]", vdev_id,
mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap);
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);

return bitmap;
Expand Down Expand Up @@ -2954,6 +2961,35 @@ mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap &= ~reqs;
else
mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap |= reqs;

mlme_legacy_debug("vdev[%d] bitmap[0x%x], reqs: %d, clear: %d", vdev_id,
mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap,
reqs, clear);
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
}

void
mlme_clear_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
{
struct wlan_objmgr_vdev *vdev;
struct mlme_legacy_priv *mlme_priv;

vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_MLME_OBJMGR_ID);

if (!vdev) {
mlme_legacy_err("vdev object is NULL");
return;
}

mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv) {
mlme_legacy_err("vdev legacy private object is NULL");
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
return;
}

mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap = 0;
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
}

Expand Down
31 changes: 31 additions & 0 deletions components/mlme/dispatcher/inc/cfg_mlme_scoring.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,36 @@
CFG_VALUE_OR_DEFAULT, \
"OCE WAN Weightage")

/*
*
* sae_pk_ap_weightage - update scoring param based on SAE PK ap weightage
* @Min: 0
* @Max: 10
* @Default: 3
*
* This ini is used to calculate SAE PK ap weightage in roam score. SAE Public
* Key (SAE-PK) authentication is an extension of SAE that is intended for use
* cases where authentication is based on a password that might be
* distributed to or obtained by a potential adversary. With SAE-PK, the AP in
* an infrastructure network is additionally authenticated based on a static
* public/private key pair. This ini is also used for WFA certification.
*
* Related: None
*
* Supported Feature: STA
*
* Usage: External
*
* </ini>
*/
#define CFG_SAE_PK_AP_WEIGHTAGE CFG_INI_UINT( \
"sae_pk_ap_weightage", \
0, \
10, \
PLATFORM_VALUE(3, 0), \
CFG_VALUE_OR_DEFAULT,\
"SAE-PK AP weightage")

/*
* <ini>
* best_rssi_threshold - Best Rssi for score calculation
Expand Down Expand Up @@ -1294,6 +1324,7 @@
CFG(CFG_SCORING_PCL_WEIGHTAGE) \
CFG(CFG_SCORING_CHAN_CONGESTION_WEIGHTAGE) \
CFG(CFG_SCORING_OCE_WAN_WEIGHTAGE) \
CFG(CFG_SAE_PK_AP_WEIGHTAGE) \
CFG(CFG_SCORING_BEST_RSSI_THRESHOLD) \
CFG(CFG_SCORING_GOOD_RSSI_THRESHOLD) \
CFG(CFG_SCORING_BAD_RSSI_THRESHOLD) \
Expand Down
2 changes: 2 additions & 0 deletions components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -1859,6 +1859,7 @@ struct wlan_mlme_wmm_params {
* @pcl_weightage: PCL weightage
* @channel_congestion_weightage: channel congestion weightage
* @oce_wan_weightage: OCE WAN metrics weightage
* @sae_pk_ap_weightage: SAE-PK AP weigtage
*/
struct wlan_mlme_weight_config {
uint8_t rssi_weightage;
Expand All @@ -1872,6 +1873,7 @@ struct wlan_mlme_weight_config {
uint8_t pcl_weightage;
uint8_t channel_congestion_weightage;
uint8_t oce_wan_weightage;
uint8_t sae_pk_ap_weightage;
};

/**
Expand Down
3 changes: 3 additions & 0 deletions core/hdd/src/wlan_hdd_assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3347,6 +3347,9 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
if (!reqRsnIe)
return QDF_STATUS_E_NOMEM;

if (roam_info->fReassocReq || ft_carrier_on)
hdd_nud_indicate_roam(adapter);

/*
* For reassoc, the station is already registered, all we need
* is to change the state of the STA in TL.
Expand Down
21 changes: 16 additions & 5 deletions core/hdd/src/wlan_hdd_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -3243,6 +3243,10 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
sap_config->acs_cfg.master_ch_list_count);
/* if it is only one channel, send ACS event to upper layer */
if (sap_config->acs_cfg.ch_list_count == 1) {
sap_config->acs_cfg.start_ch_freq =
sap_config->acs_cfg.freq_list[0];
sap_config->acs_cfg.end_ch_freq =
sap_config->acs_cfg.freq_list[0];
sap_config->acs_cfg.pri_ch_freq =
sap_config->acs_cfg.freq_list[0];
wlan_sap_set_sap_ctx_acs_cfg(
Expand Down Expand Up @@ -3301,12 +3305,19 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
sap_config->acs_cfg.ch_width = ch_width;
}

/* No VHT80 in 2.4G so perform ACS accordingly */
/* Check 2.4ghz cbmode and update BW if only 2.4 channels are present */
if (sap_config->acs_cfg.end_ch_freq <=
WLAN_REG_CH_TO_FREQ(CHAN_ENUM_2484) &&
sap_config->acs_cfg.ch_width == eHT_CHANNEL_WIDTH_80MHZ) {
sap_config->acs_cfg.ch_width = eHT_CHANNEL_WIDTH_40MHZ;
hdd_debug("resetting to 40Mhz in 2.4Ghz");
WLAN_REG_CH_TO_FREQ(CHAN_ENUM_2484) &&
sap_config->acs_cfg.ch_width >= eHT_CHANNEL_WIDTH_40MHZ) {
uint32_t channel_bonding_mode;

ucfg_mlme_get_channel_bonding_24ghz(hdd_ctx->psoc,
&channel_bonding_mode);
sap_config->acs_cfg.ch_width = channel_bonding_mode ?
eHT_CHANNEL_WIDTH_40MHZ : eHT_CHANNEL_WIDTH_20MHZ;

hdd_debug("Only 2.4ghz channels, resetting BW to %d 2.4 cbmode %d",
sap_config->acs_cfg.ch_width, channel_bonding_mode);
}

hdd_nofl_debug("ACS Config country %s ch_width %d hw_mode %d ACS_BW: %d HT: %d VHT: %d START_CH: %d END_CH: %d band %d",
Expand Down
2 changes: 1 addition & 1 deletion core/hdd/src/wlan_hdd_cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ struct hdd_context;
#if !defined(TDLS_MGMT_VERSION2)
#define TDLS_MGMT_VERSION2 0
#endif
#endif

/**
* hdd_convert_cfgdot11mode_to_80211mode() - Function to convert cfg dot11 mode
Expand All @@ -137,7 +138,6 @@ struct hdd_context;
*/
enum qca_wlan_802_11_mode
hdd_convert_cfgdot11mode_to_80211mode(enum csr_cfgdot11mode mode);
#endif

#define HDD_SET_BIT(__param, __val) ((__param) |= (1 << (__val)))

Expand Down
11 changes: 11 additions & 0 deletions core/hdd/src/wlan_hdd_hostapd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3602,6 +3602,13 @@ void hdd_deinit_ap_mode(struct hdd_context *hdd_ctx,
clear_bit(WMM_INIT_DONE, &adapter->event_flags);
}
qdf_atomic_set(&adapter->session.ap.acs_in_progress, 0);
if (qdf_atomic_read(&adapter->ch_switch_in_progress)) {
qdf_atomic_set(&adapter->ch_switch_in_progress, 0);
policy_mgr_set_chan_switch_complete_evt(hdd_ctx->psoc);

/* Re-enable roaming on all connected STA vdev */
wlan_hdd_enable_roaming(adapter, RSO_SAP_CHANNEL_CHANGE);
}

hdd_softap_deinit_tx_rx(adapter);
/*
Expand Down Expand Up @@ -4321,6 +4328,8 @@ int wlan_hdd_cfg80211_update_apies(struct hdd_adapter *adapter)
WLAN_EID_INTERWORKING);
wlan_hdd_add_extra_ie(adapter, genie, &total_ielen,
WLAN_EID_ADVERTISEMENT_PROTOCOL);

wlan_hdd_add_extra_ie(adapter, genie, &total_ielen, WLAN_ELEMID_RSNXE);
#ifdef FEATURE_WLAN_WAPI
if (QDF_SAP_MODE == adapter->device_mode) {
wlan_hdd_add_extra_ie(adapter, genie, &total_ielen,
Expand Down Expand Up @@ -4376,6 +4385,8 @@ int wlan_hdd_cfg80211_update_apies(struct hdd_adapter *adapter)

wlan_hdd_add_sap_obss_scan_ie(adapter, proberesp_ies,
&proberesp_ies_len);
wlan_hdd_add_extra_ie(adapter, proberesp_ies, &proberesp_ies_len,
WLAN_ELEMID_RSNXE);

if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) {
update_ie.ieBufferlength = proberesp_ies_len;
Expand Down
20 changes: 19 additions & 1 deletion core/hdd/src/wlan_hdd_nud_tracking.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,20 @@ static void hdd_nud_filter_netevent(struct neighbour *neigh)

case NUD_FAILED:
hdd_debug("NUD_FAILED [0x%x]", neigh->nud_state);
hdd_nud_process_failure_event(adapter);
/*
* This condition is to handle the scenario where NUD_FAILED
* events are received without any NUD_PROBE/INCOMPLETE event
* post roaming. Nud state is set to NONE as part of roaming.
* NUD_FAILED is not honored when the curr state is any state
* other than NUD_PROBE/INCOMPLETE so post roaming, nud state
* is moved to NUD_PROBE to honor future NUD_FAILED events.
*/
if (adapter->nud_tracking.curr_state == NUD_NONE) {
hdd_nud_capture_stats(adapter, NUD_PROBE);
hdd_nud_set_tracking(adapter, NUD_PROBE, true);
} else {
hdd_nud_process_failure_event(adapter);
}
break;
default:
hdd_debug("NUD Event For Other State [0x%x]",
Expand Down Expand Up @@ -575,3 +588,8 @@ void hdd_nud_unregister_netevent_notifier(struct hdd_context *hdd_ctx)
hdd_debug("Unregistered netevent notifier");
}
}

void hdd_nud_indicate_roam(struct hdd_adapter *adapter)
{
hdd_nud_set_tracking(adapter, NUD_NONE, false);
}
15 changes: 14 additions & 1 deletion core/hdd/src/wlan_hdd_nud_tracking.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2020 The Linux Foundation. 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
Expand Down Expand Up @@ -149,6 +149,14 @@ void hdd_nud_unregister_netevent_notifier(struct hdd_context *hdd_ctx);
*/
void hdd_nud_flush_work(struct hdd_adapter *adapter);

/**
* hdd_nud_indicate_roam() - reset NUD when roaming happens
* @adapter: Pointer to hdd adapter
*
* Return: None
*/
void hdd_nud_indicate_roam(struct hdd_adapter *adapter);

#else
static inline void hdd_nud_set_gateway_addr(struct hdd_adapter *adapter,
struct qdf_mac_addr gw_mac_addr)
Expand Down Expand Up @@ -192,5 +200,10 @@ static inline void
hdd_nud_flush_work(struct hdd_adapter *adapter)
{
}

static inline void
hdd_nud_indicate_roam(struct hdd_adapter *adapter)
{
}
#endif /* WLAN_NUD_TRACKING */
#endif /* end of _WLAN_NUD_TRACKING_H_ */
4 changes: 2 additions & 2 deletions core/mac/inc/qwlan_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#define QWLAN_VERSION_MAJOR 5
#define QWLAN_VERSION_MINOR 2
#define QWLAN_VERSION_PATCH 022
#define QWLAN_VERSION_EXTRA "K"
#define QWLAN_VERSION_EXTRA "X"
#define QWLAN_VERSION_BUILD 9

#define QWLAN_VERSIONSTR "5.2.022.9K"
#define QWLAN_VERSIONSTR "5.2.022.9X"

#endif /* QWLAN_VERSION_H */
4 changes: 2 additions & 2 deletions core/mac/src/include/dot11f.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2021 The Linux Foundation. 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
Expand All @@ -26,7 +26,7 @@
*
*
* This file was automatically generated by 'framesc'
* Tue Aug 11 23:34:13 2020 from the following file(s):
* Wed Sep 29 13:23:21 2021 from the following file(s):
*
* dot11f.frms
*
Expand Down
6 changes: 5 additions & 1 deletion core/mac/src/include/sir_debug.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2012, 2014-2015, 2017-2019 The Linux Foundation. All
* Copyright (c) 2011-2012, 2014-2015, 2017-2019, 2021 The Linux Foundation. All
* rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
Expand Down Expand Up @@ -57,6 +57,10 @@
QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_PE, params)
#define pe_nofl_debug(params...) \
QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_PE, params)
#define pe_nofl_rl_debug(params...) \
QDF_TRACE_DEBUG_RL_NO_FL(QDF_MODULE_ID_PE, params)
#define pe_nofl_rl_info(params...) \
QDF_TRACE_INFO_RL_NO_FL(QDF_MODULE_ID_PE, params)

#define PE_ENTER() QDF_TRACE_ENTER(QDF_MODULE_ID_PE, "enter")
#define PE_EXIT() QDF_TRACE_EXIT(QDF_MODULE_ID_PE, "exit")
Expand Down
12 changes: 6 additions & 6 deletions core/mac/src/pe/lim/lim_process_assoc_req_frame.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2021 The Linux Foundation. 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
Expand Down Expand Up @@ -2244,11 +2244,11 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in
hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);

pe_nofl_debug("Assoc req RX: subtype %d vdev %d sys role %d lim state %d rssi %d from " QDF_MAC_ADDR_FMT,
sub_type, session->vdev_id, GET_LIM_SYSTEM_ROLE(session),
session->limMlmState,
WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info),
QDF_MAC_ADDR_REF(hdr->sa));
pe_nofl_rl_debug("Assoc req RX: subtype %d vdev %d sys role %d lim state %d rssi %d from " QDF_MAC_ADDR_FMT,
sub_type, session->vdev_id,
GET_LIM_SYSTEM_ROLE(session), session->limMlmState,
WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info),
QDF_MAC_ADDR_REF(hdr->sa));

if (LIM_IS_STA_ROLE(session)) {
pe_err("Rcvd unexpected ASSOC REQ, sessionid: %d sys sub_type: %d for role: %d from: "
Expand Down
Loading

0 comments on commit cf6a28d

Please sign in to comment.