qcacld-3.0: Update country code from beacon when do rrm scan
The RRM request may have different country code with DUT internal regdb configure, use country code from beacon IE if it is present, otherwise use internal country code to verify op class of neighbor report channel list. CRs-Fixed: 2997474 Change-Id: I35a62d9791f08d26dd8a892739612eb422805523
This commit is contained in:

committad av
Madan Koyyalamudi

förälder
e8b727f733
incheckning
08dab6a394
@@ -315,6 +315,28 @@ struct rso_config *wlan_cm_get_rso_config_fl(struct wlan_objmgr_vdev *vdev,
|
||||
void wlan_cm_set_disable_hi_rssi(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, bool value);
|
||||
|
||||
/**
|
||||
* wlan_cm_set_country_code - set country code to vdev rso config
|
||||
* @pdev: pdev pointer
|
||||
* @vdev_id: vdev id
|
||||
* @cc: country code
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void wlan_cm_set_country_code(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, uint8_t *cc);
|
||||
|
||||
/**
|
||||
* wlan_cm_get_country_code - get country code from vdev rso config
|
||||
* @pdev: pdev pointer
|
||||
* @vdev_id: vdev id
|
||||
* @cc: country code
|
||||
*
|
||||
* Return: qdf status
|
||||
*/
|
||||
QDF_STATUS wlan_cm_get_country_code(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, uint8_t *cc);
|
||||
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
/**
|
||||
* wlan_cm_set_ese_assoc - set ese assoc
|
||||
|
@@ -295,6 +295,7 @@ struct roam_synch_frame_ind {
|
||||
* @ctx: reassoc timer context
|
||||
* @cm_rso_lock: RSO lock
|
||||
* @rsn_cap: original rsn caps from the connect req from supplicant
|
||||
* @country_code: country code from connected AP's beacon IE
|
||||
* @disable_hi_rssi: disable high rssi
|
||||
* @roam_control_enable: Flag used to cache the status of roam control
|
||||
* configuration. This will be set only if the
|
||||
@@ -344,6 +345,7 @@ struct rso_config {
|
||||
#endif
|
||||
qdf_mutex_t cm_rso_lock;
|
||||
uint8_t rsn_cap;
|
||||
uint8_t country_code[REG_ALPHA2_LEN + 1];
|
||||
bool disable_hi_rssi;
|
||||
bool roam_control_enable;
|
||||
uint8_t rescan_rssi_delta;
|
||||
|
@@ -783,6 +783,54 @@ void wlan_cm_set_disable_hi_rssi(struct wlan_objmgr_pdev *pdev,
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
|
||||
}
|
||||
|
||||
void wlan_cm_set_country_code(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, uint8_t *cc)
|
||||
{
|
||||
static struct rso_config *rso_cfg;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
|
||||
WLAN_MLME_CM_ID);
|
||||
if (!vdev) {
|
||||
mlme_err("vdev object is NULL");
|
||||
return;
|
||||
}
|
||||
rso_cfg = wlan_cm_get_rso_config(vdev);
|
||||
if (!rso_cfg || !cc)
|
||||
goto release_vdev_ref;
|
||||
|
||||
qdf_mem_copy(rso_cfg->country_code, cc, REG_ALPHA2_LEN + 1);
|
||||
|
||||
release_vdev_ref:
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_cm_get_country_code(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, uint8_t *cc)
|
||||
{
|
||||
static struct rso_config *rso_cfg;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
|
||||
WLAN_MLME_CM_ID);
|
||||
if (!vdev) {
|
||||
mlme_err("vdev object is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
rso_cfg = wlan_cm_get_rso_config(vdev);
|
||||
if (!rso_cfg || !cc) {
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
goto release_vdev_ref;
|
||||
}
|
||||
|
||||
qdf_mem_copy(cc, rso_cfg->country_code, REG_ALPHA2_LEN + 1);
|
||||
|
||||
release_vdev_ref:
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
void wlan_cm_set_ese_assoc(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id, bool value)
|
||||
|
Referens i nytt ärende
Block a user