mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
libcxgb,iw_cxgb4,cxgbit: add cxgb_mk_tid_release()
Add cxgb_mk_tid_release() to remove duplicate code to form CPL_TID_RELEASE hardware command. Signed-off-by: Varun Prakash <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
cc516700c7
commit
a1a234542b
3 changed files with 19 additions and 15 deletions
|
|
@ -961,21 +961,14 @@ int cxgbit_ofld_send(struct cxgbit_device *cdev, struct sk_buff *skb)
|
|||
|
||||
static void cxgbit_release_tid(struct cxgbit_device *cdev, u32 tid)
|
||||
{
|
||||
struct cpl_tid_release *req;
|
||||
unsigned int len = roundup(sizeof(*req), 16);
|
||||
u32 len = roundup(sizeof(struct cpl_tid_release), 16);
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = alloc_skb(len, GFP_ATOMIC);
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
req = (struct cpl_tid_release *)__skb_put(skb, len);
|
||||
memset(req, 0, len);
|
||||
|
||||
INIT_TP_WR(req, tid);
|
||||
OPCODE_TID(req) = cpu_to_be32(MK_OPCODE_TID(
|
||||
CPL_TID_RELEASE, tid));
|
||||
set_wr_txq(skb, CPL_PRIORITY_SETUP, 0);
|
||||
cxgb_mk_tid_release(skb, len, tid, 0);
|
||||
cxgbit_ofld_send(cdev, skb);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue