mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: Replace channel ID with channel frequency
Replace channel ID(channelId) with channel frequency( chan_freq) in struct bss_description. Add code for chan_freq's value population in the same struct wherever channelId's value population occures. Remove a few camel cases detected by checkpatch. Change-Id: I84d193b67f642df310997865ec6e1b62e3518f98 CRs-Fixed: 2488826
This commit is contained in:
parent
b0778b31a3
commit
91a2c1bd5c
7 changed files with 39 additions and 7 deletions
|
|
@ -1226,6 +1226,8 @@ hdd_send_new_ap_channel_info(struct net_device *dev,
|
|||
{
|
||||
union iwreq_data wrqu;
|
||||
struct bss_description *descriptor = roam_info->bss_desc;
|
||||
mac_handle_t mac_hdl;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
|
||||
if (!descriptor) {
|
||||
hdd_err("bss descriptor is null");
|
||||
|
|
@ -1235,10 +1237,20 @@ hdd_send_new_ap_channel_info(struct net_device *dev,
|
|||
* Send the Channel event, the supplicant needs this to generate
|
||||
* the Adjacent AP report.
|
||||
*/
|
||||
hdd_debug("Sending up an SIOCGIWFREQ, channelId: %d",
|
||||
descriptor->channelId);
|
||||
hdd_debug("Sending up an SIOCGIWFREQ, channel freq: %d",
|
||||
descriptor->chan_freq);
|
||||
memset(&wrqu, '\0', sizeof(wrqu));
|
||||
wrqu.freq.m = descriptor->channelId;
|
||||
mac_hdl = hdd_adapter_get_mac_handle(adapter);
|
||||
if (!mac_hdl) {
|
||||
hdd_err("MAC handle invalid, falling back!");
|
||||
return;
|
||||
}
|
||||
pdev = MAC_CONTEXT(mac_hdl)->pdev;
|
||||
if (!pdev) {
|
||||
hdd_err("pdev invalid in MAC context, falling back!");
|
||||
return;
|
||||
}
|
||||
wrqu.freq.m = wlan_reg_freq_to_chan(pdev, descriptor->chan_freq);
|
||||
wrqu.freq.e = 0;
|
||||
wrqu.freq.i = 0;
|
||||
wireless_send_event(adapter->dev, SIOCGIWFREQ, &wrqu, NULL);
|
||||
|
|
|
|||
|
|
@ -660,6 +660,7 @@ struct bss_description {
|
|||
int8_t sinr;
|
||||
/* channelId what peer sent in beacon/probersp. */
|
||||
uint8_t channelId;
|
||||
uint32_t chan_freq;
|
||||
/* channelId on which we are parked at. */
|
||||
/* used only in scan case. */
|
||||
uint8_t channelIdSelf;
|
||||
|
|
|
|||
|
|
@ -2170,8 +2170,15 @@ lim_roam_fill_bss_descr(struct mac_context *mac,
|
|||
bss_desc_ptr->scansystimensec = qdf_get_monotonic_boottime_ns();
|
||||
if (parsed_frm_ptr->dsParamsPresent) {
|
||||
bss_desc_ptr->channelId = parsed_frm_ptr->channelNumber;
|
||||
bss_desc_ptr->chan_freq =
|
||||
wlan_reg_chan_to_freq(mac->pdev,
|
||||
parsed_frm_ptr->channelNumber);
|
||||
} else if (parsed_frm_ptr->HTInfo.present) {
|
||||
bss_desc_ptr->channelId = parsed_frm_ptr->HTInfo.primaryChannel;
|
||||
bss_desc_ptr->chan_freq =
|
||||
wlan_reg_chan_to_freq(mac->pdev,
|
||||
parsed_frm_ptr->HTInfo.
|
||||
primaryChannel);
|
||||
} else {
|
||||
/*
|
||||
* If DS Params or HTIE is not present in the probe resp or
|
||||
|
|
@ -2179,6 +2186,7 @@ lim_roam_fill_bss_descr(struct mac_context *mac,
|
|||
* to fill the channel in the BSS descriptor.*/
|
||||
bss_desc_ptr->channelId =
|
||||
cds_freq_to_chan(roam_synch_ind_ptr->chan_freq);
|
||||
bss_desc_ptr->chan_freq = roam_synch_ind_ptr->chan_freq;
|
||||
}
|
||||
bss_desc_ptr->channelIdSelf = bss_desc_ptr->channelId;
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ lim_collect_bss_description(struct mac_context *mac,
|
|||
uint8_t *pBody;
|
||||
uint32_t ieLen = 0;
|
||||
tpSirMacMgmtHdr pHdr;
|
||||
uint8_t channelNum;
|
||||
uint8_t channel_num;
|
||||
uint8_t rxChannel;
|
||||
uint8_t rfBand = 0;
|
||||
|
||||
|
|
@ -132,15 +132,16 @@ lim_collect_bss_description(struct mac_context *mac,
|
|||
* This fix will work for 5Ghz 11n devices, but for 11a devices, we have to rely on RXP routing flag to get the correct channel.
|
||||
* So The problem of incorrect channel reporting in 5Ghz will still remain for 11a devices.
|
||||
*/
|
||||
pBssDescr->channelId = lim_get_channel_from_beacon(mac, pBPR);
|
||||
channel_num = lim_get_channel_from_beacon(mac, pBPR);
|
||||
pBssDescr->channelId = channel_num;
|
||||
pBssDescr->chan_freq = wlan_reg_chan_to_freq(mac->pdev, channel_num);
|
||||
|
||||
pBssDescr->channelIdSelf = pBssDescr->channelId;
|
||||
pBssDescr->rx_channel = rxChannel;
|
||||
|
||||
/* set the network type in bss description */
|
||||
channelNum = pBssDescr->channelId;
|
||||
pBssDescr->nwType =
|
||||
lim_get_nw_type(mac, channelNum, SIR_MAC_MGMT_FRAME, pBPR);
|
||||
lim_get_nw_type(mac, channel_num, SIR_MAC_MGMT_FRAME, pBPR);
|
||||
|
||||
/* Copy RSSI & SINR from BD */
|
||||
pBssDescr->rssi = (int8_t) WMA_GET_RX_RSSI_NORMALIZED(pRxPacketInfo);
|
||||
|
|
|
|||
|
|
@ -549,6 +549,10 @@ void lim_send_sme_start_bss_rsp(struct mac_context *mac,
|
|||
|
||||
pSirSmeRsp->bssDescription.channelId =
|
||||
pe_session->currentOperChannel;
|
||||
pSirSmeRsp->bssDescription.chan_freq =
|
||||
wlan_reg_chan_to_freq(mac->pdev,
|
||||
pe_session->
|
||||
currentOperChannel);
|
||||
|
||||
if (!LIM_IS_NDI_ROLE(pe_session)) {
|
||||
curLen = pe_session->schBeaconOffsetBegin - ieOffset;
|
||||
|
|
|
|||
|
|
@ -11579,6 +11579,7 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
|
|||
session->pConnectBssDesc->channelId =
|
||||
wlan_reg_freq_to_chan(mac_ctx->pdev,
|
||||
pSwitchChnInd->freq);
|
||||
session->pConnectBssDesc->chan_freq = pSwitchChnInd->freq;
|
||||
|
||||
ie_len = csr_get_ielen_from_bss_description(
|
||||
session->pConnectBssDesc);
|
||||
|
|
|
|||
|
|
@ -1784,6 +1784,8 @@ QDF_STATUS csr_scan_create_entry_in_scan_cache(struct mac_context *mac,
|
|||
qdf_mem_copy(pNewBssDescriptor->bssId, bssid.bytes,
|
||||
sizeof(tSirMacAddr));
|
||||
pNewBssDescriptor->channelId = channel;
|
||||
pNewBssDescriptor->chan_freq = wlan_reg_chan_to_freq(mac->pdev,
|
||||
channel);
|
||||
if (!csr_scan_append_bss_description(mac, pNewBssDescriptor)) {
|
||||
sme_err("csr_scan_append_bss_description failed");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
|
|
@ -2640,6 +2642,9 @@ static QDF_STATUS csr_fill_bss_from_scan_entry(struct mac_context *mac_ctx,
|
|||
/* channelId what peer sent in beacon/probersp. */
|
||||
bss_desc->channelId =
|
||||
scan_entry->channel.chan_idx;
|
||||
bss_desc->chan_freq =
|
||||
wlan_reg_chan_to_freq(mac_ctx->pdev,
|
||||
scan_entry->channel.chan_idx);
|
||||
/* channelId on which we are parked at. */
|
||||
/* used only in scan case. */
|
||||
bss_desc->channelIdSelf =
|
||||
|
|
|
|||
Loading…
Reference in a new issue