}
}
-wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype, char *vars)
+wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype,
+ char *vars, struct wiphy *wiphy)
{
phy_info_t *pi;
u32 sflags = 0;
if (pi == NULL) {
return NULL;
}
+ pi->wiphy = wiphy;
pi->regs = (d11regs_t *) regs;
pi->sh = sh;
pi->phy_init_por = true;
#include <siutils.h>
#include <d11.h>
#include <wlc_phy_shim.h>
+#include <net/mac80211.h> /* struct wiphy */
#define IDCODE_VER_MASK 0x0000000f
#define IDCODE_VER_SHIFT 0
extern shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp);
extern void wlc_phy_shared_detach(shared_phy_t *phy_sh);
extern wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype,
- char *vars);
+ char *vars, struct wiphy *wiphy);
extern void wlc_phy_detach(wlc_phy_t *ppi);
extern bool wlc_phy_get_phyversion(wlc_phy_t *pih, u16 *phytype,
u8 phycal_tempdelta;
u32 mcs20_po;
u32 mcs40_po;
+ struct wiphy *wiphy;
};
typedef s32 fixed;
hw = pci_get_drvdata(btparam); /* btparam == pdev */
wl = hw->priv;
ASSERT(wl);
+ wl->wiphy = hw->wiphy;
atomic_set(&wl->callbacks, 0);
/* ping-pong stats counters updated by Linux watchdog */
struct net_device_stats stats_watchdog[2];
struct wl_firmware fw;
+ struct wiphy *wiphy;
};
#define WL_LOCK(wl) spin_lock_bh(&(wl)->lock)
/* Get a phy for this band */
wlc_hw->band->pi = wlc_phy_attach(wlc_hw->phy_sh,
- (void *)regs, wlc_bmac_bandtype(wlc_hw), vars);
+ (void *)regs, wlc_bmac_bandtype(wlc_hw), vars,
+ wlc->wiphy);
if (wlc_hw->band->pi == NULL) {
WL_ERROR("wl%d: wlc_bmac_attach: wlc_phy_attach failed\n",
unit);
#include "wlc_alloc.h"
#include "wl_dbg.h"
+#include "wl_mac80211.h"
+
/*
* Disable statistics counting for WME
*/
/*
* The common driver entry routine. Error codes should be unique
*/
-void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
- void *regsva, uint bustype, void *btparam, uint *perr)
+void *wlc_attach(struct wl_info *wl, u16 vendor, u16 device, uint unit,
+ bool piomode, void *regsva, uint bustype, void *btparam,
+ uint *perr)
{
struct wlc_info *wlc;
uint err = 0;
wlc = (struct wlc_info *) wlc_attach_malloc(unit, &err, device);
if (wlc == NULL)
goto fail;
+ wlc->wiphy = wl->wiphy;
pub = wlc->pub;
#if defined(BCMDBG)
*/
bool pr80838_war;
uint hwrxoff;
+ struct wiphy *wiphy;
};
/* antsel module specific state */
#define WLC_PROT_N_OBSS 16 /* non-HT OBSS present */
/* common functions for every port */
-extern void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit,
+extern void *wlc_attach(struct wl_info *wl, u16 vendor, u16 device, uint unit,
bool piomode, void *regsva, uint bustype, void *btparam,
uint *perr);
extern uint wlc_detach(struct wlc_info *wlc);