qcacmn: Allow 6GHz AP for WPS
With current implementation host does not allow 6GHz AP for WPS security, add a change to allow 6GHz AP for WPS. Change-Id: I9e330f2984a716bb56e47313b65eedb4a1a0e216 CRs-Fixed: 2814259
This commit is contained in:

committed by
snandini

parent
8ca19e58fe
commit
35998406e0
@@ -1824,11 +1824,16 @@ void wlan_cm_calculate_bss_score(struct wlan_objmgr_pdev *pdev,
|
||||
#ifdef CONFIG_BAND_6GHZ
|
||||
bool wlan_cm_6ghz_allowed_for_akm(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t key_mgmt, uint16_t rsn_caps,
|
||||
const uint8_t *rsnxe, uint8_t sae_pwe)
|
||||
const uint8_t *rsnxe, uint8_t sae_pwe,
|
||||
bool is_wps)
|
||||
{
|
||||
struct psoc_mlme_obj *mlme_psoc_obj;
|
||||
struct scoring_cfg *config;
|
||||
|
||||
/* Allow connection for WPS security */
|
||||
if (is_wps)
|
||||
return true;
|
||||
|
||||
mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc);
|
||||
if (!mlme_psoc_obj)
|
||||
return false;
|
||||
|
@@ -869,11 +869,21 @@ static QDF_STATUS cm_connect_get_candidates(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id = wlan_vdev_get_id(cm_ctx->vdev);
|
||||
bool security_valid_for_6ghz;
|
||||
const uint8_t *rsnxe;
|
||||
uint8_t wsc_oui[OUI_LENGTH];
|
||||
uint32_t oui_cpu;
|
||||
bool is_wps = false;
|
||||
|
||||
filter = qdf_mem_malloc(sizeof(*filter));
|
||||
if (!filter)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
oui_cpu = qdf_be32_to_cpu(WSC_OUI);
|
||||
qdf_mem_copy(wsc_oui, &oui_cpu, OUI_LENGTH);
|
||||
if (wlan_get_vendor_ie_ptr_from_oui(wsc_oui, OUI_LENGTH,
|
||||
cm_req->req.assoc_ie.ptr,
|
||||
cm_req->req.assoc_ie.len))
|
||||
is_wps = true;
|
||||
|
||||
rsnxe = wlan_get_ie_ptr_from_eid(WLAN_ELEMID_RSNXE,
|
||||
cm_req->req.assoc_ie.ptr,
|
||||
cm_req->req.assoc_ie.len);
|
||||
@@ -881,7 +891,8 @@ static QDF_STATUS cm_connect_get_candidates(struct wlan_objmgr_pdev *pdev,
|
||||
wlan_cm_6ghz_allowed_for_akm(wlan_pdev_get_psoc(pdev),
|
||||
cm_req->req.crypto.akm_suites,
|
||||
cm_req->req.crypto.rsn_caps,
|
||||
rsnxe, cm_req->req.sae_pwe);
|
||||
rsnxe, cm_req->req.sae_pwe,
|
||||
is_wps);
|
||||
|
||||
/*
|
||||
* Ignore connect req if the freq is provided and its 6Ghz and
|
||||
|
@@ -236,13 +236,15 @@ void wlan_cm_init_score_config(struct wlan_objmgr_psoc *psoc,
|
||||
* @rsn_caps: rsn caps
|
||||
* @rsnxe: rsnxe pointer if present
|
||||
* @sae_pwe: support for SAE password
|
||||
* @is_wps: if security is WPS
|
||||
*
|
||||
* Return: bool
|
||||
*/
|
||||
#ifdef CONFIG_BAND_6GHZ
|
||||
bool wlan_cm_6ghz_allowed_for_akm(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t key_mgmt, uint16_t rsn_caps,
|
||||
const uint8_t *rsnxe, uint8_t sae_pwe);
|
||||
const uint8_t *rsnxe, uint8_t sae_pwe,
|
||||
bool is_wps);
|
||||
|
||||
/**
|
||||
* wlan_cm_set_check_6ghz_security() - Set check 6Ghz security
|
||||
@@ -293,7 +295,8 @@ uint32_t wlan_cm_get_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc);
|
||||
static inline bool
|
||||
wlan_cm_6ghz_allowed_for_akm(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t key_mgmt, uint16_t rsn_caps,
|
||||
const uint8_t *rsnxe, uint8_t sae_pwe)
|
||||
const uint8_t *rsnxe, uint8_t sae_pwe,
|
||||
bool is_wps)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user