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
This commit is contained in:
parent
5a7b60ad56
commit
d1e11d5f21
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user