summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wcn36xx
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2020-09-10 16:06:31 +0100
committerKalle Valo <kvalo@codeaurora.org>2020-09-21 16:17:14 +0300
commitd1e11d5f21675077b10c4205d93b59f67e2f0269 (patch)
treef9d8c960cdc9c2fff70559722f13cc3bfb66cf57 /drivers/net/wireless/ath/wcn36xx
parent5a7b60ad56d7824ee4aeb78e94de4f4eefdc602f (diff)
wcn36xx: Remove dead code in wcn36xx_smd_config_bss()
wcn36xx_smd_config_bss_v0() and wcn36xx_smd_config_bss_v1() have been designed to operate in standalone fashion. As a result we can drop the dead code now present in wcn36xx_smd_config_bss() and happily remove one kzalloc from the BSS config path as we do so. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200910150631.2178970-8-bryan.odonoghue@linaro.org
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 5ae6a2ccfebc..05e5e079dab3 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1697,42 +1697,15 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, const u8 *bssid,
bool update)
{
- struct wcn36xx_hal_config_bss_req_msg *msg;
- struct wcn36xx_hal_config_bss_params *bss;
- struct wcn36xx_hal_config_sta_params *sta_params;
int ret;
mutex_lock(&wcn->hal_mutex);
- msg = kzalloc(sizeof(*msg), GFP_KERNEL);
- if (!msg) {
- ret = -ENOMEM;
- goto out;
- }
- INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
-
- bss = &msg->bss_params;
- sta_params = &bss->sta;
-
- wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
- wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
-
- wcn36xx_dbg(WCN36XX_DBG_HAL,
- "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
- bss->bssid, bss->self_mac_addr, bss->bss_type,
- bss->oper_mode, bss->nw_type);
- wcn36xx_dbg(WCN36XX_DBG_HAL,
- "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
- sta_params->bssid, sta_params->action,
- sta_params->sta_index, sta_params->bssid_index,
- sta_params->aid, sta_params->type,
- sta_params->mac);
-
- if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) {
+ if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24))
ret = wcn36xx_smd_config_bss_v1(wcn, vif, sta, bssid, update);
- } else {
+ else
ret = wcn36xx_smd_config_bss_v0(wcn, vif, sta, bssid, update);
- }
+
if (ret) {
wcn36xx_err("Sending hal_config_bss failed\n");
goto out;
@@ -1742,12 +1715,10 @@ int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif,
sta,
wcn->hal_buf,
wcn->hal_rsp_len);
- if (ret) {
+ if (ret)
wcn36xx_err("hal_config_bss response failed err=%d\n", ret);
- goto out;
- }
+
out:
- kfree(msg);
mutex_unlock(&wcn->hal_mutex);
return ret;
}