brcmfmac: remove unnecessary EXPORT_SYMBOL() usage
[deliverable/linux.git] / drivers / net / wireless / brcm80211 / brcmfmac / dhd_common.c
index 9431af2465f3135fc76d5df370853a3b85a77d67..d5811a46a338c79059ea6e9221b187b32849cca3 100644 (file)
@@ -21,7 +21,6 @@
 #include <brcmu_utils.h>
 #include "dhd.h"
 #include "dhd_bus.h"
-#include "dhd_proto.h"
 #include "dhd_dbg.h"
 #include "fwil.h"
 #include "tracepoint.h"
@@ -257,8 +256,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
        u8 buf[BRCMF_DCMD_SMLEN];
        char *ptr;
        s32 err;
-       struct brcmf_bus_dcmd *cmdlst;
-       struct list_head *cur, *q;
 
        /* retreive mac address */
        err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr,
@@ -281,9 +278,14 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
        }
        ptr = (char *)buf;
        strsep(&ptr, "\n");
+
        /* Print fw version info */
        brcmf_err("Firmware version = %s\n", buf);
 
+       /* locate firmware version number for ethtool */
+       ptr = strrchr(buf, ' ') + 1;
+       strlcpy(ifp->drvr->fwver, ptr, sizeof(ifp->drvr->fwver));
+
        /*
         * Setup timeout if Beacons are lost and roam is off to report
         * link down
@@ -342,17 +344,8 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
        brcmf_c_pktfilter_offload_enable(ifp, BRCMF_DEFAULT_PACKET_FILTER,
                                         0, true);
 
-       /* set bus specific command if there is any */
-       list_for_each_safe(cur, q, &ifp->drvr->bus_if->dcmd_list) {
-               cmdlst = list_entry(cur, struct brcmf_bus_dcmd, list);
-               if (cmdlst->name && cmdlst->param && cmdlst->param_len) {
-                       brcmf_fil_iovar_data_set(ifp, cmdlst->name,
-                                                cmdlst->param,
-                                                cmdlst->param_len);
-               }
-               list_del(cur);
-               kfree(cmdlst);
-       }
+       /* do bus specific preinit here */
+       err = brcmf_bus_preinit(ifp->drvr->bus_if);
 done:
        return err;
 }
This page took 0.024926 seconds and 5 git commands to generate.