mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Convert channel to chan freq for 6ghz support
Convert channel to chan freq for 6ghz support in wma structures. Change-Id: Ice52995968b06d974b115ec3eda6c7ab42657c73 CRs-Fixed: 2514449
This commit is contained in:
parent
d6ce848145
commit
9d1acaff4a
9 changed files with 39 additions and 36 deletions
|
|
@ -131,9 +131,11 @@ QDF_STATUS lim_send_switch_chnl_params(struct mac_context *mac,
|
|||
pChnlParams = qdf_mem_malloc(sizeof(tSwitchChannelParams));
|
||||
if (!pChnlParams)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
pChnlParams->channelNumber = chnlNumber;
|
||||
pChnlParams->ch_center_freq_seg0 = ch_center_freq_seg0;
|
||||
pChnlParams->ch_center_freq_seg1 = ch_center_freq_seg1;
|
||||
pChnlParams->ch_freq = wlan_reg_chan_to_freq(mac->pdev, chnlNumber);
|
||||
pChnlParams->ch_center_freq_seg0 =
|
||||
wlan_reg_chan_to_freq(mac->pdev, ch_center_freq_seg0);
|
||||
pChnlParams->ch_center_freq_seg1 =
|
||||
wlan_reg_chan_to_freq(mac->pdev, ch_center_freq_seg1);
|
||||
pChnlParams->ch_width = ch_width;
|
||||
qdf_mem_copy(pChnlParams->selfStaMacAddr, pe_session->self_mac_addr,
|
||||
sizeof(tSirMacAddr));
|
||||
|
|
@ -189,9 +191,9 @@ QDF_STATUS lim_send_switch_chnl_params(struct mac_context *mac,
|
|||
msgQ.reserved = 0;
|
||||
msgQ.bodyptr = pChnlParams;
|
||||
msgQ.bodyval = 0;
|
||||
pe_debug("Sending CH_SWITCH_REQ, ch_width %d, ch_num %d, maxTxPower %d",
|
||||
pe_debug("Sending CH_SWITCH_REQ, ch_width %d, ch_freq %d, maxTxPower %d",
|
||||
pChnlParams->ch_width,
|
||||
pChnlParams->channelNumber, pChnlParams->maxTxPower);
|
||||
pChnlParams->ch_freq, pChnlParams->maxTxPower);
|
||||
MTRACE(mac_trace_msg_tx(mac, peSessionId, msgQ.type));
|
||||
if (QDF_STATUS_SUCCESS != wma_post_ctrl_msg(mac, &msgQ)) {
|
||||
qdf_mem_free(pChnlParams);
|
||||
|
|
|
|||
|
|
@ -1944,12 +1944,12 @@ lim_send_sme_ap_channel_switch_resp(struct mac_context *mac,
|
|||
if (!pSmeSwithChnlParams)
|
||||
return;
|
||||
|
||||
|
||||
channelId = wlan_reg_freq_to_chan(mac->pdev, pe_session->curr_op_freq);
|
||||
pSmeSwithChnlParams->channelNumber = channelId;
|
||||
pSmeSwithChnlParams->ch_freq = pe_session->curr_op_freq;
|
||||
pSmeSwithChnlParams->status = rsp->status;
|
||||
ch_width = pSmeSwithChnlParams->ch_width;
|
||||
ch_center_freq_seg1 = pSmeSwithChnlParams->ch_center_freq_seg1;
|
||||
|
||||
ch_width = pe_session->ch_width;
|
||||
ch_center_freq_seg1 = pe_session->ch_center_freq_seg1;
|
||||
|
||||
/*
|
||||
* Pass the sme sessionID to SME instead
|
||||
|
|
|
|||
|
|
@ -9108,7 +9108,7 @@ static QDF_STATUS sme_process_channel_change_resp(struct mac_context *mac,
|
|||
if (msg_type == eWNI_SME_CHANNEL_CHANGE_RSP) {
|
||||
roam_info->channelChangeRespEvent->sessionId = SessionId;
|
||||
roam_info->channelChangeRespEvent->newChannelNumber =
|
||||
pChnlParams->channelNumber;
|
||||
wlan_reg_freq_to_chan(mac->pdev, pChnlParams->ch_freq);
|
||||
|
||||
if (pChnlParams->status == QDF_STATUS_SUCCESS) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
|
||||
|
|
@ -14240,7 +14240,7 @@ QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
|
|||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
fastreassoc->channel = channel;
|
||||
fastreassoc->ch_freq = wlan_reg_chan_to_freq(mac_ctx->pdev, channel);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
sme_warn("sme_get_beacon_frm failed");
|
||||
qdf_mem_free(fastreassoc->frame_buf);
|
||||
|
|
|
|||
|
|
@ -727,7 +727,7 @@ struct roam_synch_frame_ind {
|
|||
* @in_bmps: Whether bmps for this interface has been enabled
|
||||
* @vdev_set_key_wakelock: wakelock to protect vdev set key op with firmware
|
||||
* @vdev_set_key_runtime_wakelock: runtime pm wakelock for set key
|
||||
* @channel: channel
|
||||
* @ch_freq: channel frequency
|
||||
* @roam_offload_enabled: is roam offload enable/disable
|
||||
* @roam_scan_stats_req: cached roam scan stats request
|
||||
*
|
||||
|
|
@ -793,7 +793,7 @@ struct wma_txrx_node {
|
|||
struct roam_synch_frame_ind roam_synch_frame_ind;
|
||||
bool is_waiting_for_key;
|
||||
bool roam_offload_enabled;
|
||||
uint8_t channel;
|
||||
uint32_t ch_freq;
|
||||
struct sir_roam_scan_stats *roam_scan_stats_req;
|
||||
};
|
||||
|
||||
|
|
@ -842,13 +842,13 @@ struct wma_ini_config {
|
|||
};
|
||||
|
||||
/**
|
||||
* struct wmi_valid_channels - Channel details part of WMI_SCAN_CHAN_LIST_CMDID
|
||||
* struct wma_valid_channels - Channel details part of WMI_SCAN_CHAN_LIST_CMDID
|
||||
* @num_channels: Number of channels
|
||||
* @channel_list: Channel list
|
||||
* @ch_freq_list: Channel Frequency list
|
||||
*/
|
||||
struct wma_valid_channels {
|
||||
uint8_t num_channels;
|
||||
uint8_t channel_list[MAX_NUM_CHAN];
|
||||
uint32_t ch_freq_list[MAX_NUM_CHAN];
|
||||
};
|
||||
|
||||
#ifdef FEATURE_WLM_STATS
|
||||
|
|
@ -1556,7 +1556,7 @@ enum uapsd_up {
|
|||
* struct wma_roam_invoke_cmd - roam invoke command
|
||||
* @vdev_id: vdev id
|
||||
* @bssid: mac address
|
||||
* @channel: channel
|
||||
* @ch_freq: channel frequency
|
||||
* @frame_len: frame length, includs mac header, fixed params and ies
|
||||
* @frame_buf: buffer contaning probe response or beacon
|
||||
* @is_same_bssid: flag to indicate if roaming is requested for same bssid
|
||||
|
|
@ -1565,7 +1565,7 @@ enum uapsd_up {
|
|||
struct wma_roam_invoke_cmd {
|
||||
uint32_t vdev_id;
|
||||
uint8_t bssid[QDF_MAC_ADDR_SIZE];
|
||||
uint32_t channel;
|
||||
uint32_t ch_freq;
|
||||
uint32_t frame_len;
|
||||
uint8_t *frame_buf;
|
||||
uint8_t is_same_bssid;
|
||||
|
|
|
|||
|
|
@ -725,7 +725,7 @@ typedef struct {
|
|||
|
||||
/**
|
||||
* struct tSwitchChannelParams - switch channel request parameter
|
||||
* @channelNumber: channel number
|
||||
* @ch_freq: channel frequency ID
|
||||
* @localPowerConstraint: local power constraint
|
||||
* @secondaryChannelOffset: scondary channel offset
|
||||
* @peSessionId: PE session id
|
||||
|
|
@ -738,6 +738,8 @@ typedef struct {
|
|||
* @smpsMode: SMPS mode
|
||||
* @isDfsChannel: is DFS channel
|
||||
* @vhtCapable: VHT capable
|
||||
* @ch_center_freq_seg0: ch freq segment for primary channel(center frequency)
|
||||
* @ch_center_freq_seg1: ch freq segment for secondary channel(center frequency)
|
||||
* @dot11_mode: 802.11 mode
|
||||
* @cac_duration_ms: cac duration in milliseconds
|
||||
* @dfs_regdomain: dfs region
|
||||
|
|
@ -746,7 +748,7 @@ typedef struct {
|
|||
* @ssid: sap ssid
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t channelNumber;
|
||||
uint32_t ch_freq;
|
||||
uint8_t peSessionId;
|
||||
int8_t maxTxPower;
|
||||
tSirMacAddr selfStaMacAddr;
|
||||
|
|
@ -754,8 +756,8 @@ typedef struct {
|
|||
uint8_t isDfsChannel;
|
||||
uint8_t vhtCapable;
|
||||
enum phy_ch_width ch_width;
|
||||
uint8_t ch_center_freq_seg0;
|
||||
uint8_t ch_center_freq_seg1;
|
||||
uint32_t ch_center_freq_seg0;
|
||||
uint32_t ch_center_freq_seg1;
|
||||
uint8_t dot11_mode;
|
||||
|
||||
uint8_t restart_on_chan_switch;
|
||||
|
|
|
|||
|
|
@ -2746,7 +2746,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
|||
}
|
||||
}
|
||||
|
||||
if (wma_handle->interfaces[vdev_id].channel >= SIR_11A_CHANNEL_BEGIN)
|
||||
if (wlan_reg_is_5ghz_ch_freq(wma_handle->interfaces[vdev_id].ch_freq))
|
||||
is_5g = true;
|
||||
|
||||
mgmt_param.tx_frame = tx_frame;
|
||||
|
|
|
|||
|
|
@ -2815,8 +2815,8 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
|
|||
CFG_TGT_DEFAULT_GTX_BW_MASK;
|
||||
intr[vdev_id].mhz = des_chan->ch_freq;
|
||||
intr[vdev_id].chan_width = ch_width;
|
||||
intr[vdev_id].channel = wlan_reg_freq_to_chan(wma->pdev,
|
||||
req->op_chan_freq);
|
||||
intr[vdev_id].ch_freq = des_chan->ch_freq;
|
||||
|
||||
/* Set half or quarter rate flags */
|
||||
mlme_obj->mgmt.rate_info.half_rate = req->is_half_rate;
|
||||
mlme_obj->mgmt.rate_info.quarter_rate = req->is_quarter_rate;
|
||||
|
|
|
|||
|
|
@ -9203,7 +9203,8 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
|
|||
|
||||
for (i = 0; i < wma_handle->saved_chan.num_channels; i++) {
|
||||
msg->chan_weights.saved_chan_list[i] =
|
||||
wma_handle->saved_chan.channel_list[i];
|
||||
wlan_reg_freq_to_chan(wma_handle->pdev,
|
||||
wma_handle->saved_chan.ch_freq_list[i]);
|
||||
}
|
||||
|
||||
msg->chan_weights.saved_num_chan = wma_handle->saved_chan.num_channels;
|
||||
|
|
|
|||
|
|
@ -154,7 +154,8 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
|
|||
chan_p->cfreq2 = 0;
|
||||
channel = wlan_reg_freq_to_chan(wma_handle->pdev,
|
||||
chan_list->chanParam[i].freq);
|
||||
wma_handle->saved_chan.channel_list[i] = channel;
|
||||
wma_handle->saved_chan.ch_freq_list[i] =
|
||||
chan_list->chanParam[i].freq;
|
||||
|
||||
WMA_LOGD("chan[%d] = freq:%u DFS:%d tx power:%d",
|
||||
i, chan_p->mhz,
|
||||
|
|
@ -2159,7 +2160,7 @@ void wma_process_roam_invoke(WMA_HANDLE handle,
|
|||
roaminvoke->vdev_id);
|
||||
goto free_frame_buf;
|
||||
}
|
||||
ch_hz = (A_UINT32)cds_chan_to_freq(roaminvoke->channel);
|
||||
ch_hz = roaminvoke->ch_freq;
|
||||
wmi_unified_roam_invoke_cmd(wma_handle->wmi_handle,
|
||||
(struct wmi_roam_invoke_cmd *)roaminvoke,
|
||||
ch_hz);
|
||||
|
|
@ -3535,8 +3536,7 @@ void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
|
|||
|
||||
qdf_mem_zero(&req, sizeof(req));
|
||||
req.vdev_id = vdev_id;
|
||||
req.op_chan_freq = wlan_reg_chan_to_freq(wma->pdev,
|
||||
params->channelNumber);
|
||||
req.op_chan_freq = params->ch_freq;
|
||||
req.chan_width = params->ch_width;
|
||||
|
||||
if (params->ch_width == CH_WIDTH_10MHZ)
|
||||
|
|
@ -3545,10 +3545,8 @@ void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
|
|||
req.is_quarter_rate = 1;
|
||||
|
||||
req.vht_capable = params->vhtCapable;
|
||||
req.chan_freq_seg0 = wlan_reg_chan_to_freq(wma->pdev,
|
||||
params->ch_center_freq_seg0);
|
||||
req.chan_freq_seg1 = wlan_reg_chan_to_freq(wma->pdev,
|
||||
params->ch_center_freq_seg1);
|
||||
req.chan_freq_seg0 = params->ch_center_freq_seg0;
|
||||
req.chan_freq_seg1 = params->ch_center_freq_seg1;
|
||||
req.dot11_mode = params->dot11_mode;
|
||||
wma_update_vdev_he_capable(&req, params);
|
||||
|
||||
|
|
@ -3631,8 +3629,8 @@ void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
|
|||
|
||||
return;
|
||||
send_resp:
|
||||
WMA_LOGD("%s: channel %d ch_width %d txpower %d status %d", __func__,
|
||||
params->channelNumber, params->ch_width,
|
||||
WMA_LOGD("%s: ch_freq %d ch_width %d txpower %d status %d", __func__,
|
||||
params->ch_freq, params->ch_width,
|
||||
params->maxTxPower,
|
||||
status);
|
||||
WMA_LOGI("%s: wma switch channel rsp,, status = 0x%x",
|
||||
|
|
|
|||
Loading…
Reference in a new issue