staging: brcm80211: remove phy_version.h
[deliverable/linux.git] / drivers / staging / brcm80211 / brcmsmac / wl_mac80211.c
index 6c6236c969b707d26189458364cd91f7cf3b9f01..6856a60e27538c7c49dab1b62131c507daf0ae9a 100644 (file)
 #include <linux/sched.h>
 #include <linux/firmware.h>
 #include <net/mac80211.h>
-
-#include <proto/802.11.h>
 #include <bcmdefs.h>
 #include <bcmwifi.h>
 #include <bcmutils.h>
 #include <bcmnvram.h>
-#include <pcicfg.h>
-#include <wlioctl.h>
-#include <sbhnddma.h>
+#include <nicpci.h>
+#include "bcmdma.h"
 
 #include "phy/wlc_phy_int.h"
 #include "d11.h"
 #include "wlc_types.h"
 #include "wlc_cfg.h"
-#include "phy/phy_version.h"
 #include "wlc_key.h"
 #include "wlc_channel.h"
 #include "wlc_scb.h"
@@ -96,6 +92,8 @@ static struct pci_device_id wl_id_table[] = {
        {PCI_VENDOR_ID_BROADCOM, 0x4357, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},      /* 43225 2G */
        {PCI_VENDOR_ID_BROADCOM, 0x4353, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},      /* 43224 DUAL */
        {PCI_VENDOR_ID_BROADCOM, 0x4727, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},      /* 4313 DUAL */
+       /* 43224 Ven */
+       {PCI_VENDOR_ID_BROADCOM, 0x0576, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
        {0}
 };
 
@@ -270,14 +268,14 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
 
        WL_LOCK(wl);
        if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) {
-               if (wlc_iovar_setint
-                   (wl->wlc, "bcn_li_bcn", conf->listen_interval)) {
+               if (wlc_set_par(wl->wlc, IOV_BCN_LI_BCN, conf->listen_interval)
+                   < 0) {
                        wiphy_err(wiphy, "%s: Error setting listen_interval\n",
                                  __func__);
                        err = -EIO;
                        goto config_out;
                }
-               wlc_iovar_getint(wl->wlc, "bcn_li_bcn", &new_int);
+               wlc_get_par(wl->wlc, IOV_BCN_LI_BCN, &new_int);
        }
        if (changed & IEEE80211_CONF_CHANGE_MONITOR)
                wiphy_err(wiphy, "%s: change monitor mode: %s (implement)\n",
@@ -289,14 +287,14 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
                          "true" : "false");
 
        if (changed & IEEE80211_CONF_CHANGE_POWER) {
-               if (wlc_iovar_setint
-                   (wl->wlc, "qtxpower", conf->power_level * 4)) {
+               if (wlc_set_par(wl->wlc, IOV_QTXPOWER, conf->power_level * 4)
+                               < 0) {
                        wiphy_err(wiphy, "%s: Error setting power_level\n",
                                  __func__);
                        err = -EIO;
                        goto config_out;
                }
-               wlc_iovar_getint(wl->wlc, "qtxpower", &new_int);
+               wlc_get_par(wl->wlc, IOV_QTXPOWER, &new_int);
                if (new_int != (conf->power_level * 4))
                        wiphy_err(wiphy, "%s: Power level req != actual, %d %d"
                                  "\n", __func__, conf->power_level * 4,
@@ -739,7 +737,6 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
 {
        struct wl_info *wl = NULL;
        int unit, err;
-
        unsigned long base_addr;
        struct ieee80211_hw *hw;
        u8 perm[ETH_ALEN];
@@ -768,9 +765,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
 
        base_addr = regs;
 
-       if (bustype == PCI_BUS) {
-               wl->piomode = false;
-       } else if (bustype == RPC_BUS) {
+       if (bustype == PCI_BUS || bustype == RPC_BUS) {
                /* Do nothing */
        } else {
                bustype = PCI_BUS;
@@ -796,7 +791,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
        }
 
        /* common load-time initialization */
-       wl->wlc = wlc_attach((void *)wl, vendor, device, unit, wl->piomode,
+       wl->wlc = wlc_attach((void *)wl, vendor, device, unit, false,
                             wl->regsva, wl->bcm_bustype, btparam, &err);
        wl_release_fw(wl);
        if (!wl->wlc) {
@@ -808,7 +803,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
 
        wl->pub->ieee_hw = hw;
 
-       if (wlc_iovar_setint(wl->wlc, "mpc", 0)) {
+       if (wlc_set_par(wl->wlc, IOV_MPC, 0) < 0) {
                wiphy_err(wl->wiphy, "wl%d: Error setting MPC variable to 0\n",
                          unit);
        }
@@ -821,8 +816,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
        wl->irq = irq;
 
        /* register module */
-       wlc_module_register(wl->pub, NULL, "linux", wl, NULL, wl_linux_watchdog,
-                           NULL);
+       wlc_module_register(wl->pub, "linux", wl, wl_linux_watchdog, NULL);
 
        if (ieee_hw_init(hw)) {
                wiphy_err(wl->wiphy, "wl%d: %s: ieee_hw_init failed!\n", unit,
@@ -1117,7 +1111,8 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
               PCI_FUNC(pdev->devfn), pdev->irq);
 
        if ((pdev->vendor != PCI_VENDOR_ID_BROADCOM) ||
-           (((pdev->device & 0xff00) != 0x4300) &&
+           ((pdev->device != 0x0576) &&
+            ((pdev->device & 0xff00) != 0x4300) &&
             ((pdev->device & 0xff00) != 0x4700) &&
             ((pdev->device < 43000) || (pdev->device > 43999))))
                return -ENODEV;
This page took 0.033935 seconds and 5 git commands to generate.