aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wcn36xx/smd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx/smd.c')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index de9eb2cfbf4b..366339421d4f 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -2041,13 +2041,20 @@ static void wcn36xx_smd_rsp_process(struct wcn36xx *wcn, void *buf, size_t len)
2041 case WCN36XX_HAL_DELETE_STA_CONTEXT_IND: 2041 case WCN36XX_HAL_DELETE_STA_CONTEXT_IND:
2042 mutex_lock(&wcn->hal_ind_mutex); 2042 mutex_lock(&wcn->hal_ind_mutex);
2043 msg_ind = kmalloc(sizeof(*msg_ind), GFP_KERNEL); 2043 msg_ind = kmalloc(sizeof(*msg_ind), GFP_KERNEL);
2044 msg_ind->msg_len = len; 2044 if (msg_ind) {
2045 msg_ind->msg = kmalloc(len, GFP_KERNEL); 2045 msg_ind->msg_len = len;
2046 memcpy(msg_ind->msg, buf, len); 2046 msg_ind->msg = kmalloc(len, GFP_KERNEL);
2047 list_add_tail(&msg_ind->list, &wcn->hal_ind_queue); 2047 memcpy(msg_ind->msg, buf, len);
2048 queue_work(wcn->hal_ind_wq, &wcn->hal_ind_work); 2048 list_add_tail(&msg_ind->list, &wcn->hal_ind_queue);
2049 wcn36xx_dbg(WCN36XX_DBG_HAL, "indication arrived\n"); 2049 queue_work(wcn->hal_ind_wq, &wcn->hal_ind_work);
2050 wcn36xx_dbg(WCN36XX_DBG_HAL, "indication arrived\n");
2051 }
2050 mutex_unlock(&wcn->hal_ind_mutex); 2052 mutex_unlock(&wcn->hal_ind_mutex);
2053 if (msg_ind)
2054 break;
2055 /* FIXME: Do something smarter then just printing an error. */
2056 wcn36xx_err("Run out of memory while handling SMD_EVENT (%d)\n",
2057 msg_header->msg_type);
2051 break; 2058 break;
2052 default: 2059 default:
2053 wcn36xx_err("SMD_EVENT (%d) not supported\n", 2060 wcn36xx_err("SMD_EVENT (%d) not supported\n",