brcmfmac: change prototype for brcmf_fws_hdrpull()
authorArend van Spriel <arend@broadcom.com>
Wed, 26 Aug 2015 20:15:03 +0000 (22:15 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 29 Sep 2015 07:28:50 +0000 (10:28 +0300)
Instead of passing ifidx and drvr just pass struct brcmf_if pointer
which holds both parameters.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/brcm80211/brcmfmac/bcdc.c
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.h

index aa5ed651625d4c928956216302145d962749c817..288c84e7c56b633c21f0e0b80dca1059416a91ad 100644 (file)
@@ -312,8 +312,7 @@ brcmf_proto_bcdc_hdrpull(struct brcmf_pub *drvr, bool do_fws,
 
        skb_pull(pktbuf, BCDC_HEADER_LEN);
        if (do_fws)
-               brcmf_fws_hdrpull(drvr, tmp_if->ifidx, h->data_offset << 2,
-                                 pktbuf);
+               brcmf_fws_hdrpull(tmp_if, h->data_offset << 2, pktbuf);
        else
                skb_pull(pktbuf, h->data_offset << 2);
 
index ed124867a0f43f51d6ab4a26104f496265fb4044..086cac3f86d64bf41840f61e4c770dcb035363a5 100644 (file)
@@ -1616,11 +1616,10 @@ static int brcmf_fws_notify_bcmc_credit_support(struct brcmf_if *ifp,
        return 0;
 }
 
-int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len,
-                     struct sk_buff *skb)
+void brcmf_fws_hdrpull(struct brcmf_if *ifp, s16 siglen, struct sk_buff *skb)
 {
        struct brcmf_skb_reorder_data *rd;
-       struct brcmf_fws_info *fws = drvr->fws;
+       struct brcmf_fws_info *fws = ifp->drvr->fws;
        u8 *signal_data;
        s16 data_len;
        u8 type;
@@ -1630,20 +1629,20 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len,
        s32 err;
 
        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)
-               return 0;
+       if (!siglen)
+               return;
        /* if flow control disabled, skip to packet data and leave */
        if ((!fws) || (!fws->fw_signals)) {
-               skb_pull(skb, signal_len);
-               return 0;
+               skb_pull(skb, siglen);
+               return;
        }
 
        fws->stats.header_pulls++;
-       data_len = signal_len;
+       data_len = siglen;
        signal_data = skb->data;
 
        status = BRCMF_FWS_RET_OK_NOSCHEDULE;
@@ -1731,14 +1730,12 @@ int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len,
        /* signalling processing result does
         * not affect the actual ethernet packet.
         */
-       skb_pull(skb, signal_len);
+       skb_pull(skb, siglen);
 
        /* this may be a signal-only packet
         */
        if (skb->len == 0)
                fws->stats.header_only_pkt++;
-
-       return 0;
 }
 
 static u8 brcmf_fws_precommit_skb(struct brcmf_fws_info *fws, int fifo,
index 9fc860910bd8571abd9f42040b6918f9f7fb57e5..a36bac17eafdee9210b7a422740ac90d76298ef8 100644 (file)
@@ -21,8 +21,7 @@
 int brcmf_fws_init(struct brcmf_pub *drvr);
 void brcmf_fws_deinit(struct brcmf_pub *drvr);
 bool brcmf_fws_fc_active(struct brcmf_fws_info *fws);
-int brcmf_fws_hdrpull(struct brcmf_pub *drvr, int ifidx, s16 signal_len,
-                     struct sk_buff *skb);
+void brcmf_fws_hdrpull(struct brcmf_if *ifp, s16 siglen, 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);