Commit c67d41ba authored by Arend van Spriel's avatar Arend van Spriel Committed by Kalle Valo

brcmfmac: change prototype for brcmf_fws_hdrpull()

Instead of passing ifidx and drvr just pass struct brcmf_if pointer
which holds both parameters.
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 03cca20a
...@@ -312,8 +312,7 @@ brcmf_proto_bcdc_hdrpull(struct brcmf_pub *drvr, bool do_fws, ...@@ -312,8 +312,7 @@ brcmf_proto_bcdc_hdrpull(struct brcmf_pub *drvr, bool do_fws,
skb_pull(pktbuf, BCDC_HEADER_LEN); skb_pull(pktbuf, BCDC_HEADER_LEN);
if (do_fws) if (do_fws)
brcmf_fws_hdrpull(drvr, tmp_if->ifidx, h->data_offset << 2, brcmf_fws_hdrpull(tmp_if, h->data_offset << 2, pktbuf);
pktbuf);
else else
skb_pull(pktbuf, h->data_offset << 2); skb_pull(pktbuf, h->data_offset << 2);
......
...@@ -1616,11 +1616,10 @@ static int brcmf_fws_notify_bcmc_credit_support(struct brcmf_if *ifp, ...@@ -1616,11 +1616,10 @@ static int brcmf_fws_notify_bcmc_credit_support(struct brcmf_if *ifp,
return 0; return 0;
} }
int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len, void brcmf_fws_hdrpull(struct brcmf_if *ifp, s16 siglen, struct sk_buff *skb)
struct sk_buff *skb)
{ {
struct brcmf_skb_reorder_data *rd; struct brcmf_skb_reorder_data *rd;
struct brcmf_fws_info *fws = drvr->fws; struct brcmf_fws_info *fws = ifp->drvr->fws;
u8 *signal_data; u8 *signal_data;
s16 data_len; s16 data_len;
u8 type; u8 type;
...@@ -1630,20 +1629,20 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len, ...@@ -1630,20 +1629,20 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len,
s32 err; s32 err;
brcmf_dbg(HDRS, "enter: ifidx %d, skblen %u, sig %d\n", brcmf_dbg(HDRS, "enter: ifidx %d, skblen %u, sig %d\n",
ifidx, skb->len, signal_len); ifp->ifidx, skb->len, siglen);
WARN_ON(signal_len > skb->len); WARN_ON(siglen > skb->len);
if (!signal_len) if (!siglen)
return 0; return;
/* if flow control disabled, skip to packet data and leave */ /* if flow control disabled, skip to packet data and leave */
if ((!fws) || (!fws->fw_signals)) { if ((!fws) || (!fws->fw_signals)) {
skb_pull(skb, signal_len); skb_pull(skb, siglen);
return 0; return;
} }
fws->stats.header_pulls++; fws->stats.header_pulls++;
data_len = signal_len; data_len = siglen;
signal_data = skb->data; signal_data = skb->data;
status = BRCMF_FWS_RET_OK_NOSCHEDULE; status = BRCMF_FWS_RET_OK_NOSCHEDULE;
...@@ -1731,14 +1730,12 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len, ...@@ -1731,14 +1730,12 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len,
/* signalling processing result does /* signalling processing result does
* not affect the actual ethernet packet. * not affect the actual ethernet packet.
*/ */
skb_pull(skb, signal_len); skb_pull(skb, siglen);
/* this may be a signal-only packet /* this may be a signal-only packet
*/ */
if (skb->len == 0) if (skb->len == 0)
fws->stats.header_only_pkt++; fws->stats.header_only_pkt++;
return 0;
} }
static u8 brcmf_fws_precommit_skb(struct brcmf_fws_info *fws, int fifo, static u8 brcmf_fws_precommit_skb(struct brcmf_fws_info *fws, int fifo,
......
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
int brcmf_fws_init(struct brcmf_pub *drvr); int brcmf_fws_init(struct brcmf_pub *drvr);
void brcmf_fws_deinit(struct brcmf_pub *drvr); void brcmf_fws_deinit(struct brcmf_pub *drvr);
bool brcmf_fws_fc_active(struct brcmf_fws_info *fws); bool brcmf_fws_fc_active(struct brcmf_fws_info *fws);
int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len, void brcmf_fws_hdrpull(struct brcmf_if *ifp, s16 siglen, struct sk_buff *skb);
struct sk_buff *skb);
int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb); int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb);
void brcmf_fws_reset_interface(struct brcmf_if *ifp); void brcmf_fws_reset_interface(struct brcmf_if *ifp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment