qcacld-3.0: Remove hdd variable isVHT80Allowed

There are generic functions available in CDS to compute
channel width. Therefore remove the legacy variable
isVHT80Allowed from HDD. Also remove function
hdd_checkandupdate_phymode since the function is not
doing check on bandwidth.

Change-Id: Id2a33cc81cdea328a9d704858c6197d4be56b3d0
CRs-Fixed: 1054540
This commit is contained in:
Amar Singhal 2016-08-15 15:01:45 -07:00 • committed by Prakash Dhavali
commit 4f22ccd4dc
4 changed files with 2 additions and 106 deletions

View file

@ -1408,8 +1408,6 @@ struct hdd_context_s {
int cur_tx_level;
uint64_t prev_tx;
#endif
/* VHT80 allowed */
bool isVHT80Allowed;
struct completion ready_to_suspend;
/* defining the solution type */

View file

@ -7500,26 +7500,8 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
sme_update_config(pHddCtx->hHal, &sme_config);
if (!pHddCtx->config->sap_force_11n_for_11ac) {
if (pConfig->ch_width_orig == NL80211_CHAN_WIDTH_80P80) {
if (pHddCtx->isVHT80Allowed == false)
pConfig->ch_width_orig = CH_WIDTH_40MHZ;
else
pConfig->ch_width_orig = CH_WIDTH_80P80MHZ;
} else if (pConfig->ch_width_orig == NL80211_CHAN_WIDTH_160) {
if (pHddCtx->isVHT80Allowed == false)
pConfig->ch_width_orig = CH_WIDTH_40MHZ;
else
pConfig->ch_width_orig = CH_WIDTH_160MHZ;
} else if (pConfig->ch_width_orig == NL80211_CHAN_WIDTH_80) {
if (pHddCtx->isVHT80Allowed == false)
pConfig->ch_width_orig = CH_WIDTH_40MHZ;
else
pConfig->ch_width_orig = CH_WIDTH_80MHZ;
} else if (pConfig->ch_width_orig == NL80211_CHAN_WIDTH_40) {
pConfig->ch_width_orig = CH_WIDTH_40MHZ;
} else {
pConfig->ch_width_orig = CH_WIDTH_20MHZ;
}
pConfig->ch_width_orig =
hdd_map_nl_chan_width(pConfig->ch_width_orig);
} else {
if (pConfig->ch_width_orig >= NL80211_CHAN_WIDTH_40)
pConfig->ch_width_orig = CH_WIDTH_40MHZ;

View file

@ -591,77 +591,6 @@ int wlan_hdd_validate_context(hdd_context_t *hdd_ctx)
return 0;
}
void hdd_checkandupdate_phymode(hdd_context_t *hdd_ctx)
{
hdd_adapter_t *adapter = NULL;
hdd_station_ctx_t *pHddStaCtx = NULL;
eCsrPhyMode phyMode;
struct hdd_config *cfg_param = NULL;
if (NULL == hdd_ctx) {
hdd_alert("HDD Context is null !!");
return;
}
adapter = hdd_get_adapter(hdd_ctx, QDF_STA_MODE);
if (NULL == adapter) {
hdd_alert("adapter is null !!");
return;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
cfg_param = hdd_ctx->config;
if (NULL == cfg_param) {
hdd_alert("cfg_params not available !!");
return;
}
phyMode = sme_get_phy_mode(WLAN_HDD_GET_HAL_CTX(adapter));
if (!hdd_ctx->isVHT80Allowed) {
if ((eCSR_DOT11_MODE_AUTO == phyMode) ||
(eCSR_DOT11_MODE_11ac == phyMode) ||
(eCSR_DOT11_MODE_11ac_ONLY == phyMode)) {
hdd_notice("Setting phymode to 11n!!");
sme_set_phy_mode(WLAN_HDD_GET_HAL_CTX(adapter),
eCSR_DOT11_MODE_11n);
}
} else {
/*
* New country Supports 11ac as well resetting value back from
* .ini
*/
sme_set_phy_mode(WLAN_HDD_GET_HAL_CTX(adapter),
hdd_cfg_xlate_to_csr_phy_mode(cfg_param->
dot11Mode));
return;
}
if ((eConnectionState_Associated == pHddStaCtx->conn_info.connState) &&
((eCSR_CFG_DOT11_MODE_11AC_ONLY == pHddStaCtx->conn_info.dot11Mode)
|| (eCSR_CFG_DOT11_MODE_11AC ==
pHddStaCtx->conn_info.dot11Mode))) {
QDF_STATUS qdf_status;
/* need to issue a disconnect to CSR. */
INIT_COMPLETION(adapter->disconnect_comp_var);
qdf_status = sme_roam_disconnect(WLAN_HDD_GET_HAL_CTX(adapter),
adapter->sessionId,
eCSR_DISCONNECT_REASON_UNSPECIFIED);
if (QDF_STATUS_SUCCESS == qdf_status) {
unsigned long rc;
rc = wait_for_completion_timeout(
&adapter->disconnect_comp_var,
msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
if (!rc)
hdd_err("failure waiting for disconnect_comp_var");
}
}
}
/**
* hdd_set_ibss_power_save_params() - update IBSS Power Save params to WMA.
* @hdd_adapter_t Hdd adapter.

View file

@ -384,7 +384,6 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
uint8_t band_capability;
band_capability = hdd_ctx->config->nBandCapability;
hdd_ctx->isVHT80Allowed = 0;
for (band_num = 0; band_num < NUM_NL80211_BANDS; band_num++) {
@ -422,14 +421,8 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
wiphy_chan->flags |=
IEEE80211_CHAN_PASSIVE_SCAN;
cds_chan->state = CHANNEL_STATE_DFS;
if ((wiphy_chan->flags &
IEEE80211_CHAN_NO_80MHZ) == 0)
hdd_ctx->isVHT80Allowed = 1;
} else {
cds_chan->state = CHANNEL_STATE_ENABLE;
if ((wiphy_chan->flags &
IEEE80211_CHAN_NO_80MHZ) == 0)
hdd_ctx->isVHT80Allowed = 1;
}
cds_chan->pwr_limit = wiphy_chan->max_power;
cds_chan->flags = wiphy_chan->flags;
@ -625,7 +618,6 @@ void hdd_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
bool vht80_allowed;
bool reset = false;
enum dfs_region dfs_reg;
@ -698,13 +690,8 @@ void hdd_reg_notifier(struct wiphy *wiphy,
hdd_update_regulatory_info(hdd_ctx);
vht80_allowed = hdd_ctx->isVHT80Allowed;
hdd_process_regulatory_data(hdd_ctx, wiphy, reset);
if (hdd_ctx->isVHT80Allowed != vht80_allowed)
hdd_checkandupdate_phymode(hdd_ctx);
if (NL80211_REGDOM_SET_BY_DRIVER == request->initiator)
complete(&hdd_ctx->reg_init);