net/offload: Remove useless token parameter

This parameter was removed from net_context already thus applying the
change also on net_offload API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2019-03-12 07:14:27 +01:00 committed by Kumar Gala
parent 730b5de6d9
commit a57e218965
5 changed files with 7 additions and 22 deletions

View file

@ -1661,7 +1661,6 @@ static int offload_sendto(struct net_pkt *pkt,
socklen_t addrlen,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data)
{
struct net_context *context = net_pkt_context(pkt);
@ -1685,7 +1684,7 @@ static int offload_sendto(struct net_pkt *pkt,
net_pkt_unref(pkt);
if (cb) {
cb(context, ret, token, user_data);
cb(context, ret, user_data);
}
return ret;
@ -1694,7 +1693,6 @@ static int offload_sendto(struct net_pkt *pkt,
static int offload_send(struct net_pkt *pkt,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data)
{
struct net_context *context = net_pkt_context(pkt);
@ -1716,7 +1714,7 @@ static int offload_send(struct net_pkt *pkt,
}
return offload_sendto(pkt, &context->remote, addrlen, cb,
timeout, token, user_data);
timeout, user_data);
}
static int offload_recv(struct net_context *context,

View file

@ -353,7 +353,7 @@ static void eswifi_off_send_work(struct k_work *work)
net_context_send_cb_t cb;
struct net_context *context;
struct eswifi_dev *eswifi;
void *user_data, *token;
void *user_data;
int err;
socket = CONTAINER_OF(work, struct eswifi_off_socket, connect_work);
@ -362,7 +362,6 @@ static void eswifi_off_send_work(struct k_work *work)
eswifi_lock(eswifi);
user_data = socket->user_data;
token = socket->tx_token;
cb = socket->send_cb;
context = socket->context;
@ -372,14 +371,13 @@ static void eswifi_off_send_work(struct k_work *work)
eswifi_unlock(eswifi);
if (cb) {
cb(context, err, token, user_data);
cb(context, err, user_data);
}
}
static int eswifi_off_send(struct net_pkt *pkt,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data)
{
struct eswifi_off_socket *socket = pkt->context->offload_context;
@ -402,7 +400,6 @@ static int eswifi_off_send(struct net_pkt *pkt,
socket->tx_pkt = pkt;
if (timeout == K_NO_WAIT) {
socket->tx_token = token;
socket->user_data = user_data;
socket->send_cb = cb;
@ -419,7 +416,7 @@ static int eswifi_off_send(struct net_pkt *pkt,
eswifi_unlock(eswifi);
if (cb) {
cb(socket->context, err, token, user_data);
cb(socket->context, err, user_data);
}
return err;
@ -430,7 +427,6 @@ static int eswifi_off_sendto(struct net_pkt *pkt,
socklen_t addrlen,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data)
{
/* TODO */

View file

@ -35,7 +35,6 @@ struct eswifi_off_socket {
net_context_connect_cb_t conn_cb;
net_context_send_cb_t send_cb;
void *user_data;
void *tx_token;
struct net_pkt *tx_pkt;
struct k_work connect_work;
struct k_work send_work;

View file

@ -449,7 +449,6 @@ static int winc1500_accept(struct net_context *context,
static int winc1500_send(struct net_pkt *pkt,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data)
{
struct net_context *context = pkt->context;
@ -493,7 +492,6 @@ static int winc1500_sendto(struct net_pkt *pkt,
socklen_t addrlen,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data)
{
struct net_context *context = pkt->context;

View file

@ -78,7 +78,6 @@ struct net_offload {
int (*send)(struct net_pkt *pkt,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data);
/**
@ -89,7 +88,6 @@ struct net_offload {
socklen_t addrlen,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data);
/**
@ -292,7 +290,6 @@ static inline int net_offload_accept(struct net_if *iface,
* @param cb Caller-supplied callback function.
* @param timeout Timeout for the connection. Possible values
* are K_FOREVER, K_NO_WAIT, >0.
* @param token Caller specified value that is passed as is to callback.
* @param user_data Caller-supplied user data.
*
* @return 0 if ok, < 0 if error
@ -301,14 +298,13 @@ static inline int net_offload_send(struct net_if *iface,
struct net_pkt *pkt,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data)
{
NET_ASSERT(iface);
NET_ASSERT(net_if_offload(iface));
NET_ASSERT(net_if_offload(iface)->send);
return net_if_offload(iface)->send(pkt, cb, timeout, token, user_data);
return net_if_offload(iface)->send(pkt, cb, timeout, user_data);
}
/**
@ -335,7 +331,6 @@ static inline int net_offload_send(struct net_if *iface,
* @param cb Caller-supplied callback function.
* @param timeout Timeout for the connection. Possible values
* are K_FOREVER, K_NO_WAIT, >0.
* @param token Caller specified value that is passed as is to callback.
* @param user_data Caller-supplied user data.
*
* @return 0 if ok, < 0 if error
@ -346,7 +341,6 @@ static inline int net_offload_sendto(struct net_if *iface,
socklen_t addrlen,
net_context_send_cb_t cb,
s32_t timeout,
void *token,
void *user_data)
{
NET_ASSERT(iface);
@ -354,7 +348,7 @@ static inline int net_offload_sendto(struct net_if *iface,
NET_ASSERT(net_if_offload(iface)->sendto);
return net_if_offload(iface)->sendto(pkt, dst_addr, addrlen, cb,
timeout, token, user_data);
timeout, user_data);
}
/**