qcacld-3.0: Refactor SAP module to use channel frequency

Update SAP data structures to use channel frequency values instead
of using the channel id values to support 6GHz channels in SAP.

Change-Id: I9ef5857e8dcf3f7d879495d3f3c3ead083fe0bf0
CRs-Fixed: 2513083
This commit is contained in:
Kiran Kumar Lokere 2019-08-20 19:03:30 -07:00 • committed by nshrivas
commit 229212a653
19 changed files with 278 additions and 243 deletions

View file

@ -1292,8 +1292,7 @@ struct policy_mgr_hdd_cbacks {
bool forced);
QDF_STATUS (*wlan_hdd_get_channel_for_sap_restart)(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t *channel,
uint8_t *sec_ch);
uint8_t vdev_id, uint8_t *channel);
enum policy_mgr_con_mode (*get_mode_for_non_connected_vdev)(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id);

View file

@ -1728,7 +1728,7 @@ static void __policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
struct sta_ap_intf_check_work_ctx *work_info = NULL;
uint32_t mcc_to_scc_switch, cc_count = 0, i, go_index_start;
QDF_STATUS status;
uint8_t channel, sec_ch;
uint8_t channel;
uint8_t operating_channel[MAX_NUMBER_OF_CONC_CONNECTIONS];
uint8_t vdev_id[MAX_NUMBER_OF_CONC_CONNECTIONS];
@ -1799,8 +1799,7 @@ static void __policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
continue;
status = pm_ctx->hdd_cbacks.
wlan_hdd_get_channel_for_sap_restart
(psoc,
vdev_id[i], &channel, &sec_ch);
(psoc, vdev_id[i], &channel);
if (status == QDF_STATUS_SUCCESS) {
policy_mgr_info("SAP restarts due to MCC->SCC switch, old chan :%d new chan: %d"
, operating_channel[i], channel);

View file

@ -1629,6 +1629,7 @@ int wlan_hdd_sap_cfg_dfs_override(struct hdd_adapter *adapter)
struct sap_config *sap_config, *con_sap_config;
int con_ch;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
uint32_t con_ch_freq;
if (!hdd_ctx) {
hdd_err("hdd context is NULL");
@ -1650,14 +1651,15 @@ int wlan_hdd_sap_cfg_dfs_override(struct hdd_adapter *adapter)
sap_config = &adapter->session.ap.sap_config;
con_sap_config = &con_sap_adapter->session.ap.sap_config;
con_ch = con_sap_adapter->session.ap.operating_channel;
con_ch_freq = wlan_reg_chan_to_freq(hdd_ctx->pdev, con_ch);
if (!wlan_reg_is_dfs_ch(hdd_ctx->pdev, con_ch))
return 0;
hdd_debug("Only SCC AP-AP DFS Permitted (ch=%d, con_ch=%d)",
sap_config->channel, con_ch);
hdd_debug("Only SCC AP-AP DFS Permitted (ch_freq=%d, con_ch_freq=%d)",
sap_config->chan_freq, con_ch_freq);
hdd_debug("Overriding guest AP's channel");
sap_config->channel = con_ch;
sap_config->chan_freq = con_ch_freq;
if (con_sap_config->acs_cfg.acs_mode == true) {
if (con_ch != con_sap_config->acs_cfg.pri_ch &&
@ -1694,7 +1696,9 @@ int wlan_hdd_sap_cfg_dfs_override(struct hdd_adapter *adapter)
} else {
sap_config->acs_cfg.pri_ch = con_ch;
if (sap_config->acs_cfg.ch_width > eHT_CHANNEL_WIDTH_20MHZ)
sap_config->acs_cfg.ht_sec_ch = con_sap_config->sec_ch;
sap_config->acs_cfg.ht_sec_ch = wlan_reg_freq_to_chan(
hdd_ctx->pdev,
con_sap_config->sec_ch_freq);
}
return con_ch;
@ -1826,9 +1830,10 @@ int wlan_hdd_cfg80211_start_acs(struct hdd_adapter *adapter)
return -EINVAL;
}
if (hdd_ctx->acs_policy.acs_channel)
sap_config->channel = hdd_ctx->acs_policy.acs_channel;
sap_config->chan_freq = wlan_reg_chan_to_freq(hdd_ctx->pdev,
hdd_ctx->acs_policy.acs_channel);
else
sap_config->channel = AUTO_CHANNEL_SELECT;
sap_config->chan_freq = AUTO_CHANNEL_SELECT;
ucfg_policy_mgr_get_mcc_scc_switch(hdd_ctx->psoc,
&mcc_to_scc_switch);
/*
@ -10151,14 +10156,16 @@ __wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy,
}
ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(hostapd_adapter);
ap_ctx->sap_config.channel = config_channel;
ap_ctx->sap_config.chan_freq = wlan_reg_chan_to_freq(
hdd_ctx->pdev, config_channel);
ap_ctx->sap_config.ch_params.ch_width =
ap_ctx->sap_config.ch_width_orig;
ap_ctx->bss_stop_reason = BSS_STOP_DUE_TO_VENDOR_CONFIG_CHAN;
wlan_reg_set_channel_params(hdd_ctx->pdev,
ap_ctx->sap_config.channel,
ap_ctx->sap_config.sec_ch,
config_channel,
wlan_reg_freq_to_chan(hdd_ctx->pdev,
ap_ctx->sap_config.sec_ch_freq),
&ap_ctx->sap_config.ch_params);
hdd_restart_sap(hostapd_adapter);
@ -10486,7 +10493,8 @@ static void hdd_update_acs_sap_config(struct hdd_context *hdd_ctx,
QDF_STATUS status;
uint32_t channel_bonding_mode;
sap_config->channel = channel_list->pri_ch;
sap_config->chan_freq = wlan_reg_chan_to_freq(hdd_ctx->pdev,
channel_list->pri_ch);
sap_config->ch_params.center_freq_seg0 =
channel_list->vht_seg0_center_ch;
@ -10495,7 +10503,7 @@ static void hdd_update_acs_sap_config(struct hdd_context *hdd_ctx,
sap_config->ch_params.sec_ch_offset = channel_list->ht_sec_ch;
sap_config->ch_params.ch_width = channel_list->chan_width;
if (sap_config->channel >= 36) {
if (WLAN_REG_IS_5GHZ_CH_FREQ(sap_config->chan_freq)) {
status =
ucfg_mlme_get_vht_channel_width(hdd_ctx->psoc,
&ch_width);

View file

@ -1810,14 +1810,14 @@ QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event,
adapter->vdev_id =
sap_event->sapevt.sapStartBssCompleteEvent.sessionId;
sap_config->channel =
sap_config->chan_freq = wlan_reg_chan_to_freq(hdd_ctx->pdev,
sap_event->sapevt.sapStartBssCompleteEvent.
operatingChannel;
operatingChannel);
sap_config->ch_params.ch_width =
sap_event->sapevt.sapStartBssCompleteEvent.ch_width;
sap_config->ch_params = ap_ctx->sap_context->ch_params;
sap_config->sec_ch = ap_ctx->sap_context->secondary_ch;
sap_config->sec_ch_freq = ap_ctx->sap_context->sec_ch_freq;
hostapd_state->qdf_status =
sap_event->sapevt.sapStartBssCompleteEvent.status;
@ -3099,8 +3099,7 @@ void wlan_hdd_set_sap_csa_reason(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
QDF_STATUS wlan_hdd_get_channel_for_sap_restart(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t *channel,
uint8_t *sec_ch)
uint8_t vdev_id, uint8_t *channel)
{
mac_handle_t mac_handle;
struct hdd_ap_ctx *hdd_ap_ctx;
@ -3131,7 +3130,7 @@ QDF_STATUS wlan_hdd_get_channel_for_sap_restart(
return QDF_STATUS_E_FAILURE;
}
if (!channel || !sec_ch) {
if (!channel) {
hdd_err("Null parameters");
return QDF_STATUS_E_FAILURE;
}
@ -3190,8 +3189,8 @@ sap_restart:
return QDF_STATUS_E_FAILURE;
}
hdd_info("SAP restart orig chan: %d, new chan: %d",
hdd_ap_ctx->sap_config.channel, intf_ch);
hdd_info("SAP restart orig chan freq: %d, new chan: %d",
hdd_ap_ctx->sap_config.chan_freq, intf_ch);
ch_params.ch_width = CH_WIDTH_MAX;
hdd_ap_ctx->bss_stop_reason = BSS_STOP_DUE_TO_MCC_SCC_SWITCH;
if (hdd_ap_ctx->sap_context)
@ -3203,8 +3202,6 @@ sap_restart:
0,
&ch_params);
wlansap_get_sec_channel(ch_params.sec_ch_offset, intf_ch, sec_ch);
*channel = intf_ch;
hdd_info("SAP channel change with CSA/ECSA");
@ -3306,8 +3303,9 @@ QDF_STATUS hdd_init_ap_mode(struct hdd_adapter *adapter, bool reinit)
}
if (!reinit) {
adapter->session.ap.sap_config.channel =
hdd_ctx->acs_policy.acs_channel;
adapter->session.ap.sap_config.chan_freq =
wlan_reg_chan_to_freq(hdd_ctx->pdev,
hdd_ctx->acs_policy.acs_channel);
acs_dfs_mode = hdd_ctx->acs_policy.acs_dfs_mode;
adapter->session.ap.sap_config.acs_dfs_mode =
wlan_hdd_get_dfs_mode(acs_dfs_mode);
@ -3718,7 +3716,7 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
hdd_err("Invalid Channel: %d", channel);
return -EINVAL;
}
sap_config->channel = channel;
sap_config->chan_freq = chandef->chan->center_freq;
sap_config->ch_params.center_freq_seg1 = channel_seg2;
} else {
/* set channel to what hostapd configured */
@ -3729,7 +3727,7 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
return -EINVAL;
}
sap_config->channel = channel;
sap_config->chan_freq = chandef->chan->center_freq;
sap_config->ch_params.center_freq_seg1 = channel_seg2;
sme_config = qdf_mem_malloc(sizeof(*sme_config));
@ -3743,13 +3741,15 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
case NL80211_CHAN_HT20:
case NL80211_CHAN_NO_HT:
sme_config->csr_config.obssEnabled = false;
sap_config->sec_ch = 0;
sap_config->sec_ch_freq = 0;
break;
case NL80211_CHAN_HT40MINUS:
sap_config->sec_ch = sap_config->channel - 4;
sap_config->sec_ch_freq =
sap_config->chan_freq - 20;
break;
case NL80211_CHAN_HT40PLUS:
sap_config->sec_ch = sap_config->channel + 4;
sap_config->sec_ch_freq =
sap_config->chan_freq + 20;
break;
default:
hdd_err("Error!!! Invalid HT20/40 mode !");
@ -4308,7 +4308,7 @@ static void wlan_hdd_set_sap_hwmode(struct hdd_adapter *adapter)
&checkRatesfor11g, &config->SapHw_mode);
}
if (config->channel > 14)
if (WLAN_REG_IS_5GHZ_CH_FREQ(config->chan_freq))
config->SapHw_mode = eCSR_DOT11_MODE_11a;
ie = wlan_get_ie_ptr_from_eid(WLAN_EID_HT_CAPABILITY,
@ -4540,7 +4540,7 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter)
if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n)
sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11ac;
if (sap_cfg->channel >= 36) {
if (WLAN_REG_IS_5GHZ_CH_FREQ(sap_cfg->chan_freq)) {
status =
ucfg_mlme_get_vht_channel_width(hdd_ctx->psoc,
&ch_width);
@ -4984,6 +4984,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
bool go_force_11n_for_11ac = 0;
bool bval = false;
bool enable_dfs_scan = true;
uint16_t channel;
hdd_enter();
@ -5050,7 +5051,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
clear_bit(ACS_IN_PROGRESS, &hdd_ctx->g_event_flags);
config = &adapter->session.ap.sap_config;
if (!config->channel) {
if (!config->chan_freq) {
hdd_err("Invalid channel");
ret = -EINVAL;
goto free;
@ -5115,15 +5116,16 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
hdd_ctx->acs_policy.acs_dfs_mode);
if (hdd_ctx->acs_policy.acs_channel)
config->channel = hdd_ctx->acs_policy.acs_channel;
config->chan_freq = wlan_reg_chan_to_freq(hdd_ctx->pdev,
hdd_ctx->acs_policy.acs_channel);
mode = hdd_ctx->acs_policy.acs_dfs_mode;
config->acs_dfs_mode = wlan_hdd_get_dfs_mode(mode);
}
policy_mgr_update_user_config_sap_chan(hdd_ctx->psoc,
config->channel);
channel = wlan_reg_freq_to_chan(hdd_ctx->pdev, config->chan_freq);
policy_mgr_update_user_config_sap_chan(hdd_ctx->psoc, channel);
hdd_debug("config->channel %d, config->acs_dfs_mode %d",
config->channel, config->acs_dfs_mode);
channel, config->acs_dfs_mode);
hdd_debug("****config->dtim_period=%d***",
config->dtim_period);
@ -5158,18 +5160,17 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
*/
ret = 0;
if (!policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc) ||
WLAN_REG_IS_5GHZ_CH(config->channel)) {
WLAN_REG_IS_5GHZ_CH_FREQ(config->chan_freq)) {
ret = wlan_hdd_sap_cfg_dfs_override(adapter);
if (ret < 0)
goto error;
}
if (!ret && wlan_reg_is_dfs_ch(hdd_ctx->pdev, config->channel))
if (!ret && wlan_reg_is_dfs_ch(hdd_ctx->pdev, channel))
hdd_ctx->dev_dfs_cac_status = DFS_CAC_NEVER_DONE;
if (QDF_STATUS_SUCCESS !=
wlan_hdd_validate_operation_channel(adapter,
config->channel)) {
hdd_err("Invalid Channel: %d", config->channel);
wlan_hdd_validate_operation_channel(adapter, channel)) {
hdd_err("Invalid Channel: %d", channel);
ret = -EINVAL;
goto error;
}
@ -5179,8 +5180,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
/* reject SAP if DFS channel scan is not allowed */
if (!(enable_dfs_scan) &&
(CHANNEL_STATE_DFS ==
wlan_reg_get_channel_state(hdd_ctx->pdev,
config->channel))) {
wlan_reg_get_channel_state(hdd_ctx->pdev, channel))) {
hdd_err("No SAP start on DFS channel");
ret = -EOPNOTSUPP;
goto error;
@ -5466,7 +5466,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
hdd_err("Failed to get vht_for_24ghz");
if (IS_24G_CH(config->channel) && bval &&
if (WLAN_REG_IS_24GHZ_CH_FREQ(config->chan_freq) && bval &&
(config->SapHw_mode == eCSR_DOT11_MODE_11n ||
config->SapHw_mode == eCSR_DOT11_MODE_11n_ONLY))
config->SapHw_mode = eCSR_DOT11_MODE_11ac;
@ -5515,8 +5515,10 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
}
config->ch_params.ch_width = config->ch_width_orig;
wlan_reg_set_channel_params(hdd_ctx->pdev, config->channel,
config->sec_ch, &config->ch_params);
wlan_reg_set_channel_params(hdd_ctx->pdev, channel,
wlan_reg_freq_to_chan(hdd_ctx->pdev,
config->sec_ch_freq),
&config->ch_params);
if (0 != wlan_hdd_cfg80211_update_apies(adapter)) {
hdd_err("SAP Not able to set AP IEs");
@ -5535,7 +5537,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
QDF_MAC_ADDR_ARRAY(adapter->mac_addr.bytes));
hdd_debug("ssid =%s, beaconint=%d, channel=%d",
config->SSIDinfo.ssid.ssId, (int)config->beacon_int,
(int)config->channel);
channel);
hdd_debug("hw_mode=%x, privacy=%d, authType=%d",
config->SapHw_mode, config->privacy, config->authType);
hdd_debug("RSN/WPALen=%d", (int)config->RSNWPAReqIELength);
@ -5565,7 +5567,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
if (!policy_mgr_allow_concurrency(hdd_ctx->psoc,
policy_mgr_convert_device_mode_to_qdf_type(
adapter->device_mode),
config->channel, HW_MODE_20_MHZ)) {
channel, HW_MODE_20_MHZ)) {
mutex_unlock(&hdd_ctx->sap_lock);
hdd_err("This concurrency combination is not allowed");
@ -6145,6 +6147,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_chan_def new_chandef;
struct cfg80211_chan_def *chandef;
uint16_t sap_ch;
hdd_enter();
@ -6436,11 +6439,10 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
* If Do_Not_Break_Stream enabled send avoid channel list
* to application.
*/
if (policy_mgr_is_dnsc_set(adapter->vdev) &&
sap_config->channel) {
wlan_hdd_send_avoid_freq_for_dnbs(hdd_ctx,
sap_config->channel);
}
sap_ch = wlan_reg_freq_to_chan(hdd_ctx->pdev,
sap_config->chan_freq);
if (sap_ch && policy_mgr_is_dnsc_set(adapter->vdev))
wlan_hdd_send_avoid_freq_for_dnbs(hdd_ctx, sap_ch);
ucfg_mlme_get_sap_inactivity_override(hdd_ctx->psoc, &val);
if (val) {

View file

@ -76,7 +76,6 @@ void hdd_sap_restart_chan_switch_cb(struct wlan_objmgr_psoc *psoc,
* @psoc: PSOC object information
* @vdev_id: vdev id
* @channel: channel to be returned
* @sec_ch: secondary channel to be returned
*
* This function gets the channel parameters to restart SAP
*
@ -85,8 +84,7 @@ void hdd_sap_restart_chan_switch_cb(struct wlan_objmgr_psoc *psoc,
*/
QDF_STATUS wlan_hdd_get_channel_for_sap_restart(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint8_t *channel,
uint8_t *sec_ch);
uint8_t vdev_id, uint8_t *channel);
#endif
/**

View file

@ -752,8 +752,8 @@ static __iw_softap_setparam(struct net_device *dev,
if (config->SapHw_mode != eCSR_DOT11_MODE_11ac &&
config->SapHw_mode != eCSR_DOT11_MODE_11ac_ONLY) {
hdd_err("SET_VHT_RATE error: SapHw_mode= 0x%x, ch: %d",
config->SapHw_mode, config->channel);
hdd_err("SET_VHT_RATE: SapHw_mode= 0x%x, ch_freq: %d",
config->SapHw_mode, config->chan_freq);
ret = -EIO;
break;
}

View file

@ -2839,8 +2839,8 @@ int hdd_set_11ax_rate(struct hdd_adapter *adapter, int set_value,
}
} else if (sap_config->SapHw_mode != eCSR_DOT11_MODE_11ax &&
sap_config->SapHw_mode != eCSR_DOT11_MODE_11ax_ONLY) {
hdd_err("Invalid hw mode, SAP hw_mode= 0x%x, ch = %d",
sap_config->SapHw_mode, sap_config->channel);
hdd_err("Invalid hw mode, SAP hw_mode= 0x%x, ch_freq = %d",
sap_config->SapHw_mode, sap_config->chan_freq);
return -EIO;
}
@ -13335,7 +13335,9 @@ void wlan_hdd_start_sap(struct hdd_adapter *ap_adapter, bool reinit)
goto end;
}
wlan_reg_set_channel_params(hdd_ctx->pdev,
hdd_ap_ctx->sap_config.channel, 0,
wlan_reg_freq_to_chan(hdd_ctx->pdev,
hdd_ap_ctx->sap_config.chan_freq),
0,
&hdd_ap_ctx->sap_config.ch_params);
qdf_event_reset(&hostapd_state->qdf_event);

View file

@ -299,8 +299,8 @@ static int __wlan_hdd_request_pre_cac(struct hdd_context *hdd_ctx,
channel_type = NL80211_CHAN_HT20;
break;
case CH_WIDTH_40MHZ:
if (ap_adapter->session.ap.sap_config.sec_ch >
ap_adapter->session.ap.sap_config.channel)
if (ap_adapter->session.ap.sap_config.sec_ch_freq >
ap_adapter->session.ap.sap_config.chan_freq)
channel_type = NL80211_CHAN_HT40PLUS;
else
channel_type = NL80211_CHAN_HT40MINUS;

View file

@ -454,7 +454,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
int status;
struct hdd_scan_info *scan_info = NULL;
struct hdd_adapter *con_sap_adapter;
uint16_t con_dfs_ch;
uint8_t con_dfs_ch;
uint8_t curr_vdev_id;
enum scan_reject_states curr_reason;
static uint32_t scan_ebusy_cnt;
@ -534,7 +534,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
/* Block All Scan during DFS operation and send null scan result */
con_sap_adapter = hdd_get_con_sap_adapter(adapter, true);
if (con_sap_adapter) {
con_dfs_ch = con_sap_adapter->session.ap.sap_config.channel;
con_dfs_ch = wlan_reg_freq_to_chan(hdd_ctx->pdev,
con_sap_adapter->session.ap.sap_config.chan_freq);
if (con_dfs_ch == AUTO_CHANNEL_SELECT)
con_dfs_ch =
con_sap_adapter->session.ap.operating_channel;

View file

@ -476,8 +476,8 @@ struct sap_config {
bool ieee80211d; /* Specify if 11D is enabled or disabled */
struct qdf_mac_addr deny_mac[MAX_ACL_MAC_ADDRESS]; /* MAC filtering */
struct qdf_mac_addr self_macaddr; /* self macaddress or BSSID */
uint8_t channel; /* Operation channel */
uint8_t sec_ch;
uint32_t chan_freq; /* Operation channel frequency */
uint32_t sec_ch_freq;
struct ch_params ch_params;
uint32_t ch_width_orig;
uint8_t max_num_sta; /* maximum number of STAs in station table */
@ -1062,8 +1062,8 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
/**
* wlansap_get_sec_channel() - get the secondary sap channel
* @sec_ch_offset: secondary channel offset.
* @op_channel: Operating sap channel.
* @sec_channel: channel to be filled.
* @op_chan_freq: Operating sap channel frequency.
* @sec_chan_freq: channel frequency to be filled.
*
* This API will get the secondary sap channel from the offset, and
* operating channel.
@ -1072,8 +1072,8 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
*
*/
void wlansap_get_sec_channel(uint8_t sec_ch_offset,
uint8_t op_channel,
uint8_t *sec_channel);
uint32_t op_chan_freq,
uint32_t *sec_chan_freq);
/**
* wlansap_start_beacon_req() - Send Start Beaconing Request

View file

@ -248,7 +248,7 @@ QDF_STATUS wlansap_pre_start_bss_acs_scan_callback(mac_handle_t mac_handle,
scan_status);
oper_channel =
sap_select_default_oper_chan(sap_ctx->acs_cfg);
sap_ctx->channel = oper_channel;
sap_ctx->chan_freq = wlan_reg_ch_to_freq(oper_channel);
sap_ctx->acs_cfg->pri_ch = oper_channel;
sap_config_acs_result(mac_handle, sap_ctx,
sap_ctx->acs_cfg->ht_sec_ch);
@ -265,19 +265,16 @@ QDF_STATUS wlansap_pre_start_bss_acs_scan_callback(mac_handle_t mac_handle,
if (oper_channel == SAP_CHANNEL_NOT_SELECTED) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
FL("No suitable channel, so select default channel"));
sap_ctx->channel =
sap_select_default_oper_chan(sap_ctx->acs_cfg);
sap_ctx->acs_cfg->pri_ch = sap_ctx->channel;
} else {
/* Valid Channel Found from scan results. */
sap_ctx->acs_cfg->pri_ch = oper_channel;
sap_ctx->channel = oper_channel;
oper_channel = sap_select_default_oper_chan(sap_ctx->acs_cfg);
}
sap_ctx->chan_freq = wlan_reg_ch_to_freq(oper_channel);
sap_ctx->acs_cfg->pri_ch = oper_channel;
sap_config_acs_result(mac_handle, sap_ctx,
sap_ctx->acs_cfg->ht_sec_ch);
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("Channel selected = %d"), sap_ctx->channel);
FL("Channel freq selected = %d"), sap_ctx->chan_freq);
sap_ctx->sap_state = eSAP_ACS_CHANNEL_SELECTED;
sap_ctx->sap_status = eSAP_STATUS_SUCCESS;
close_session:
@ -318,6 +315,7 @@ wlansap_roam_process_ch_change_success(struct mac_context *mac_ctx,
struct sap_sm_event sap_event;
QDF_STATUS qdf_status;
bool is_ch_dfs = false;
uint8_t target_channel;
/*
* Channel change is successful. If the new channel is a DFS channel,
* then we will to perform channel availability check for 60 seconds
@ -325,7 +323,7 @@ wlansap_roam_process_ch_change_success(struct mac_context *mac_ctx,
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
FL("sapdfs: changing target channel to [%d] state %d"),
mac_ctx->sap.SapDfsInfo.target_channel, sap_ctx->fsm_state);
sap_ctx->channel = mac_ctx->sap.SapDfsInfo.target_channel;
target_channel = mac_ctx->sap.SapDfsInfo.target_channel;
/* If SAP is not in starting or started state don't proceed further */
if (sap_ctx->fsm_state == SAP_INIT ||
@ -339,21 +337,20 @@ wlansap_roam_process_ch_change_success(struct mac_context *mac_ctx,
if (sap_ctx->ch_params.ch_width == CH_WIDTH_160MHZ) {
is_ch_dfs = true;
} else if (sap_ctx->ch_params.ch_width == CH_WIDTH_80P80MHZ) {
if (wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->channel) ==
CHANNEL_STATE_DFS ||
if (wlan_reg_get_channel_state(mac_ctx->pdev, target_channel) ==
CHANNEL_STATE_DFS ||
wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->ch_params.center_freq_seg1 -
SIR_80MHZ_START_CENTER_CH_DIFF) ==
CHANNEL_STATE_DFS)
is_ch_dfs = true;
} else {
if (wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->channel) ==
CHANNEL_STATE_DFS)
if (wlan_reg_get_channel_state(mac_ctx->pdev, target_channel) ==
CHANNEL_STATE_DFS)
is_ch_dfs = true;
}
sap_ctx->chan_freq = wlan_reg_ch_to_freq(target_channel);
/* check if currently selected channel is a DFS channel */
if (is_ch_dfs && sap_ctx->pre_cac_complete) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED, FL(
@ -889,8 +886,8 @@ QDF_STATUS wlansap_roam_callback(void *ctx,
case eCSR_ROAM_DFS_RADAR_IND:
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
"Received Radar Indication on sap ch %d, session %d",
sap_ctx->channel, sap_ctx->sessionId);
"Rcvd Radar Indication on sap ch freq %d, session %d",
sap_ctx->chan_freq, sap_ctx->sessionId);
if (!policy_mgr_get_dfs_master_dynamic_enabled(
mac_ctx->psoc, sap_ctx->sessionId)) {
@ -910,11 +907,12 @@ QDF_STATUS wlansap_roam_callback(void *ctx,
}
if (!sap_chan_bond_dfs_sub_chan(
sap_ctx, sap_ctx->channel,
sap_ctx, wlan_reg_freq_to_chan(mac_ctx->pdev,
sap_ctx->chan_freq),
PHY_CHANNEL_BONDING_STATE_MAX)) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
"Ignore Radar event for sap ch %d",
sap_ctx->channel);
"Ignore Radar event for sap ch freq%d",
sap_ctx->chan_freq);
goto EXIT;
}

