mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
qcacld-3.0: Move common code for set channel and add bss to new api
Some of the code in set channel and add bss API is duplicate so move it to a API which can be called from both place. Change-Id: I73f1f7b06034cff88589f6818a94a202604287e1 CRs-Fixed: 2535158
This commit is contained in:
parent
9c35741281
commit
cf340dd8e7
9 changed files with 117 additions and 273 deletions
|
|
@ -558,7 +558,6 @@ void lim_process_mlm_ft_reassoc_req(struct mac_context *mac,
|
|||
uint32_t teleBcnEn = 0;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct vdev_mlme_obj *mlme_obj;
|
||||
struct wlan_channel *des_chan;
|
||||
|
||||
if (!reassoc_req) {
|
||||
pe_err("reassoc_req is NULL");
|
||||
|
|
@ -639,41 +638,15 @@ void lim_process_mlm_ft_reassoc_req(struct mac_context *mac,
|
|||
pe_err("vdev component object is NULL");
|
||||
return;
|
||||
}
|
||||
des_chan = vdev->vdev_mlme.des_chan;
|
||||
des_chan->ch_freq = session->curr_op_freq;
|
||||
des_chan->ch_width = session->ch_width;
|
||||
des_chan->ch_freq_seg1 = session->ch_center_freq_seg0;
|
||||
des_chan->ch_freq_seg2 = session->ch_center_freq_seg1;
|
||||
|
||||
if (session->ch_width == CH_WIDTH_10MHZ)
|
||||
mlme_obj->mgmt.rate_info.half_rate = 1;
|
||||
else if (session->ch_width == CH_WIDTH_5MHZ)
|
||||
mlme_obj->mgmt.rate_info.quarter_rate = 1;
|
||||
|
||||
status = lim_set_ch_phy_mode(vdev, session->dot11mode);
|
||||
status = lim_pre_vdev_start(mac, mlme_obj, session);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
qdf_mem_free(reassoc_req);
|
||||
return;
|
||||
}
|
||||
|
||||
mlme_obj->mgmt.generic.maxregpower = session->maxTxPower;
|
||||
mlme_obj->proto.generic.beacon_interval =
|
||||
session->beaconParams.beaconInterval;
|
||||
mlme_obj->proto.generic.dtim_period = session->dtimPeriod;
|
||||
mlme_obj->mgmt.ap.hidden_ssid = session->ssidHidden;
|
||||
wlan_vdev_mlme_set_ssid(vdev, session->ssId.ssId,
|
||||
session->ssId.length);
|
||||
qdf_mem_copy(mlme_obj->mgmt.generic.bssid, session->bssId,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
|
||||
if (session->nss == 2) {
|
||||
mlme_obj->mgmt.chainmask_info.num_rx_chain = 2;
|
||||
mlme_obj->mgmt.chainmask_info.num_tx_chain = 2;
|
||||
} else {
|
||||
mlme_obj->mgmt.chainmask_info.num_rx_chain = 1;
|
||||
mlme_obj->mgmt.chainmask_info.num_tx_chain = 1;
|
||||
}
|
||||
|
||||
session->pLimMlmReassocReq = reassoc_req;
|
||||
/* we need to defer the message until we get response back from HAL */
|
||||
SET_LIM_PROCESS_DEFD_MESGS(mac, false);
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ lim_mlm_add_bss(struct mac_context *mac_ctx,
|
|||
tLimMlmStartReq *mlm_start_req, struct pe_session *session)
|
||||
{
|
||||
struct vdev_mlme_obj *mlme_obj;
|
||||
struct wlan_channel *des_chan;
|
||||
struct wlan_objmgr_vdev *vdev = session->vdev;
|
||||
uint8_t vdev_id = session->vdev_id;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
|
@ -196,65 +195,25 @@ lim_mlm_add_bss(struct mac_context *mac_ctx,
|
|||
|
||||
qdf_mem_copy(mlme_obj->mgmt.generic.bssid, mlm_start_req->bssId,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
mlme_obj->proto.generic.slot_time = session->shortSlotTimeSupported;
|
||||
mlme_obj->proto.generic.beacon_interval = mlm_start_req->beaconPeriod;
|
||||
mlme_obj->proto.generic.dtim_period = mlm_start_req->dtimPeriod;
|
||||
|
||||
mlme_obj->proto.ht_info.allow_ht = mlm_start_req->htCapable;
|
||||
mlme_obj->proto.vht_info.allow_vht = session->vhtCapability;
|
||||
if (lim_is_session_he_capable(session)) {
|
||||
lim_decide_he_op(mac_ctx, &mlme_obj->proto.he_ops_info.he_ops,
|
||||
session);
|
||||
lim_update_usr_he_cap(mac_ctx, session);
|
||||
}
|
||||
|
||||
des_chan = vdev->vdev_mlme.des_chan;
|
||||
des_chan->ch_freq = mlm_start_req->oper_ch_freq;
|
||||
des_chan->ch_width = session->ch_width;
|
||||
des_chan->ch_freq_seg1 = session->ch_center_freq_seg0;
|
||||
des_chan->ch_freq_seg2 = session->ch_center_freq_seg1;
|
||||
pe_debug("ch_freq_seg1: %d, ch_freq_seg2: %d",
|
||||
des_chan->ch_freq_seg1, des_chan->ch_freq_seg2);
|
||||
|
||||
/* Send the SSID to HAL to enable SSID matching for IBSS */
|
||||
wlan_vdev_mlme_set_ssid(vdev, mlm_start_req->ssId.ssId,
|
||||
mlm_start_req->ssId.length);
|
||||
mlme_obj->mgmt.ap.hidden_ssid = session->ssidHidden;
|
||||
pe_debug("TRYING TO HIDE SSID %d", mlme_obj->mgmt.ap.hidden_ssid);
|
||||
mlme_obj->mgmt.generic.maxregpower = session->maxTxPower;
|
||||
|
||||
/* Set a new state for MLME */
|
||||
session->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_STATE;
|
||||
MTRACE(mac_trace(mac_ctx, TRACE_CODE_MLM_STATE, session->peSessionId,
|
||||
session->limMlmState));
|
||||
|
||||
status = lim_set_ch_phy_mode(vdev, session->dot11mode);
|
||||
status = lim_pre_vdev_start(mac_ctx, mlme_obj, session);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
goto send_fail_resp;
|
||||
|
||||
if (session->nss == 2) {
|
||||
mlme_obj->mgmt.chainmask_info.num_rx_chain = 2;
|
||||
mlme_obj->mgmt.chainmask_info.num_tx_chain = 2;
|
||||
} else {
|
||||
mlme_obj->mgmt.chainmask_info.num_rx_chain = 1;
|
||||
mlme_obj->mgmt.chainmask_info.num_tx_chain = 1;
|
||||
}
|
||||
mlme_obj->mgmt.ap.cac_duration_ms = session->cac_duration_ms;
|
||||
mlme_obj->mgmt.rate_info.bcn_tx_rate = session->beacon_tx_rate;
|
||||
pe_debug("dot11_mode:%d nss value:%d",
|
||||
session->dot11mode, session->nss);
|
||||
|
||||
if (cds_is_5_mhz_enabled()) {
|
||||
mlme_obj->mgmt.rate_info.quarter_rate = 1;
|
||||
} else if (cds_is_10_mhz_enabled()) {
|
||||
mlme_obj->mgmt.rate_info.half_rate = 1;
|
||||
}
|
||||
|
||||
addbss_param = qdf_mem_malloc(sizeof(struct bss_params));
|
||||
if (!addbss_param) {
|
||||
pe_err("malloc failed");
|
||||
if (!addbss_param)
|
||||
goto send_fail_resp;
|
||||
}
|
||||
|
||||
addbss_param->vhtCapable = mlm_start_req->htCapable;
|
||||
addbss_param->htCapable = session->vhtCapability;
|
||||
addbss_param->ch_width = session->ch_width;
|
||||
|
|
@ -385,14 +344,8 @@ static void lim_post_join_set_link_state_callback(
|
|||
session_entry->curr_op_freq,
|
||||
session_entry->ch_width,
|
||||
session_entry->maxTxPower);
|
||||
lim_set_channel(
|
||||
mac,
|
||||
wlan_reg_freq_to_chan(mac->pdev, session_entry->curr_op_freq),
|
||||
session_entry->ch_center_freq_seg0,
|
||||
session_entry->ch_center_freq_seg1,
|
||||
session_entry->ch_width,
|
||||
session_entry->maxTxPower,
|
||||
session_entry->peSessionId, 0, 0);
|
||||
lim_send_switch_chnl_params(mac, session_entry);
|
||||
|
||||
return;
|
||||
|
||||
failure:
|
||||
|
|
@ -2216,38 +2169,3 @@ void lim_process_assoc_failure_timeout(struct mac_context *mac_ctx,
|
|||
eSIR_MAC_UNSPEC_FAILURE_STATUS, session);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_set_channel() - set channel api for lim
|
||||
*
|
||||
* @mac_ctx: Pointer to Global MAC structure
|
||||
* @channel: power save state
|
||||
* @ch_center_freq_seg0: center freq seq 0
|
||||
* @ch_center_freq_seg1: center freq seq 1
|
||||
* @ch_width: channel width
|
||||
* @max_tx_power: max tx power
|
||||
* @pe_session_id: pe session id
|
||||
*
|
||||
* set channel api for lim
|
||||
*
|
||||
* @Return: None
|
||||
*/
|
||||
void lim_set_channel(struct mac_context *mac_ctx, uint8_t channel,
|
||||
uint8_t ch_center_freq_seg0, uint8_t ch_center_freq_seg1,
|
||||
enum phy_ch_width ch_width, int8_t max_tx_power,
|
||||
uint8_t pe_session_id, uint32_t cac_duration_ms,
|
||||
uint32_t dfs_regdomain)
|
||||
{
|
||||
struct pe_session *pe_session;
|
||||
|
||||
pe_session = pe_find_session_by_session_id(mac_ctx, pe_session_id);
|
||||
|
||||
if (!pe_session) {
|
||||
pe_err("Invalid PE session: %d", pe_session_id);
|
||||
return;
|
||||
}
|
||||
lim_send_switch_chnl_params(mac_ctx, channel, ch_center_freq_seg0,
|
||||
ch_center_freq_seg1, ch_width,
|
||||
max_tx_power, pe_session_id, false,
|
||||
cac_duration_ms, dfs_regdomain);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -469,15 +469,7 @@ lim_restore_pre_reassoc_state(struct mac_context *mac,
|
|||
/* 'Change' timer for future activations */
|
||||
lim_deactivate_and_change_timer(mac, eLIM_REASSOC_FAIL_TIMER);
|
||||
|
||||
lim_set_channel(
|
||||
mac,
|
||||
wlan_reg_freq_to_chan(mac->pdev, pe_session->curr_op_freq),
|
||||
pe_session->ch_center_freq_seg0,
|
||||
pe_session->ch_center_freq_seg1,
|
||||
pe_session->ch_width,
|
||||
pe_session->maxTxPower,
|
||||
pe_session->peSessionId,
|
||||
0, 0);
|
||||
lim_send_switch_chnl_params(mac, pe_session);
|
||||
|
||||
/* @ToDo:Need to Integrate the STOP the Dataxfer to AP from 11H code */
|
||||
|
||||
|
|
|
|||
|
|
@ -88,137 +88,56 @@ QDF_STATUS lim_send_beacon_params(struct mac_context *mac,
|
|||
return retCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_send_switch_chnl_params()
|
||||
*
|
||||
***FUNCTION:
|
||||
* This function is called to send Channel Switch Indication to WMA
|
||||
*
|
||||
***LOGIC:
|
||||
*
|
||||
***ASSUMPTIONS:
|
||||
* NA
|
||||
*
|
||||
***NOTE:
|
||||
* NA
|
||||
*
|
||||
* @param mac pointer to Global Mac structure.
|
||||
* @param chnlNumber New Channel Number to be switched to.
|
||||
* @param ch_width an enum for channel width.
|
||||
* @param localPowerConstraint 11h local power constraint value
|
||||
*
|
||||
* @return success if message send is ok, else false.
|
||||
*/
|
||||
QDF_STATUS lim_send_switch_chnl_params(struct mac_context *mac,
|
||||
uint8_t chnlNumber,
|
||||
uint8_t ch_center_freq_seg0,
|
||||
uint8_t ch_center_freq_seg1,
|
||||
enum phy_ch_width ch_width,
|
||||
int8_t maxTxPower,
|
||||
uint8_t peSessionId,
|
||||
uint8_t is_restart,
|
||||
uint32_t cac_duration_ms,
|
||||
uint32_t dfs_regdomain)
|
||||
struct pe_session *session)
|
||||
{
|
||||
struct pe_session *pe_session;
|
||||
struct vdev_mlme_obj *mlme_obj;
|
||||
struct wlan_channel *des_chan;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
uint8_t vdev_id;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct vdev_start_response rsp = {0};
|
||||
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
pe_session = pe_find_session_by_session_id(mac, peSessionId);
|
||||
if (!pe_session) {
|
||||
pe_err("Unable to get Session for session Id %d",
|
||||
peSessionId);
|
||||
if (!session) {
|
||||
pe_err("session is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
vdev_id = pe_session->vdev_id;
|
||||
vdev = pe_session->vdev;
|
||||
if (!vdev) {
|
||||
if (!session->vdev) {
|
||||
pe_err("vdev is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
mlme_obj = wlan_vdev_mlme_get_cmpt_obj(vdev);
|
||||
mlme_obj = wlan_vdev_mlme_get_cmpt_obj(session->vdev);
|
||||
if (!mlme_obj) {
|
||||
pe_err("vdev component object is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
des_chan = vdev->vdev_mlme.des_chan;
|
||||
des_chan->ch_ieee = chnlNumber;
|
||||
des_chan->ch_freq = wlan_reg_chan_to_freq(mac->pdev, chnlNumber);
|
||||
if (des_chan->ch_freq == 0) {
|
||||
pe_err("Invalid operating frequency: %d", des_chan->ch_freq);
|
||||
QDF_ASSERT(0);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
des_chan->ch_width = ch_width;
|
||||
if (cds_is_5_mhz_enabled())
|
||||
mlme_obj->mgmt.rate_info.quarter_rate = 1;
|
||||
else if (cds_is_10_mhz_enabled())
|
||||
mlme_obj->mgmt.rate_info.half_rate = 1;
|
||||
des_chan->ch_freq_seg1 = ch_center_freq_seg0;
|
||||
des_chan->ch_freq_seg2 = ch_center_freq_seg1;
|
||||
pe_debug("ch_freq_seg1: %d, ch_freq_seg2: %d",
|
||||
des_chan->ch_freq_seg1, des_chan->ch_freq_seg2);
|
||||
|
||||
status = lim_set_ch_phy_mode(vdev, pe_session->dot11mode);
|
||||
status = lim_pre_vdev_start(mac, mlme_obj, session);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
goto send_resp;
|
||||
|
||||
mlme_obj->mgmt.ap.cac_duration_ms = cac_duration_ms;
|
||||
mlme_obj->proto.generic.beacon_interval = 100;
|
||||
mlme_obj->proto.generic.dtim_period = 1;
|
||||
mlme_obj->mgmt.generic.maxregpower = maxTxPower;
|
||||
wlan_vdev_mlme_set_ssid(vdev, pe_session->ssId.ssId,
|
||||
pe_session->ssId.length);
|
||||
mlme_obj->mgmt.ap.hidden_ssid = pe_session->ssidHidden;
|
||||
if (pe_session->nss == 2) {
|
||||
mlme_obj->mgmt.chainmask_info.num_rx_chain = 2;
|
||||
mlme_obj->mgmt.chainmask_info.num_tx_chain = 2;
|
||||
} else {
|
||||
mlme_obj->mgmt.chainmask_info.num_rx_chain = 1;
|
||||
mlme_obj->mgmt.chainmask_info.num_tx_chain = 1;
|
||||
}
|
||||
|
||||
mlme_obj->proto.ht_info.allow_ht = pe_session->htCapability;
|
||||
mlme_obj->proto.vht_info.allow_vht = pe_session->vhtCapability;
|
||||
|
||||
pe_debug("dot11mode: %d, nss value: %d",
|
||||
pe_session->dot11mode, pe_session->nss);
|
||||
|
||||
pe_debug("ch width %d, ch id %d, maxTxPower %d",
|
||||
ch_width, chnlNumber, maxTxPower);
|
||||
|
||||
pe_session->ch_switch_in_progress = true;
|
||||
session->ch_switch_in_progress = true;
|
||||
|
||||
/* we need to defer the message until we
|
||||
* get the response back from WMA
|
||||
*/
|
||||
SET_LIM_PROCESS_DEFD_MESGS(mac, false);
|
||||
|
||||
status = wma_pre_chan_switch_setup(vdev_id);
|
||||
status = wma_pre_chan_switch_setup(session->vdev_id);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
pe_err("failed status = %d", status);
|
||||
goto send_resp;
|
||||
}
|
||||
status = vdev_mgr_start_send(mlme_obj,
|
||||
mlme_is_chan_switch_in_progress(vdev));
|
||||
mlme_is_chan_switch_in_progress(session->vdev));
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
pe_err("failed status = %d", status);
|
||||
goto send_resp;
|
||||
}
|
||||
wma_post_chan_switch_setup(vdev_id);
|
||||
wma_post_chan_switch_setup(session->vdev_id);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
send_resp:
|
||||
pe_err("switch channel rsp, status = 0x%x", status);
|
||||
rsp.status = status;
|
||||
rsp.vdev_id = vdev_id;
|
||||
rsp.vdev_id = session->vdev_id;
|
||||
|
||||
wma_handle_channel_switch_resp(wma, &rsp);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,16 +52,16 @@ QDF_STATUS lim_set_membership(struct mac_context *mac,
|
|||
QDF_STATUS lim_set_user_pos(struct mac_context *mac,
|
||||
tUpdateUserPos *pTempParam,
|
||||
struct pe_session *pe_session);
|
||||
|
||||
/**
|
||||
* lim_send_switch_chnl_params() - change channel
|
||||
* @mac: pointer to Global MAC structure
|
||||
* @session: pe session
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS lim_send_switch_chnl_params(struct mac_context *mac,
|
||||
uint8_t chnlNumber,
|
||||
uint8_t ch_center_freq_seg0,
|
||||
uint8_t ch_center_freq_seg1,
|
||||
enum phy_ch_width ch_width,
|
||||
int8_t maxTxPower,
|
||||
uint8_t peSessionId,
|
||||
uint8_t is_restart,
|
||||
uint32_t cac_duration_ms,
|
||||
uint32_t dfs_regdomain);
|
||||
struct pe_session *session);
|
||||
|
||||
/**
|
||||
* lim_send_edca_params() - Send edsa params to firmware
|
||||
|
|
|
|||
|
|
@ -728,14 +728,6 @@ void lim_tear_down_link_with_ap(struct mac_context *, uint8_t, tSirMacReasonCode
|
|||
/* / Function that defers the messages received */
|
||||
uint32_t lim_defer_msg(struct mac_context *, struct scheduler_msg *);
|
||||
|
||||
/* / Function that Switches the Channel and sets the CB Mode */
|
||||
void lim_set_channel(struct mac_context *mac, uint8_t channel,
|
||||
uint8_t ch_center_freq_seg0, uint8_t ch_center_freq_seg1,
|
||||
enum phy_ch_width ch_width, int8_t maxTxPower,
|
||||
uint8_t peSessionId, uint32_t cac_duration_ms,
|
||||
uint32_t dfs_regdomain);
|
||||
|
||||
|
||||
#ifdef ANI_SUPPORT_11H
|
||||
/* / Function that sends Measurement Report action frame */
|
||||
QDF_STATUS lim_send_meas_report_frame(struct mac_context *, tpSirMacMeasReqActionFrame,
|
||||
|
|
|
|||
|
|
@ -2261,6 +2261,10 @@ void lim_switch_primary_channel(struct mac_context *mac, uint8_t new_channel,
|
|||
|
||||
pe_session->curr_req_chan_freq = wlan_reg_chan_to_freq(mac->pdev,
|
||||
new_channel);
|
||||
pe_session->curr_op_freq = pe_session->curr_req_chan_freq;
|
||||
pe_session->ch_center_freq_seg0 = 0;
|
||||
pe_session->ch_center_freq_seg1 = 0;
|
||||
pe_session->ch_width = CH_WIDTH_20MHZ;
|
||||
pe_session->limRFBand = lim_get_rf_band(new_channel);
|
||||
|
||||
pe_session->channelChangeReasonCode = LIM_SWITCH_CHANNEL_OPERATION;
|
||||
|
|
@ -2268,9 +2272,7 @@ void lim_switch_primary_channel(struct mac_context *mac, uint8_t new_channel,
|
|||
mac->lim.gpchangeChannelCallback = lim_switch_channel_cback;
|
||||
mac->lim.gpchangeChannelData = NULL;
|
||||
|
||||
lim_send_switch_chnl_params(mac, new_channel, 0, 0, CH_WIDTH_20MHZ,
|
||||
pe_session->maxTxPower,
|
||||
pe_session->peSessionId, false, 0, 0);
|
||||
lim_send_switch_chnl_params(mac, pe_session);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2309,12 +2311,6 @@ void lim_switch_primary_secondary_channel(struct mac_context *mac,
|
|||
mac->lim.gpchangeChannelCallback = lim_switch_channel_cback;
|
||||
mac->lim.gpchangeChannelData = NULL;
|
||||
|
||||
lim_send_switch_chnl_params(mac, new_channel, ch_center_freq_seg0,
|
||||
ch_center_freq_seg1, ch_width,
|
||||
pe_session->maxTxPower,
|
||||
pe_session->peSessionId,
|
||||
false, 0, 0);
|
||||
|
||||
/* Store the new primary and secondary channel in session entries if different */
|
||||
if (wlan_reg_freq_to_chan(mac->pdev, pe_session->curr_op_freq) !=
|
||||
new_channel) {
|
||||
|
|
@ -2343,6 +2339,12 @@ void lim_switch_primary_secondary_channel(struct mac_context *mac,
|
|||
pe_session->htSupportedChannelWidthSet;
|
||||
}
|
||||
|
||||
pe_session->ch_center_freq_seg0 = ch_center_freq_seg0;
|
||||
pe_session->ch_center_freq_seg1 = ch_center_freq_seg1;
|
||||
pe_session->ch_width = ch_width;
|
||||
|
||||
lim_send_switch_chnl_params(mac, pe_session);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -3862,7 +3864,8 @@ static void lim_ht_switch_chnl_params(struct pe_session *pe_session)
|
|||
return;
|
||||
}
|
||||
|
||||
primary_channel = pe_session->gLimChannelSwitch.primaryChannel;
|
||||
primary_channel = wlan_reg_freq_to_chan(mac->pdev,
|
||||
pe_session->curr_op_freq);
|
||||
if (eHT_CHANNEL_WIDTH_40MHZ ==
|
||||
pe_session->htRecommendedTxWidthSet) {
|
||||
ch_width = CH_WIDTH_40MHZ;
|
||||
|
|
@ -3885,11 +3888,7 @@ static void lim_ht_switch_chnl_params(struct pe_session *pe_session)
|
|||
mac->lim.gpchangeChannelCallback = lim_ht_width_switch_cback;
|
||||
mac->lim.gpchangeChannelData = NULL;
|
||||
|
||||
lim_send_switch_chnl_params(mac, primary_channel,
|
||||
center_freq, 0, ch_width,
|
||||
pe_session->maxTxPower,
|
||||
pe_session->peSessionId,
|
||||
true, 0, 0);
|
||||
lim_send_switch_chnl_params(mac, pe_session);
|
||||
}
|
||||
|
||||
static void lim_ht_switch_chnl_req(struct pe_session *session)
|
||||
|
|
@ -7881,13 +7880,7 @@ QDF_STATUS lim_sta_mlme_vdev_restart_send(struct vdev_mlme_obj *vdev_mlme,
|
|||
lim_ht_switch_chnl_params(session);
|
||||
break;
|
||||
case LIM_SWITCH_CHANNEL_REASSOC:
|
||||
lim_set_channel(session->mac_ctx,
|
||||
session->limReassocChannelId,
|
||||
session->ch_center_freq_seg0,
|
||||
session->ch_center_freq_seg1,
|
||||
session->ch_width,
|
||||
session->maxTxPower,
|
||||
session->peSessionId, 0, 0);
|
||||
lim_send_switch_chnl_params(session->mac_ctx, session);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -8160,14 +8153,7 @@ QDF_STATUS lim_ap_mlme_vdev_restart_send(struct vdev_mlme_obj *vdev_mlme,
|
|||
lim_send_vdev_restart(session->mac_ctx, session,
|
||||
session->smeSessionId);
|
||||
else
|
||||
lim_set_channel(session->mac_ctx,
|
||||
wlan_reg_freq_to_chan(
|
||||
session->mac_ctx->pdev, session->curr_op_freq),
|
||||
session->ch_center_freq_seg0,
|
||||
session->ch_center_freq_seg1,
|
||||
session->ch_width, session->maxTxPower,
|
||||
session->peSessionId, session->cac_duration_ms,
|
||||
session->dfs_regdomain);
|
||||
lim_send_switch_chnl_params(session->mac_ctx, session);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -8207,16 +8193,7 @@ QDF_STATUS lim_mon_mlme_vdev_start_send(struct vdev_mlme_obj *vdev_mlme,
|
|||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
lim_set_channel(mac_ctx,
|
||||
wlan_reg_freq_to_chan(
|
||||
mac_ctx->pdev, session->curr_op_freq),
|
||||
session->ch_center_freq_seg0,
|
||||
session->ch_center_freq_seg1,
|
||||
session->ch_width,
|
||||
session->maxTxPower,
|
||||
session->peSessionId,
|
||||
session->cac_duration_ms,
|
||||
session->dfs_regdomain);
|
||||
lim_send_switch_chnl_params(mac_ctx, session);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -8518,3 +8495,61 @@ QDF_STATUS lim_set_ch_phy_mode(struct wlan_objmgr_vdev *vdev, uint8_t dot11mode)
|
|||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS lim_pre_vdev_start(struct mac_context *mac,
|
||||
struct vdev_mlme_obj *mlme_obj,
|
||||
struct pe_session *session)
|
||||
{
|
||||
struct wlan_channel *des_chan;
|
||||
|
||||
des_chan = mlme_obj->vdev->vdev_mlme.des_chan;
|
||||
des_chan->ch_freq = session->curr_op_freq;
|
||||
des_chan->ch_width = session->ch_width;
|
||||
des_chan->ch_freq_seg1 = session->ch_center_freq_seg0;
|
||||
des_chan->ch_freq_seg2 = session->ch_center_freq_seg1;
|
||||
des_chan->ch_ieee = wlan_reg_freq_to_chan(mac->pdev, des_chan->ch_freq);
|
||||
|
||||
pe_debug("ch_freq %d chan %d chan_width %d ch_freq_seg1: %d, ch_freq_seg2: %d",
|
||||
des_chan->ch_freq, des_chan->ch_ieee, des_chan->ch_width,
|
||||
des_chan->ch_freq_seg1, des_chan->ch_freq_seg2);
|
||||
|
||||
mlme_obj->mgmt.generic.maxregpower = session->maxTxPower;
|
||||
mlme_obj->proto.generic.beacon_interval =
|
||||
session->beaconParams.beaconInterval;
|
||||
if (mlme_obj->mgmt.generic.type == WLAN_VDEV_MLME_TYPE_AP) {
|
||||
mlme_obj->mgmt.ap.hidden_ssid = session->ssidHidden;
|
||||
mlme_obj->mgmt.ap.cac_duration_ms = session->cac_duration_ms;
|
||||
}
|
||||
mlme_obj->proto.generic.dtim_period = session->dtimPeriod;
|
||||
mlme_obj->proto.generic.slot_time = session->shortSlotTimeSupported;
|
||||
mlme_obj->mgmt.rate_info.bcn_tx_rate = session->beacon_tx_rate;
|
||||
|
||||
pe_debug("maxregpower %d cac_duration_ms %d beacon_interval %d hidden_ssid: %d dtimPeriod %d slot_time %d bcn tx rate %d",
|
||||
session->maxTxPower, session->cac_duration_ms,
|
||||
session->beaconParams.beaconInterval, session->ssidHidden,
|
||||
session->dtimPeriod, mlme_obj->proto.generic.slot_time,
|
||||
session->beacon_tx_rate);
|
||||
|
||||
mlme_obj->proto.ht_info.allow_ht = !!session->htCapability;
|
||||
mlme_obj->proto.vht_info.allow_vht = !!session->vhtCapability;
|
||||
|
||||
if (cds_is_5_mhz_enabled())
|
||||
mlme_obj->mgmt.rate_info.quarter_rate = 1;
|
||||
else if (cds_is_10_mhz_enabled())
|
||||
mlme_obj->mgmt.rate_info.half_rate = 1;
|
||||
|
||||
if (session->nss == 2) {
|
||||
mlme_obj->mgmt.chainmask_info.num_rx_chain = 2;
|
||||
mlme_obj->mgmt.chainmask_info.num_tx_chain = 2;
|
||||
} else {
|
||||
mlme_obj->mgmt.chainmask_info.num_rx_chain = 1;
|
||||
mlme_obj->mgmt.chainmask_info.num_tx_chain = 1;
|
||||
}
|
||||
pe_debug("dot11_mode:%d nss value:%d ht %d vht %d", session->dot11mode,
|
||||
session->nss, mlme_obj->proto.ht_info.allow_ht,
|
||||
mlme_obj->proto.vht_info.allow_vht);
|
||||
wlan_vdev_mlme_set_ssid(mlme_obj->vdev, session->ssId.ssId,
|
||||
session->ssId.length);
|
||||
|
||||
return lim_set_ch_phy_mode(mlme_obj->vdev, session->dot11mode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1800,6 +1800,19 @@ void lim_flush_bssid(struct mac_context *mac_ctx, uint8_t *bssid);
|
|||
*/
|
||||
bool lim_is_sha384_akm(enum ani_akm_type akm);
|
||||
|
||||
|
||||
/**
|
||||
* lim_pre_vdev_start() - set set vdev params from session
|
||||
* @mac: pointer to mac context
|
||||
* @mlme_obj: vdev mlme obj
|
||||
* @session: pointer to pe session
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS lim_pre_vdev_start(struct mac_context *mac,
|
||||
struct vdev_mlme_obj *mlme_obj,
|
||||
struct pe_session *session);
|
||||
|
||||
/**
|
||||
* lim_set_ch_phy_mode() - set channel phy mode
|
||||
* @vdev: pointer to vdev
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ static QDF_STATUS wma_start_ocb_vdev(struct ocb_config *config)
|
|||
dot11_mode = MLME_DOT11_MODE_11G;
|
||||
else
|
||||
dot11_mode = MLME_DOT11_MODE_11A;
|
||||
des_chan->ch_ieee =
|
||||
wlan_reg_freq_to_chan(wma->pdev, des_chan->ch_freq);
|
||||
|
||||
status = lim_set_ch_phy_mode(vdev, dot11_mode);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
|
|
|
|||
Loading…
Reference in a new issue