From 78263aa46bc28671f62d58c55205166648e93518 Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Mon, 21 Dec 2015 14:03:15 +0530 Subject: [PATCH] usb: gadget: rndis: fix broken build for 4.4 Use rndis_params instead of configNr to align with changes from mainline commit 83210e59ee15 "usb: gadget: rndis: use rndis_params instead of configNr". Signed-off-by: Amit Pundir --- drivers/usb/gadget/function/f_rndis.c | 2 +- drivers/usb/gadget/function/rndis.c | 8 ++++---- drivers/usb/gadget/function/rndis.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c index 2bc1197074a8..3a28d8ac3b3d 100644 --- a/drivers/usb/gadget/function/f_rndis.c +++ b/drivers/usb/gadget/function/f_rndis.c @@ -819,7 +819,7 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) rndis_set_param_medium(rndis->params, RNDIS_MEDIUM_802_3, 0); rndis_set_host_mac(rndis->params, rndis->ethaddr); - rndis_set_max_pkt_xfer(rndis->config, rndis_ul_max_pkt_per_xfer); + rndis_set_max_pkt_xfer(rndis->params, rndis_ul_max_pkt_per_xfer); if (rndis->manufacturer && rndis->vendorID && rndis_set_param_vendor(rndis->params, rndis->vendorID, diff --git a/drivers/usb/gadget/function/rndis.c b/drivers/usb/gadget/function/rndis.c index 16ae1d28daf6..2ec7171b3f04 100644 --- a/drivers/usb/gadget/function/rndis.c +++ b/drivers/usb/gadget/function/rndis.c @@ -695,8 +695,8 @@ static int rndis_reset_response(struct rndis_params *params, u8 *xbuf; /* drain the response queue */ - while ((xbuf = rndis_get_next_response(configNr, &length))) - rndis_free_response(configNr, xbuf); + while ((xbuf = rndis_get_next_response(params, &length))) + rndis_free_response(params, xbuf); r = rndis_add_response(params, sizeof(rndis_reset_cmplt_type)); if (!r) @@ -1008,11 +1008,11 @@ int rndis_set_param_medium(struct rndis_params *params, u32 medium, u32 speed) } EXPORT_SYMBOL_GPL(rndis_set_param_medium); -void rndis_set_max_pkt_xfer(u8 configNr, u8 max_pkt_per_xfer) +void rndis_set_max_pkt_xfer(struct rndis_params *params, u8 max_pkt_per_xfer) { pr_debug("%s:\n", __func__); - rndis_per_dev_params[configNr].max_pkt_per_xfer = max_pkt_per_xfer; + params->max_pkt_per_xfer = max_pkt_per_xfer; } void rndis_add_hdr(struct sk_buff *skb) diff --git a/drivers/usb/gadget/function/rndis.h b/drivers/usb/gadget/function/rndis.h index 2b92b745d292..310cac3f088e 100644 --- a/drivers/usb/gadget/function/rndis.h +++ b/drivers/usb/gadget/function/rndis.h @@ -207,7 +207,7 @@ int rndis_set_param_vendor(struct rndis_params *params, u32 vendorID, const char *vendorDescr); int rndis_set_param_medium(struct rndis_params *params, u32 medium, u32 speed); -void rndis_set_max_pkt_xfer(u8 configNr, u8 max_pkt_per_xfer); +void rndis_set_max_pkt_xfer(struct rndis_params *params, u8 max_pkt_per_xfer); void rndis_add_hdr(struct sk_buff *skb); int rndis_rm_hdr(struct gether *port, struct sk_buff *skb, struct sk_buff_head *list); -- 2.34.1