View file

@ -2749,7 +2749,7 @@ uint8_t sap_select_channel(mac_handle_t mac_handle,
} else if (best_ch_num == 14) {
sap_ctx->acs_cfg->ht_sec_ch = 0;
}
sap_ctx->secondary_ch = sap_ctx->acs_cfg->ht_sec_ch;
sap_ctx->sec_ch_freq = wlan_reg_ch_to_freq(sap_ctx->acs_cfg->ht_sec_ch);
sap_ch_sel_end:
/* Free all the allocated memory */

View file

@ -266,7 +266,7 @@ static uint8_t sap_random_channel_sel(struct sap_context *sap_ctx)
/**
* sap_is_channel_bonding_etsi_weather_channel() - check weather chan bonding.
* @sap_ctx: sap context
* @sap_ctx: sap context.
*
* Check if the current SAP operating channel is bonded to weather radar
* channel in ETSI domain.
@ -276,7 +276,8 @@ static uint8_t sap_random_channel_sel(struct sap_context *sap_ctx)
static bool
sap_is_channel_bonding_etsi_weather_channel(struct sap_context *sap_ctx)
{
if (IS_CH_BONDING_WITH_WEATHER_CH(sap_ctx->channel) &&
if (IS_CH_BONDING_WITH_WEATHER_CH(wlan_freq_to_chan(
sap_ctx->chan_freq)) &&
(sap_ctx->ch_params.ch_width != CH_WIDTH_20MHZ))
return true;
@ -485,14 +486,15 @@ void sap_dfs_set_current_channel(void *ctx)
struct sap_context *sap_ctx = ctx;
uint32_t ic_flags = 0;
uint16_t ic_flagext = 0;
uint8_t ic_ieee = sap_ctx->channel;
uint16_t ic_freq = utils_dfs_chan_to_freq(sap_ctx->channel);
uint8_t ic_ieee;
uint16_t ic_freq = sap_ctx->chan_freq;
uint8_t vht_seg0 = sap_ctx->csr_roamProfile.ch_params.center_freq_seg0;
uint8_t vht_seg1 = sap_ctx->csr_roamProfile.ch_params.center_freq_seg1;
struct wlan_objmgr_pdev *pdev;
struct mac_context *mac_ctx;
uint32_t use_nol = 0;
int error;
uint16_t sap_ch;
mac_ctx = sap_get_mac_context();
if (!mac_ctx) {
@ -507,6 +509,7 @@ void sap_dfs_set_current_channel(void *ctx)
return;
}
ic_ieee = wlan_reg_freq_to_chan(pdev, sap_ctx->chan_freq);
switch (sap_ctx->csr_roamProfile.ch_params.ch_width) {
case CH_WIDTH_20MHZ:
ic_flags |= IEEE80211_CHAN_VHT20;
@ -530,12 +533,13 @@ void sap_dfs_set_current_channel(void *ctx)
return;
}
if (WLAN_REG_IS_24GHZ_CH(sap_ctx->channel))
if (WLAN_REG_IS_24GHZ_CH_FREQ(sap_ctx->chan_freq))
ic_flags |= IEEE80211_CHAN_2GHZ;
else
ic_flags |= IEEE80211_CHAN_5GHZ;
if (wlan_reg_is_dfs_ch(pdev, sap_ctx->channel))
sap_ch = wlan_reg_freq_to_chan(pdev, sap_ctx->chan_freq);
if (wlan_reg_is_dfs_ch(pdev, sap_ch))
ic_flagext |= IEEE80211_CHAN_DFS;
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
@ -545,16 +549,19 @@ void sap_dfs_set_current_channel(void *ctx)
tgt_dfs_set_current_channel(pdev, ic_freq, ic_flags,
ic_flagext, ic_ieee, vht_seg0, vht_seg1);
if (wlan_reg_is_dfs_ch(pdev, sap_ctx->channel)) {
if (wlan_reg_is_dfs_ch(pdev, sap_ch)) {
if (policy_mgr_concurrent_beaconing_sessions_running(
mac_ctx->psoc)) {
uint16_t con_ch;
uint16_t con_ch_freq;
mac_handle_t handle = MAC_HANDLE(mac_ctx);
con_ch =
con_ch_freq =
sme_get_beaconing_concurrent_operation_channel(
handle, sap_ctx->sessionId);
if (!con_ch || !wlan_reg_is_dfs_ch(pdev, con_ch))
if (!con_ch_freq ||
!wlan_reg_is_dfs_ch(pdev,
wlan_reg_freq_to_chan(pdev,
con_ch_freq)))
tgt_dfs_get_radars(pdev);
} else {
tgt_dfs_get_radars(pdev);
@ -621,16 +628,6 @@ sap_dfs_is_channel_in_nol_list(struct sap_context *sap_context,
return false;
}
/* get the bonded channels */
if (channel_number == sap_context->channel && chan_bondState >=
PHY_CHANNEL_BONDING_STATE_MAX)
num_channels = sap_ch_params_to_bonding_channels(
&sap_context->ch_params, channels);
else
num_channels = sap_get_bonding_channels(sap_context,
channel_number, channels,
MAX_BONDED_CHANNELS, chan_bondState);
pdev = mac_ctx->pdev;
if (!pdev) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
@ -638,6 +635,17 @@ sap_dfs_is_channel_in_nol_list(struct sap_context *sap_context,
return false;
}
/* get the bonded channels */
if ((channel_number == wlan_reg_freq_to_chan(pdev,
sap_context->chan_freq)) &&
chan_bondState >= PHY_CHANNEL_BONDING_STATE_MAX)
num_channels = sap_ch_params_to_bonding_channels(
&sap_context->ch_params, channels);
else
num_channels = sap_get_bonding_channels(sap_context,
channel_number, channels,
MAX_BONDED_CHANNELS, chan_bondState);
/* check for NOL, first on will break the loop */
for (i = 0; i < num_channels; i++) {
ch_state = wlan_reg_get_channel_state(pdev, channels[i]);
@ -681,8 +689,9 @@ sap_chan_bond_dfs_sub_chan(struct sap_context *sap_context,
return true;
/* get the bonded channels */
if (channel_number == sap_context->channel && bond_state >=
PHY_CHANNEL_BONDING_STATE_MAX)
if ((channel_number == wlan_reg_freq_to_chan(pdev,
sap_context->chan_freq)) &&
bond_state >= PHY_CHANNEL_BONDING_STATE_MAX)
num_channels = sap_ch_params_to_bonding_channels(
&sap_context->ch_params, channels);
else
@ -726,6 +735,7 @@ sap_validate_chan(struct sap_context *sap_context,
uint32_t sta_sap_bit_mask = QDF_STA_MASK | QDF_SAP_MASK;
uint32_t concurrent_state;
bool go_force_scc;
uint8_t sap_ch;
mac_handle = cds_get_context(QDF_MODULE_ID_SME);
mac_ctx = MAC_CONTEXT(mac_handle);
@ -736,7 +746,7 @@ sap_validate_chan(struct sap_context *sap_context,
return QDF_STATUS_E_FAULT;
}
if (!sap_context->channel) {
if (!sap_context->chan_freq) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
FL("Invalid channel"));
return QDF_STATUS_E_FAILURE;
@ -746,13 +756,13 @@ sap_validate_chan(struct sap_context *sap_context,
(wlan_vdev_mlme_get_opmode(sap_context->vdev) == QDF_P2P_GO_MODE))
goto validation_done;
sap_ch = wlan_reg_freq_to_chan(mac_ctx->pdev, sap_context->chan_freq);
concurrent_state = policy_mgr_get_concurrency_mode(mac_ctx->psoc);
if (policy_mgr_concurrent_beaconing_sessions_running(mac_ctx->psoc) ||
((concurrent_state & sta_sap_bit_mask) == sta_sap_bit_mask) ||
((concurrent_state & sta_go_bit_mask) == sta_go_bit_mask)) {
#ifdef FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE
if (wlan_reg_is_dfs_ch(mac_ctx->pdev,
sap_context->channel)) {
if (wlan_reg_is_dfs_ch(mac_ctx->pdev, sap_ch)) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_WARN,
FL("DFS not supported in STA_AP Mode"));
return QDF_STATUS_E_ABORTED;
@ -763,11 +773,11 @@ sap_validate_chan(struct sap_context *sap_context,
QDF_MCC_TO_SCC_SWITCH_DISABLE) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
FL("check for overlap: chan:%d mode:%d"),
sap_context->channel,
sap_ch,
sap_context->csr_roamProfile.phyMode);
con_ch = sme_check_concurrent_channel_overlap(
mac_handle,
sap_context->channel,
sap_ch,
sap_context->csr_roamProfile.phyMode,
sap_context->cc_switch_mode);
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
@ -778,7 +788,7 @@ sap_validate_chan(struct sap_context *sap_context,
if (QDF_IS_STATUS_ERROR(
policy_mgr_valid_sap_conc_channel_check(
mac_ctx->psoc, &con_ch,
sap_context->channel,
sap_ch,
sap_context->sessionId))) {
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_WARN,
@ -801,11 +811,13 @@ sap_validate_chan(struct sap_context *sap_context,
sta_sap_scc_on_dfs_chan)) {
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_ERROR,
"%s: Override ch %d to %d due to CC Intf",
__func__, sap_context->channel, con_ch);
sap_context->channel = con_ch;
"%s: Override ch freq %d to %d due to CC Intf",
__func__, sap_context->chan_freq,
con_ch);
sap_context->chan_freq = wlan_reg_chan_to_freq(
mac_ctx->pdev, con_ch);
wlan_reg_set_channel_params(mac_ctx->pdev,
sap_context->channel, 0,
con_ch, 0,
&sap_context->ch_params);
}
}
@ -813,8 +825,9 @@ sap_validate_chan(struct sap_context *sap_context,
}
validation_done:
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("for configured channel, Ch= %d"),
sap_context->channel);
FL("for configured channel, Ch_freq = %d"),
sap_context->chan_freq);
sap_ch = wlan_reg_freq_to_chan(mac_ctx->pdev, sap_context->chan_freq);
if (check_for_connection_update) {
/* This wait happens in the hostapd context. The event
* is set in the MC thread context.
@ -823,7 +836,7 @@ validation_done:
policy_mgr_update_and_wait_for_connection_update(
mac_ctx->psoc,
sap_context->sessionId,
sap_context->channel,
sap_ch,
POLICY_MGR_UPDATE_REASON_START_AP);
if (QDF_IS_STATUS_ERROR(qdf_status))
return qdf_status;
@ -832,8 +845,8 @@ validation_done:
if (pre_start_bss) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
FL("ACS end due to Ch override. Sel Ch = %d"),
sap_context->channel);
sap_context->acs_cfg->pri_ch = sap_context->channel;
sap_ch);
sap_context->acs_cfg->pri_ch = sap_ch;
sap_context->acs_cfg->ch_width =
sap_context->ch_width_orig;
sap_config_acs_result(mac_handle, sap_context, 0);
@ -857,7 +870,7 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
uint8_t num_of_channels = 0;
#endif
mac_handle_t mac_handle;
uint8_t con_ch;
uint32_t con_ch_freq;
uint8_t vdev_id;
uint32_t scan_id;
uint8_t *self_mac;
@ -876,7 +889,7 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
FL("Invalid MAC context"));
return QDF_STATUS_E_FAILURE;
}
if (sap_context->channel)
if (sap_context->chan_freq)
return sap_validate_chan(sap_context, true, false);
if (sap_context->freq_list) {
@ -899,10 +912,10 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
policy_mgr_mode_specific_connection_count(mac_ctx->psoc,
PM_P2P_GO_MODE,
NULL)))) {
con_ch = sme_get_beaconing_concurrent_operation_channel(
con_ch_freq = sme_get_beaconing_concurrent_operation_channel(
mac_handle, sap_context->sessionId);
#ifdef FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE
if (con_ch)
if (con_ch_freq)
sap_context->dfs_ch_disable = true;
#endif
}
@ -973,16 +986,18 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
FL("scan request fail %d!!!"),
qdf_ret_status);
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("SAP Configuring default channel, Ch=%d"),
sap_context->channel);
sap_context->channel = sap_select_default_oper_chan(
FL("SAP Configuring default ch, Ch_freq=%d"),
sap_context->chan_freq);
sap_context->chan_freq = sap_select_default_oper_chan(
sap_context->acs_cfg);
sap_context->chan_freq = wlan_reg_chan_to_freq(
mac_ctx->pdev,
sap_context->chan_freq);
#ifdef SOFTAP_CHANNEL_RANGE
if (sap_context->freq_list) {
sap_context->channel =
wlan_reg_freq_to_chan(mac_ctx->pdev,
sap_context->freq_list[0]);
sap_context->chan_freq =
sap_context->freq_list[0];
qdf_mem_free(sap_context->freq_list);
sap_context->freq_list = NULL;
sap_context->num_of_channel = 0;
@ -997,9 +1012,9 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
goto release_vdev_ref;
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("return sme_ScanReq, scanID=%d, Ch=%d"),
FL("return ScanReq, scanID=%d, Ch_freq=%d"),
scan_id,
sap_context->channel);
sap_context->chan_freq);
host_log_acs_scan_start(scan_id, vdev_id);
}
#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
@ -1025,8 +1040,8 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
* channel cannot advance state machine here as said above
*/
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("Channel: %d"),
sap_context->channel);
FL("Channel freq: %d"),
sap_context->chan_freq);
qdf_ret_status = QDF_STATUS_SUCCESS;
@ -1072,7 +1087,7 @@ static QDF_STATUS sap_clear_global_dfs_param(mac_handle_t mac_handle)
struct sap_context *sap_ctx;
sap_ctx = sap_find_valid_concurrent_session(mac_handle);
if (sap_ctx && WLAN_REG_IS_5GHZ_CH(sap_ctx->channel)) {
if (sap_ctx && WLAN_REG_IS_5GHZ_CH_FREQ(sap_ctx->chan_freq)) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
"conc session exists, no need to clear dfs struct");
return QDF_STATUS_SUCCESS;
@ -1492,7 +1507,9 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
FL("(eSAP_START_BSS_EVENT): staId = %d"),
bss_complete->staId);
bss_complete->operatingChannel = (uint8_t) sap_ctx->channel;
bss_complete->operatingChannel = wlan_reg_freq_to_chan(
mac_ctx->pdev,
sap_ctx->chan_freq);
bss_complete->ch_width = sap_ctx->ch_params.ch_width;
break;
case eSAP_DFS_CAC_START:
@ -1750,17 +1767,21 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
* Reconfig ACS result info. For DFS AP-AP Mode Sec AP ACS
* follows pri AP
*/
sap_ctx->acs_cfg->pri_ch = sap_ctx->channel;
sap_ctx->acs_cfg->pri_ch = wlan_reg_freq_to_chan(mac_ctx->pdev,
sap_ctx->chan_freq);
sap_ctx->acs_cfg->ch_width =
sap_ctx->csr_roamProfile.ch_params.ch_width;
sap_config_acs_result(MAC_HANDLE(mac_ctx), sap_ctx,
sap_ctx->secondary_ch);
wlan_reg_freq_to_chan(mac_ctx->pdev,
sap_ctx->sec_ch_freq));
sap_ap_event.sapHddEventCode = eSAP_CHANNEL_CHANGE_EVENT;
acs_selected = &sap_ap_event.sapevt.sap_ch_selected;
acs_selected->pri_ch = sap_ctx->channel;
acs_selected->ht_sec_ch = sap_ctx->secondary_ch;
acs_selected->pri_ch = wlan_reg_freq_to_chan(mac_ctx->pdev,
sap_ctx->chan_freq);
acs_selected->ht_sec_ch = wlan_reg_freq_to_chan(mac_ctx->pdev,
sap_ctx->sec_ch_freq);
acs_selected->ch_width =
sap_ctx->csr_roamProfile.ch_params.ch_width;
acs_selected->vht_seg0_center_ch =
@ -1792,9 +1813,9 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
case eSAP_STOP_BSS_DUE_TO_NO_CHNL:
sap_ap_event.sapHddEventCode = eSAP_STOP_BSS_DUE_TO_NO_CHNL;
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
FL("stopping session_id:%d, bssid:%pM, channel:%d"),
FL("stopping session_id:%d, bssid:%pM, chan_freq:%d"),
sap_ctx->sessionId, sap_ctx->self_mac_addr,
sap_ctx->channel);
sap_ctx->chan_freq);
break;
case eSAP_CHANNEL_CHANGE_RESP:
@ -2081,8 +2102,8 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
* (both without substates)
*/
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
"sapdfs: channel[%d] from state %s => %s",
sap_context->channel, "SAP_STARTING",
"sapdfs: chan_freq[%d] from state %s => %s",
sap_context->chan_freq, "SAP_STARTING",
"SAP_STARTED");
sap_context->fsm_state = SAP_STARTED;
@ -2133,8 +2154,10 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
bool b_leak_chan = false;
uint8_t temp_chan;
uint8_t sap_chan;
temp_chan = sap_ctx->channel;
sap_chan = wlan_reg_freq_to_chan(mac_ctx->pdev, sap_ctx->chan_freq);
temp_chan = sap_chan;
utils_dfs_mark_leaking_ch(mac_ctx->pdev,
sap_ctx->ch_params.ch_width,
1, &temp_chan);
@ -2143,12 +2166,12 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
* if selelcted channel has leakage to channels
* in NOL, the temp_chan will be reset
*/
b_leak_chan = (temp_chan != sap_ctx->channel);
b_leak_chan = (temp_chan != sap_chan);
/*
* check if channel is in DFS_NOL or if the channel
* has leakage to the channels in NOL
*/
if (sap_dfs_is_channel_in_nol_list(sap_ctx, sap_ctx->channel,
if (sap_dfs_is_channel_in_nol_list(sap_ctx, sap_chan,
PHY_CHANNEL_BONDING_STATE_MAX) ||
b_leak_chan) {
uint8_t ch;
@ -2167,13 +2190,13 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
}
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("channel %d is in NOL, Start Bss on new chan %d"),
sap_ctx->channel, ch);
FL("ch_freq %d is in NOL, Start Bss on new chan %d"),
sap_ctx->chan_freq, ch);
sap_ctx->channel = ch;
wlan_reg_set_channel_params(mac_ctx->pdev,
sap_ctx->channel,
sap_ctx->secondary_ch,
sap_ctx->chan_freq = wlan_reg_chan_to_freq(mac_ctx->pdev, ch);
wlan_reg_set_channel_params(mac_ctx->pdev, ch,
wlan_reg_freq_to_chan(mac_ctx->pdev,
sap_ctx->sec_ch_freq),
&sap_ctx->ch_params);
}
@ -2184,24 +2207,26 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
* override AP2 ACS scan result with AP1 DFS channel
*/
if (policy_mgr_concurrent_beaconing_sessions_running(mac_ctx->psoc)) {
uint32_t con_ch_freq;
uint16_t con_ch;
con_ch = sme_get_beaconing_concurrent_operation_channel(
con_ch_freq = sme_get_beaconing_concurrent_operation_channel(
mac_handle, sap_ctx->sessionId);
con_ch = wlan_reg_freq_to_chan(mac_ctx->pdev, con_ch_freq);
/* Overwrite second AP's channel with first only when:
* 1. If operating mode is single mac
* 2. or if 2nd AP is coming up on 5G band channel
*/
if ((!policy_mgr_is_hw_dbs_capable(mac_ctx->psoc) ||
WLAN_REG_IS_5GHZ_CH(sap_ctx->channel)) &&
WLAN_REG_IS_5GHZ_CH_FREQ(sap_ctx->chan_freq)) &&
con_ch && wlan_reg_is_dfs_ch(mac_ctx->pdev, con_ch)) {
sap_ctx->channel = con_ch;
sap_ctx->chan_freq = con_ch_freq;
wlan_reg_set_channel_params(mac_ctx->pdev,
sap_ctx->channel, 0,
con_ch, 0,
&sap_ctx->ch_params);
}
}
if (sap_ctx->channel > 14 &&
if (WLAN_REG_IS_5GHZ_CH_FREQ(sap_ctx->chan_freq) &&
(sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11g ||
sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11g_ONLY))
@ -2221,9 +2246,7 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
1;
sap_ctx->csr_roamProfile.ChannelInfo.freq_list =
&sap_ctx->csr_roamProfile.op_freq;
sap_ctx->csr_roamProfile.op_freq =
wlan_reg_chan_to_freq(mac_ctx->pdev,
(uint8_t)sap_ctx->channel);
sap_ctx->csr_roamProfile.op_freq = sap_ctx->chan_freq;
sap_ctx->csr_roamProfile.ch_params.ch_width =
sap_ctx->ch_params.ch_width;
@ -2239,8 +2262,8 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
sap_ctx->csr_roamProfile.beacon_tx_rate =
sap_ctx->beacon_tx_rate;
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("notify hostapd about channel selection: %d"),
sap_ctx->channel);
FL("notify hostapd about chan freq selection: %d"),
sap_ctx->chan_freq);
sap_signal_hdd_event(sap_ctx, NULL,
eSAP_CHANNEL_CHANGE_EVENT,
(void *)eSAP_STATUS_SUCCESS);
@ -2480,6 +2503,7 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
tSapDfsInfo *sap_dfs_info;
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
uint8_t is_dfs = false;
uint8_t sap_chan;
if (msg == eSAP_MAC_START_BSS_SUCCESS) {
/*
@ -2487,8 +2511,8 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
* (both without substates)
*/
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("from state channel = %d %s => %s ch_width %d"),
sap_ctx->channel, "SAP_STARTING", "SAP_STARTED",
FL("from state chan_freq = %d %s => %s ch_width %d"),
sap_ctx->chan_freq, "SAP_STARTING", "SAP_STARTED",
sap_ctx->ch_params.ch_width);
sap_ctx->fsm_state = SAP_STARTED;
@ -2496,12 +2520,13 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
qdf_status = sap_signal_hdd_event(sap_ctx, roam_info,
eSAP_START_BSS_EVENT,
(void *) eSAP_STATUS_SUCCESS);
sap_chan = wlan_reg_freq_to_chan(mac_ctx->pdev,
sap_ctx->chan_freq);
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("ap_ctx->ch_params.ch_width %d, channel %d"),
sap_ctx->ch_params.ch_width,
wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->channel));
sap_chan));
/*
* The upper layers have been informed that AP is up and
@ -2512,7 +2537,7 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
is_dfs = true;
} else if (sap_ctx->ch_params.ch_width == CH_WIDTH_80P80MHZ) {
if (wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->channel) ==
sap_chan) ==
CHANNEL_STATE_DFS ||
wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->ch_params.center_freq_seg1 -
@ -2521,8 +2546,8 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
is_dfs = true;
} else {
if (wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->channel) ==
CHANNEL_STATE_DFS)
sap_chan) ==
CHANNEL_STATE_DFS)
is_dfs = true;
}
@ -2555,8 +2580,8 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
mac_handle);
} else if (msg == eSAP_OPERATING_CHANNEL_CHANGED) {
/* The operating channel has changed, update hostapd */
sap_ctx->channel =
(uint8_t) mac_ctx->sap.SapDfsInfo.target_channel;
sap_ctx->chan_freq = wlan_reg_chan_to_freq(mac_ctx->pdev,
mac_ctx->sap.SapDfsInfo.target_channel);
sap_ctx->fsm_state = SAP_STARTED;
@ -3476,7 +3501,7 @@ uint8_t sap_indicate_radar(struct sap_context *sap_ctx)
mac->sap.SapDfsInfo.csaIERequired = true;
if (mac->mlme_cfg->dfs_cfg.dfs_disable_channel_switch)
return sap_ctx->channel;
return wlan_reg_freq_to_chan(mac->pdev, sap_ctx->chan_freq);
/* set the Radar Found flag in SapDfsInfo */
mac->sap.SapDfsInfo.sap_radar_found_status = true;
@ -3546,8 +3571,8 @@ void sap_dfs_cac_timer_callback(void *data)
* CAC Complete, post eSAP_DFS_CHANNEL_CAC_END to sap_fsm
*/
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
"sapdfs: Sending eSAP_DFS_CHANNEL_CAC_END for target_channel = %d on sapctx[%pK]",
sap_ctx->channel, sap_ctx);
"sapdfs: Sending eSAP_DFS_CHANNEL_CAC_END for target_chan_freq = %d on sapctx[%pK]",
sap_ctx->chan_freq, sap_ctx);
sap_event.event = eSAP_DFS_CHANNEL_CAC_END;
sap_event.params = 0;
@ -3629,8 +3654,8 @@ static int sap_start_dfs_cac_timer(struct sap_context *sap_ctx)
cac_dur = cac_dur / 100;
#endif
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
"sapdfs: SAP_DFS_CHANNEL_CAC_START on CH-%d, CAC_DUR-%d sec",
sap_ctx->channel, cac_dur / 1000);
"sapdfs: SAP_DFS_CHANNEL_CAC_START on CH freq %d, CAC_DUR-%d sec",
sap_ctx->chan_freq, cac_dur / 1000);
qdf_mc_timer_init(&mac->sap.SapDfsInfo.sap_dfs_cac_timer,
QDF_TIMER_TYPE_SW,

View file

@ -122,9 +122,9 @@ struct sap_avoid_channels_info {
struct sap_context {
/* Include the current channel of AP */
uint32_t channel;
uint32_t secondary_ch;
/* Include the current channel frequency of AP */
uint32_t chan_freq;
uint32_t sec_ch_freq;
/* Include the SME(CSR) sessionId here */
uint8_t sessionId;

View file

@ -495,7 +495,7 @@ uint16_t wlansap_check_cc_intf(struct sap_context *sap_ctx)
}
phy_mode = sap_ctx->csr_roamProfile.phyMode;
intf_ch = sme_check_concurrent_channel_overlap(MAC_HANDLE(mac),
sap_ctx->channel,
sap_ctx->chan_freq,
phy_mode,
sap_ctx->cc_switch_mode);
return intf_ch;
@ -543,7 +543,7 @@ wlansap_set_scan_acs_channel_params(struct sap_config *config,
}
/* Channel selection is auto or configured */
psap_ctx->channel = config->channel;
psap_ctx->chan_freq = config->chan_freq;
psap_ctx->dfs_mode = config->acs_dfs_mode;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
psap_ctx->cc_switch_mode = config->cc_switch_mode;
@ -563,7 +563,7 @@ wlansap_set_scan_acs_channel_params(struct sap_config *config,
psap_ctx->enableOverLapCh = config->enOverLapCh;
psap_ctx->acs_cfg = &config->acs_cfg;
psap_ctx->ch_width_orig = config->acs_cfg.ch_width;
psap_ctx->secondary_ch = config->sec_ch;
psap_ctx->sec_ch_freq = config->sec_ch_freq;
/*
* Set the BSSID to your "self MAC Addr" read
@ -721,7 +721,7 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
sap_ctx->fsm_state = SAP_INIT;
/* Channel selection is auto or configured */
sap_ctx->channel = config->channel;
sap_ctx->chan_freq = config->chan_freq;
sap_ctx->dfs_mode = config->acs_dfs_mode;
sap_ctx->ch_params.ch_width = config->ch_params.ch_width;
sap_ctx->ch_params.center_freq_seg0 =
@ -748,7 +748,7 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
sap_ctx->user_context = user_context;
sap_ctx->enableOverLapCh = config->enOverLapCh;
sap_ctx->acs_cfg = &config->acs_cfg;
sap_ctx->secondary_ch = config->sec_ch;
sap_ctx->sec_ch_freq = config->sec_ch_freq;
sap_ctx->dfs_cac_offload = config->dfs_cac_offload;
sap_ctx->isCacEndNotified = false;
sap_ctx->is_chan_change_inprogress = false;
@ -1409,7 +1409,7 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
}
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
"%s: sap chan:%d target:%d conn on 5GHz:%d, csa_reason:%s(%d) strict %d vdev %d",
__func__, sap_ctx->channel, targetChannel,
__func__, sap_ctx->chan_freq, targetChannel,
policy_mgr_is_any_mode_active_on_band_along_with_session(
mac->psoc, sap_ctx->sessionId, POLICY_MGR_BAND_5),
sap_get_csa_reason_str(sap_ctx->csa_reason),
@ -1421,7 +1421,8 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
* Now, validate if the passed channel is valid in the
* current regulatory domain.
*/
if (sap_ctx->channel != targetChannel &&
if (wlan_reg_freq_to_chan(mac->pdev, sap_ctx->chan_freq) !=
targetChannel &&
((wlan_reg_get_channel_state(mac->pdev, targetChannel) ==
CHANNEL_STATE_ENABLE) ||
(wlan_reg_get_channel_state(mac->pdev, targetChannel) ==
@ -1796,22 +1797,22 @@ QDF_STATUS wlan_sap_get_pre_cac_vdev_id(mac_handle_t handle, uint8_t *vdev_id)
}
void wlansap_get_sec_channel(uint8_t sec_ch_offset,
uint8_t op_channel,
uint8_t *sec_channel)
uint32_t op_chan_freq,
uint32_t *sec_chan_freq)
{
switch (sec_ch_offset) {
case LOW_PRIMARY_CH:
*sec_channel = op_channel + 4;
*sec_chan_freq = op_chan_freq + 20;
break;
case HIGH_PRIMARY_CH:
*sec_channel = op_channel - 4;
*sec_chan_freq = op_chan_freq - 20;
break;
default:
*sec_channel = 0;
*sec_chan_freq = 0;
}
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
"%s: sec channel offset %d, sec channel %d",
__func__, sec_ch_offset, *sec_channel);
__func__, sec_ch_offset, *sec_chan_freq);
}
static void
@ -1820,26 +1821,27 @@ wlansap_set_cac_required_for_chan(struct mac_context *mac_ctx,
{
bool is_ch_dfs = false;
bool cac_required;
uint32_t channel;
channel = wlan_reg_freq_to_chan(mac_ctx->pdev, sap_ctx->chan_freq);
if (sap_ctx->ch_params.ch_width == CH_WIDTH_160MHZ) {
is_ch_dfs = true;
} else if (sap_ctx->ch_params.ch_width == CH_WIDTH_80P80MHZ) {
if ((wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->channel) ==
if ((wlan_reg_get_channel_state(mac_ctx->pdev, channel) ==
CHANNEL_STATE_DFS) ||
(wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->ch_params.center_freq_seg1 -
SIR_80MHZ_START_CENTER_CH_DIFF) ==
CHANNEL_STATE_DFS))
is_ch_dfs = true;
} else if (wlan_reg_get_channel_state(mac_ctx->pdev,
sap_ctx->channel) ==
} else if (wlan_reg_get_channel_state(mac_ctx->pdev, channel) ==
CHANNEL_STATE_DFS) {
is_ch_dfs = true;
}
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
"%s: vdev id %d chan %d is_ch_dfs %d pre_cac_complete %d ignore_cac %d cac_state %d",
__func__, sap_ctx->sessionId, sap_ctx->channel, is_ch_dfs,
__func__, sap_ctx->sessionId, channel, is_ch_dfs,
sap_ctx->pre_cac_complete, mac_ctx->sap.SapDfsInfo.ignore_cac,
mac_ctx->sap.SapDfsInfo.cac_state);
@ -1916,9 +1918,10 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
/* Update the channel as this will be used to
* send event to supplicant
*/
sap_ctx->channel = target_channel;
wlansap_get_sec_channel(ch_params->sec_ch_offset, target_channel,
(uint8_t *)(&sap_ctx->secondary_ch));
sap_ctx->chan_freq = wlan_reg_chan_to_freq(mac_ctx->pdev,
target_channel);
wlansap_get_sec_channel(ch_params->sec_ch_offset, sap_ctx->chan_freq,
&sap_ctx->sec_ch_freq);
sap_ctx->csr_roamProfile.ch_params.ch_width = ch_params->ch_width;
sap_ctx->csr_roamProfile.ch_params.sec_ch_offset =
ch_params->sec_ch_offset;
@ -1935,8 +1938,8 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
&sap_ctx->csr_roamProfile);
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
"%s: chan:%d phy_mode %d width:%d offset:%d seg0:%d seg1:%d",
__func__, sap_ctx->channel, phy_mode, ch_params->ch_width,
"%s: chan_freq:%d phy_mode %d width:%d offset:%d seg0:%d seg1:%d",
__func__, sap_ctx->chan_freq, phy_mode, ch_params->ch_width,
ch_params->sec_ch_offset, ch_params->center_freq_seg0,
ch_params->center_freq_seg1);
@ -2057,7 +2060,7 @@ bool sap_is_auto_channel_select(struct sap_context *sapcontext)
"%s: Invalid SAP pointer", __func__);
return false;
}
return sapcontext->channel == AUTO_CHANNEL_SELECT;
return sapcontext->chan_freq == AUTO_CHANNEL_SELECT;
}
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
@ -2585,8 +2588,8 @@ QDF_STATUS wlansap_acs_chselect(struct sap_context *sap_context,
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
FL("Scan Req Failed/ACS Overridden"));
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
FL("Selected channel = %d"),
sap_context->channel);
FL("Selected channel frequency = %d"),
sap_context->chan_freq);
return sap_signal_hdd_event(sap_context, NULL,
eSAP_ACS_CHANNEL_SELECTED,

View file

@ -933,7 +933,7 @@ uint8_t csr_get_concurrent_operation_channel(struct mac_context *mac_ctx);
/**
* csr_get_beaconing_concurrent_channel() - To get concurrent operating channel
* of beaconing interface
* frequency of beaconing interface
* @mac_ctx: Pointer to mac context
* @vdev_id_to_skip: channel of which vdev id to skip
*
@ -941,10 +941,10 @@ uint8_t csr_get_concurrent_operation_channel(struct mac_context *mac_ctx);
* and will skip the channel of vdev_id_to_skip.
* If other no reqested mode is active it will return 0
*
* Return: uint8_t
* Return: uint32_t
*/
uint8_t csr_get_beaconing_concurrent_channel(struct mac_context *mac_ctx,
uint8_t vdev_id_to_skip);
uint32_t csr_get_beaconing_concurrent_channel(struct mac_context *mac_ctx,
uint8_t vdev_id_to_skip);
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
uint16_t csr_check_concurrent_channel_overlap(

View file

@ -724,7 +724,7 @@ QDF_STATUS sme_configure_app_type2_params(mac_handle_t mac_handle,
#endif
/**
* sme_get_beaconing_concurrent_operation_channel() - To get concurrent
* operating channel of beaconing interface
* operating channel frequency of beaconing interface
* @mac_handle: Pointer to mac context
* @vdev_id_to_skip: channel of which vdev id to skip
*
@ -732,13 +732,13 @@ QDF_STATUS sme_configure_app_type2_params(mac_handle_t mac_handle,
* and will skip the channel of vdev_id_to_skip.
* If other no reqested mode is active it will return 0
*
* Return: uint8_t
* Return: uint32_t
*/
uint8_t sme_get_beaconing_concurrent_operation_channel(mac_handle_t mac_handle,
uint32_t sme_get_beaconing_concurrent_operation_channel(mac_handle_t mac_handle,
uint8_t vdev_id_to_skip);
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
uint16_t sme_check_concurrent_channel_overlap(mac_handle_t mac_handle,
uint16_t sap_ch,
uint16_t sap_ch_freq,
eCsrPhyMode sapPhyMode,
uint8_t cc_switch_mode);
#endif

View file

@ -5063,29 +5063,29 @@ QDF_STATUS sme_configure_app_type2_params(mac_handle_t mac_handle,
}
#endif
uint8_t sme_get_beaconing_concurrent_operation_channel(mac_handle_t mac_handle,
uint8_t vdev_id_to_skip)
uint32_t sme_get_beaconing_concurrent_operation_channel(mac_handle_t mac_handle,
uint8_t vdev_id_to_skip)
{
QDF_STATUS status = QDF_STATUS_E_FAILURE;
struct mac_context *mac = MAC_CONTEXT(mac_handle);
uint8_t channel = 0;
uint32_t chan_freq = 0;
status = sme_acquire_global_lock(&mac->sme);
if (QDF_IS_STATUS_SUCCESS(status)) {
channel = csr_get_beaconing_concurrent_channel(mac,
chan_freq = csr_get_beaconing_concurrent_channel(mac,
vdev_id_to_skip);
sme_info("Other Concurrent Channel: %d skipped vdev_id %d",
channel, vdev_id_to_skip);
sme_info("Other Concurrent Chan_freq: %d skipped vdev_id %d",
chan_freq, vdev_id_to_skip);
sme_release_global_lock(&mac->sme);
}
return channel;
return chan_freq;
}
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
uint16_t sme_check_concurrent_channel_overlap(mac_handle_t mac_handle,
uint16_t sap_ch,
uint16_t sap_ch_freq,
eCsrPhyMode sapPhyMode,
uint8_t cc_switch_mode)
{
@ -5095,10 +5095,12 @@ uint16_t sme_check_concurrent_channel_overlap(mac_handle_t mac_handle,
status = sme_acquire_global_lock(&mac->sme);
if (QDF_IS_STATUS_SUCCESS(status)) {
channel =
csr_check_concurrent_channel_overlap(mac, sap_ch,
sapPhyMode,
cc_switch_mode);
channel = csr_check_concurrent_channel_overlap(mac,
wlan_reg_freq_to_chan(
mac->pdev,
sap_ch_freq),
sapPhyMode,
cc_switch_mode);
sme_release_global_lock(&mac->sme);
}

View file

@ -741,7 +741,7 @@ uint8_t csr_get_concurrent_operation_channel(struct mac_context *mac_ctx)
return 0;
}
uint8_t csr_get_beaconing_concurrent_channel(struct mac_context *mac_ctx,
uint32_t csr_get_beaconing_concurrent_channel(struct mac_context *mac_ctx,
uint8_t vdev_id_to_skip)
{
struct csr_roam_session *session = NULL;
@ -761,9 +761,7 @@ uint8_t csr_get_beaconing_concurrent_channel(struct mac_context *mac_ctx,
(persona == QDF_SAP_MODE)) &&
(session->connectState !=
eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED))
return wlan_reg_freq_to_chan(
mac_ctx->pdev,
session->connectedProfile.op_freq);
return session->connectedProfile.op_freq;
}
return 0;