aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/wmi.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2013-10-28 02:18:14 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2013-10-30 05:52:02 -0400
commite204548101732849dadd8d9f229cd1c83ae9236a (patch)
tree886c60e7f781b13174911ce770840aeebc6bc1ef /drivers/net/wireless/ath/ath10k/wmi.c
parent5fb5e41f424ad970f3bda645b8234dc71fcc8e59 (diff)
ath10k: plug memory leak on beacon tx
If beacon tx command failed the wmi command buffer was not freed. This led to OOM in the long run. This became aparent when stress testing multi-BSSID. Reported-By: Tomasz Skapski <tomasz.skapski@tieto.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/wmi.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 8db9db2db946..f79f17ce5dc6 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -3092,6 +3092,7 @@ int ath10k_wmi_beacon_send_nowait(struct ath10k *ar,
3092{ 3092{
3093 struct wmi_bcn_tx_cmd *cmd; 3093 struct wmi_bcn_tx_cmd *cmd;
3094 struct sk_buff *skb; 3094 struct sk_buff *skb;
3095 int ret;
3095 3096
3096 skb = ath10k_wmi_alloc_skb(sizeof(*cmd) + arg->bcn_len); 3097 skb = ath10k_wmi_alloc_skb(sizeof(*cmd) + arg->bcn_len);
3097 if (!skb) 3098 if (!skb)
@@ -3104,7 +3105,11 @@ int ath10k_wmi_beacon_send_nowait(struct ath10k *ar,
3104 cmd->hdr.bcn_len = __cpu_to_le32(arg->bcn_len); 3105 cmd->hdr.bcn_len = __cpu_to_le32(arg->bcn_len);
3105 memcpy(cmd->bcn, arg->bcn, arg->bcn_len); 3106 memcpy(cmd->bcn, arg->bcn, arg->bcn_len);
3106 3107
3107 return ath10k_wmi_cmd_send_nowait(ar, skb, ar->wmi.cmd->bcn_tx_cmdid); 3108 ret = ath10k_wmi_cmd_send_nowait(ar, skb, ar->wmi.cmd->bcn_tx_cmdid);
3109 if (ret)
3110 dev_kfree_skb(skb);
3111
3112 return ret;
3108} 3113}
3109 3114
3110static void ath10k_wmi_pdev_set_wmm_param(struct wmi_wmm_params *params, 3115static void ath10k_wmi_pdev_set_wmm_param(struct wmi_wmm_params *params,