struct htc_config_pipe_msg *cp_msg;
int ret, time_left;
- skb = dev_alloc_skb(50 + sizeof(struct htc_frame_hdr));
+ skb = alloc_skb(50 + sizeof(struct htc_frame_hdr), GFP_ATOMIC);
if (!skb) {
dev_err(target->dev, "failed to allocate send buffer\n");
return -ENOMEM;
return 0;
err:
- dev_kfree_skb(skb);
+ kfree_skb(skb);
return -EINVAL;
}
struct htc_comp_msg *comp_msg;
int ret = 0, time_left;
- skb = dev_alloc_skb(50 + sizeof(struct htc_frame_hdr));
+ skb = alloc_skb(50 + sizeof(struct htc_frame_hdr), GFP_ATOMIC);
if (!skb) {
dev_err(target->dev, "failed to allocate send buffer\n");
return -ENOMEM;
return 0;
err:
- dev_kfree_skb(skb);
+ kfree_skb(skb);
return -EINVAL;
}
endpoint->dl_pipeid = service_to_dlpipe(service_connreq->service_id);
endpoint->ep_callbacks = service_connreq->ep_callbacks;
- skb = dev_alloc_skb(sizeof(struct htc_conn_svc_msg) +
- sizeof(struct htc_frame_hdr));
+ skb = alloc_skb(sizeof(struct htc_conn_svc_msg) +
+ sizeof(struct htc_frame_hdr), GFP_ATOMIC);
if (!skb) {
dev_err(target->dev, "Failed to allocate buf to send"
"service connect req\n");
*conn_rsp_epid = target->conn_rsp_epid;
return 0;
err:
- dev_kfree_skb(skb);
+ kfree_skb(skb);
return ret;
}
struct sk_buff *skb, bool txok)
{
struct htc_endpoint *endpoint;
- struct htc_frame_hdr *htc_hdr;
+ struct htc_frame_hdr *htc_hdr = NULL;
if (htc_handle->htc_flags & HTC_OP_CONFIG_PIPE_CREDITS) {
complete(&htc_handle->cmd_wait);
return;
ret:
/* HTC-generated packets are freed here. */
- dev_kfree_skb_any(skb);
+ if (htc_hdr && htc_hdr->endpoint_id != ENDPOINT0)
+ dev_kfree_skb_any(skb);
+ else
+ kfree_skb(skb);
}
/*
static void ath9k_wmi_ctrl_tx(void *priv, struct sk_buff *skb,
enum htc_endpoint_id epid, bool txok)
{
- dev_kfree_skb_any(skb);
+ kfree_skb(skb);
}
int ath9k_wmi_connect(struct htc_target *htc, struct wmi *wmi,
if (!wmi)
return -EINVAL;
- skb = dev_alloc_skb(headroom + cmd_len);
+ skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC);
if (!skb)
return -ENOMEM;
ath_print(common, ATH_DBG_WMI,
"WMI failure for: %s\n", wmi_cmd_to_name(cmd_id));
mutex_unlock(&wmi->op_mutex);
- dev_kfree_skb_any(skb);
+ kfree_skb(skb);
return ret;
}