History log of /linux-master/drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h
Revision Date Author Comments
# a6a188e4 27-Apr-2018 YueHaibing <yuehaibing@huawei.com>

libcxgb,cxgb4: use __skb_put_zero to simplfy code

use helper __skb_put_zero to replace the pattern of __skb_put() && memset()

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 4df864c1 16-Jun-2017 Johannes Berg <johannes.berg@intel.com>

networking: make skb_put & friends return void pointers

It seems like a historic accident that these return unsigned char *,
and in many places that means casts are required, more often than not.

Make these functions (skb_put, __skb_put and pskb_put) return void *
and remove all the casts across the tree, adding a (u8 *) cast only
where the unsigned char pointer was used directly, all done with the
following spatch:

@@
expression SKB, LEN;
typedef u8;
identifier fn = { skb_put, __skb_put };
@@
- *(fn(SKB, LEN))
+ *(u8 *)fn(SKB, LEN)

@@
expression E, SKB, LEN;
identifier fn = { skb_put, __skb_put };
type T;
@@
- E = ((T *)(fn(SKB, LEN)))
+ E = fn(SKB, LEN)

which actually doesn't cover pskb_put since there are only three
users overall.

A handful of stragglers were converted manually, notably a macro in
drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
instances in net/bluetooth/hci_sock.c. In the former file, I also
had to fix one whitespace problem spatch introduced.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 6e3b6fc2 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb,iw_cxgb4,cxgbit: add cxgb_mk_rx_data_ack()

Add cxgb_mk_rx_data_ack() to remove duplicate
code to form CPL_RX_DATA_ACK hardware command.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 052f4731 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb,iw_cxgb4,cxgbit: add cxgb_mk_abort_rpl()

Add cxgb_mk_abort_rpl() to remove duplicate
code to form CPL_ABORT_RPL hardware command.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# a7e1a97f 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb,iw_cxgb4,cxgbit: add cxgb_mk_abort_req()

Add cxgb_mk_abort_req() to remove duplicate code
to form CPL_ABORT_REQ hardware command.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 29fb6f42 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb, iw_cxgb4, cxgbit: add cxgb_mk_close_con_req()

Add cxgb_mk_close_con_req() to remove duplicate
code to form CPL_CLOSE_CON_REQ hardware command.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# a1a23454 13-Sep-2016 Varun Prakash <varun@chelsio.com>

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 <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# cc516700 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb,iw_cxgb4,cxgbit: add cxgb_compute_wscale()

Add cxgb_compute_wscale() in libcxgb_cm.h to remove
it's duplicate definitions from cxgb4/cm.c and
cxgbit/cxgbit_cm.c.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 44c6d069 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb,iw_cxgb4,cxgbit: add cxgb_best_mtu()

Add cxgb_best_mtu() in libcxgb_cm.h to remove
it's duplicate definitions from cxgb4/cm.c and
cxgbit/cxgbit_cm.c

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# b65eef0a 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb,iw_cxgb4,cxgbit: add cxgb_is_neg_adv()

Add cxgb_is_neg_adv() in libcxgb_cm.h to remove
it's duplicate definitions from cxgb4/cm.c and
cxgbit/cxgbit_cm.c.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 95554761 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb,iw_cxgb4,cxgbit: add cxgb_find_route6()

Add cxgb_find_route6() in libcxgb_cm.c to remove
it's duplicate definitions from cxgb4/cm.c and
cxgbit/cxgbit_cm.c.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 804c2f3e 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb,iw_cxgb4,cxgbit: add cxgb_find_route()

Add cxgb_find_route() in libcxgb_cm.c to remove
it's duplicate definitions from cxgb4/cm.c and
cxgbit/cxgbit_cm.c.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 85e42b04 13-Sep-2016 Varun Prakash <varun@chelsio.com>

libcxgb,iw_cxgb4,cxgbit: add cxgb_get_4tuple()

Add cxgb_get_4tuple() in libcxgb_cm.c to remove
it's duplicate definitions from cxgb4/cm.c and
cxgbit/cxgbit_cm.c.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>