]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: brcm80211: simplified brcmf_proto_ioctl()
authorRoland Vossen <rvossen@broadcom.com>
Fri, 16 Sep 2011 19:27:56 +0000 (12:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Sep 2011 19:39:40 +0000 (21:39 +0200)
Removed a function parameter since it was redundant.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
drivers/staging/brcm80211/brcmfmac/dhd_linux.c
drivers/staging/brcm80211/brcmfmac/dhd_proto.h

index f8731c8b9e6631cd2af49949428f822e7412d596..0d8389eaf603d3e384c5b4605d3729f7561fe1e9 100644 (file)
@@ -271,7 +271,7 @@ done:
 
 int
 brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,
-                 void *buf, int len)
+                 int len)
 {
        struct brcmf_proto *prot = drvr->prot;
        int ret = -1;
@@ -293,7 +293,7 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,
                          (unsigned long)prot->lastcmd);
                if ((ioc->cmd == BRCMF_C_SET_VAR) ||
                    (ioc->cmd == BRCMF_C_GET_VAR))
-                       brcmf_dbg(TRACE, "iovar cmd=%s\n", (char *)buf);
+                       brcmf_dbg(TRACE, "iovar cmd=%s\n", (char *)ioc->buf);
 
                goto done;
        }
@@ -302,10 +302,10 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,
        prot->lastcmd = ioc->cmd;
        if (ioc->set)
                ret = brcmf_proto_cdc_set_ioctl(drvr, ifidx, ioc->cmd,
-                                               buf, len);
+                                               ioc->buf, len);
        else {
                ret = brcmf_proto_cdc_query_ioctl(drvr, ifidx, ioc->cmd,
-                                                 buf, len);
+                                                 ioc->buf, len);
                if (ret > 0)
                        ioc->used = ret - sizeof(struct brcmf_proto_cdc_ioctl);
        }
@@ -321,12 +321,12 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,
 
        /* Intercept the wme_dp ioctl here */
        if (!ret && ioc->cmd == BRCMF_C_SET_VAR &&
-           !strcmp(buf, "wme_dp")) {
+           !strcmp(ioc->buf, "wme_dp")) {
                int slen, val = 0;
 
                slen = strlen("wme_dp") + 1;
                if (len >= (int)(slen + sizeof(int)))
-                       memcpy(&val, (char *)buf + slen, sizeof(int));
+                       memcpy(&val, (char *)ioc->buf + slen, sizeof(int));
                drvr->wme_dp = (u8) le32_to_cpu(val);
        }
 
index 16f7216098f198ba45ee6b1ef38ab700e9dc9ba6..ca42883387a8991a8d8717c33fce5ee6a36c033c 100644 (file)
@@ -200,7 +200,7 @@ static void _brcmf_set_multicast_list(struct brcmf_info *drvr_priv, int ifidx)
        ioc.len = buflen;
        ioc.set = true;
 
-       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.buf, ioc.len);
+       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.len);
        if (ret < 0) {
                brcmf_dbg(ERROR, "%s: set mcast_list failed, cnt %d\n",
                          brcmf_ifname(&drvr_priv->pub, ifidx), cnt);
@@ -238,7 +238,7 @@ static void _brcmf_set_multicast_list(struct brcmf_info *drvr_priv, int ifidx)
        ioc.len = buflen;
        ioc.set = true;
 
-       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.buf, ioc.len);
+       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.len);
        if (ret < 0) {
                brcmf_dbg(ERROR, "%s: set allmulti %d failed\n",
                          brcmf_ifname(&drvr_priv->pub, ifidx),
@@ -259,7 +259,7 @@ static void _brcmf_set_multicast_list(struct brcmf_info *drvr_priv, int ifidx)
        ioc.len = sizeof(allmulti);
        ioc.set = true;
 
-       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.buf, ioc.len);
+       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.len);
        if (ret < 0) {
                brcmf_dbg(ERROR, "%s: set promisc %d failed\n",
                          brcmf_ifname(&drvr_priv->pub, ifidx),
@@ -286,7 +286,7 @@ _brcmf_set_mac_address(struct brcmf_info *drvr_priv, int ifidx, u8 *addr)
        ioc.len = 32;
        ioc.set = true;
 
-       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.buf, ioc.len);
+       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.len);
        if (ret < 0)
                brcmf_dbg(ERROR, "%s: set cur_etheraddr failed\n",
                          brcmf_ifname(&drvr_priv->pub, ifidx));
@@ -718,7 +718,7 @@ static int brcmf_toe_get(struct brcmf_info *drvr_priv, int ifidx, u32 *toe_ol)
        ioc.set = false;
 
        strcpy(buf, "toe_ol");
-       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.buf, ioc.len);
+       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.len);
        if (ret < 0) {
                /* Check for older dongle image that doesn't support toe_ol */
                if (ret == -EIO) {
@@ -756,7 +756,7 @@ static int brcmf_toe_set(struct brcmf_info *drvr_priv, int ifidx, u32 toe_ol)
        strcpy(buf, "toe_ol");
        memcpy(&buf[sizeof("toe_ol")], &toe_ol, sizeof(u32));
 
-       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.buf, ioc.len);
+       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.len);
        if (ret < 0) {
                brcmf_dbg(ERROR, "%s: could not set toe_ol: ret=%d\n",
                          brcmf_ifname(&drvr_priv->pub, ifidx), ret);
@@ -770,7 +770,7 @@ static int brcmf_toe_set(struct brcmf_info *drvr_priv, int ifidx, u32 toe_ol)
        strcpy(buf, "toe");
        memcpy(&buf[sizeof("toe")], &toe, sizeof(u32));
 
-       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.buf, ioc.len);
+       ret = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, &ioc, ioc.len);
        if (ret < 0) {
                brcmf_dbg(ERROR, "%s: could not set toe: ret=%d\n",
                          brcmf_ifname(&drvr_priv->pub, ifidx), ret);
@@ -963,8 +963,7 @@ int brcmf_netdev_ioctl_priv(struct net_device *net, struct brcmf_ioctl *ioc)
        if (is_set_key_cmd)
                brcmf_netdev_wait_pend8021x(net);
 
-       bcmerror = brcmf_proto_ioctl(&drvr_priv->pub, ifidx,
-                                    ioc, ioc->buf, buflen);
+       bcmerror = brcmf_proto_ioctl(&drvr_priv->pub, ifidx, ioc, buflen);
 
 done:
        if (bcmerror > 0)
index 6686f4c8350fd784075c248124d731988491834e..24b0f99e46614a6e5802a021ff4a74288b4c35dd 100644 (file)
@@ -50,7 +50,7 @@ extern int brcmf_proto_hdrpull(struct brcmf_pub *, int *ifidx,
 
 /* Use protocol to issue ioctl to dongle */
 extern int brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx,
-                            struct brcmf_ioctl *ioc, void *buf, int len);
+                            struct brcmf_ioctl *ioc, int len);
 
 /* Update local copy of dongle statistics */
 extern void brcmf_proto_dstats(struct brcmf_pub *drvr);