提交 1c4c54ba 编写于 作者: R Roland Vossen 提交者: Greg Kroah-Hartman

staging: brcm80211: replaced wlc_ by brcms_c_, part 2

Code cleanup. Function renaming. Triggered by feedback comment from John
Linville, just like the other function renames that preceded this patch.
Signed-off-by: NRoland Vossen <rvossen@broadcom.com>
Reviewed-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f52a0ad0
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
#include "main.h" #include "main.h"
#include "alloc.h" #include "alloc.h"
static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit); static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit);
static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg); static void brcms_c_bsscfg_mfree(struct brcms_c_bsscfg *cfg);
static struct wlc_pub *wlc_pub_malloc(uint unit, static struct wlc_pub *brcms_c_pub_malloc(uint unit,
uint *err, uint devid); uint *err, uint devid);
static void wlc_pub_mfree(struct wlc_pub *pub); static void brcms_c_pub_mfree(struct wlc_pub *pub);
static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid); static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid);
static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid) static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid)
{ {
tunables->ntxd = NTXD; tunables->ntxd = NTXD;
tunables->nrxd = NRXD; tunables->nrxd = NRXD;
...@@ -45,7 +45,7 @@ static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid) ...@@ -45,7 +45,7 @@ static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
tunables->txsbnd = TXSBND; tunables->txsbnd = TXSBND;
} }
static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid) static struct wlc_pub *brcms_c_pub_malloc(uint unit, uint *err, uint devid)
{ {
struct wlc_pub *pub; struct wlc_pub *pub;
...@@ -62,7 +62,7 @@ static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid) ...@@ -62,7 +62,7 @@ static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid)
} }
/* need to init the tunables now */ /* need to init the tunables now */
wlc_tunables_init(pub->tunables, devid); brcms_c_tunables_init(pub->tunables, devid);
pub->multicast = kzalloc(ETH_ALEN * MAXMULTILIST, GFP_ATOMIC); pub->multicast = kzalloc(ETH_ALEN * MAXMULTILIST, GFP_ATOMIC);
if (pub->multicast == NULL) { if (pub->multicast == NULL) {
...@@ -73,11 +73,11 @@ static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid) ...@@ -73,11 +73,11 @@ static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid)
return pub; return pub;
fail: fail:
wlc_pub_mfree(pub); brcms_c_pub_mfree(pub);
return NULL; return NULL;
} }
static void wlc_pub_mfree(struct wlc_pub *pub) static void brcms_c_pub_mfree(struct wlc_pub *pub)
{ {
if (pub == NULL) if (pub == NULL)
return; return;
...@@ -87,7 +87,7 @@ static void wlc_pub_mfree(struct wlc_pub *pub) ...@@ -87,7 +87,7 @@ static void wlc_pub_mfree(struct wlc_pub *pub)
kfree(pub); kfree(pub);
} }
static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit) static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit)
{ {
struct brcms_c_bsscfg *cfg; struct brcms_c_bsscfg *cfg;
...@@ -102,11 +102,11 @@ static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit) ...@@ -102,11 +102,11 @@ static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit)
return cfg; return cfg;
fail: fail:
wlc_bsscfg_mfree(cfg); brcms_c_bsscfg_mfree(cfg);
return NULL; return NULL;
} }
static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg) static void brcms_c_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
{ {
if (cfg == NULL) if (cfg == NULL)
return; return;
...@@ -116,7 +116,7 @@ static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg) ...@@ -116,7 +116,7 @@ static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
kfree(cfg); kfree(cfg);
} }
static void wlc_bsscfg_ID_assign(struct brcms_c_info *wlc, static void brcms_c_bsscfg_ID_assign(struct brcms_c_info *wlc,
struct brcms_c_bsscfg *bsscfg) struct brcms_c_bsscfg *bsscfg)
{ {
bsscfg->ID = wlc->next_bsscfg_ID; bsscfg->ID = wlc->next_bsscfg_ID;
...@@ -137,7 +137,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) ...@@ -137,7 +137,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
} }
/* allocate struct brcms_c_pub state structure */ /* allocate struct brcms_c_pub state structure */
wlc->pub = wlc_pub_malloc(unit, err, devid); wlc->pub = brcms_c_pub_malloc(unit, err, devid);
if (wlc->pub == NULL) { if (wlc->pub == NULL) {
*err = 1003; *err = 1003;
goto fail; goto fail;
...@@ -181,12 +181,12 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) ...@@ -181,12 +181,12 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
goto fail; goto fail;
} }
wlc->cfg = wlc_bsscfg_malloc(unit); wlc->cfg = brcms_c_bsscfg_malloc(unit);
if (wlc->cfg == NULL) { if (wlc->cfg == NULL) {
*err = 1011; *err = 1011;
goto fail; goto fail;
} }
wlc_bsscfg_ID_assign(wlc, wlc->cfg); brcms_c_bsscfg_ID_assign(wlc, wlc->cfg);
wlc->wsec_def_keys[0] = wlc->wsec_def_keys[0] =
kzalloc(sizeof(wsec_key_t) * WLC_DEFAULT_KEYS, GFP_ATOMIC); kzalloc(sizeof(wsec_key_t) * WLC_DEFAULT_KEYS, GFP_ATOMIC);
...@@ -255,8 +255,8 @@ void brcms_c_detach_mfree(struct brcms_c_info *wlc) ...@@ -255,8 +255,8 @@ void brcms_c_detach_mfree(struct brcms_c_info *wlc)
if (wlc == NULL) if (wlc == NULL)
return; return;
wlc_bsscfg_mfree(wlc->cfg); brcms_c_bsscfg_mfree(wlc->cfg);
wlc_pub_mfree(wlc->pub); brcms_c_pub_mfree(wlc->pub);
kfree(wlc->modulecb); kfree(wlc->modulecb);
kfree(wlc->default_bss); kfree(wlc->default_bss);
kfree(wlc->wsec_def_keys[0]); kfree(wlc->wsec_def_keys[0]);
......
...@@ -505,7 +505,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi, ...@@ -505,7 +505,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
if (err) { if (err) {
if (err == -EBUSY) { if (err == -EBUSY) {
wiphy_err(wiphy, "wl%d: wlc_sendampdu: " wiphy_err(wiphy, "wl%d: sendampdu: "
"prep_xdu retry; seq 0x%x\n", "prep_xdu retry; seq 0x%x\n",
wlc->pub->unit, seq); wlc->pub->unit, seq);
*pdu = p; *pdu = p;
...@@ -513,7 +513,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi, ...@@ -513,7 +513,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
} }
/* error in the packet; reject it */ /* error in the packet; reject it */
wiphy_err(wiphy, "wl%d: wlc_sendampdu: prep_xdu " wiphy_err(wiphy, "wl%d: sendampdu: prep_xdu "
"rejected; seq 0x%x\n", wlc->pub->unit, seq); "rejected; seq 0x%x\n", wlc->pub->unit, seq);
*pdu = NULL; *pdu = NULL;
break; break;
......
...@@ -139,9 +139,9 @@ extern void brcms_b_band_stf_ss_set(struct brcms_c_hw_info *wlc_hw, ...@@ -139,9 +139,9 @@ extern void brcms_b_band_stf_ss_set(struct brcms_c_hw_info *wlc_hw,
extern void brcms_b_wait_for_wake(struct brcms_c_hw_info *wlc_hw); extern void brcms_b_wait_for_wake(struct brcms_c_hw_info *wlc_hw);
extern void wlc_ucode_wake_override_set(struct brcms_c_hw_info *wlc_hw, extern void brcms_c_ucode_wake_override_set(struct brcms_c_hw_info *wlc_hw,
u32 override_bit); u32 override_bit);
extern void wlc_ucode_wake_override_clear(struct brcms_c_hw_info *wlc_hw, extern void brcms_c_ucode_wake_override_clear(struct brcms_c_hw_info *wlc_hw,
u32 override_bit); u32 override_bit);
extern void brcms_b_set_addrmatch(struct brcms_c_hw_info *wlc_hw, extern void brcms_b_set_addrmatch(struct brcms_c_hw_info *wlc_hw,
......
...@@ -801,7 +801,7 @@ static struct brcms_info *brcms_attach(u16 vendor, u16 device, ...@@ -801,7 +801,7 @@ static struct brcms_info *brcms_attach(u16 vendor, u16 device,
wl->regsva, wl->bcm_bustype, btparam, &err); wl->regsva, wl->bcm_bustype, btparam, &err);
brcms_release_fw(wl); brcms_release_fw(wl);
if (!wl->wlc) { if (!wl->wlc) {
wiphy_err(wl->wiphy, "%s: wlc_attach() failed with code %d\n", wiphy_err(wl->wiphy, "%s: attach() failed with code %d\n",
KBUILD_MODNAME, err); KBUILD_MODNAME, err);
goto fail; goto fail;
} }
...@@ -1241,7 +1241,7 @@ static void brcms_remove(struct pci_dev *pdev) ...@@ -1241,7 +1241,7 @@ static void brcms_remove(struct pci_dev *pdev)
status = brcms_c_chipmatch(pdev->vendor, pdev->device); status = brcms_c_chipmatch(pdev->vendor, pdev->device);
UNLOCK(wl); UNLOCK(wl);
if (!status) { if (!status) {
wiphy_err(wl->wiphy, "wl: brcms_remove: wlc_chipmatch " wiphy_err(wl->wiphy, "wl: brcms_remove: chipmatch "
"failed\n"); "failed\n");
return; return;
} }
......
...@@ -177,13 +177,14 @@ void wlapi_bmac_core_phypll_reset(wlc_phy_shim_info_t *physhim) ...@@ -177,13 +177,14 @@ void wlapi_bmac_core_phypll_reset(wlc_phy_shim_info_t *physhim)
void wlapi_bmac_ucode_wake_override_phyreg_set(wlc_phy_shim_info_t *physhim) void wlapi_bmac_ucode_wake_override_phyreg_set(wlc_phy_shim_info_t *physhim)
{ {
wlc_ucode_wake_override_set(physhim->wlc_hw, WLC_WAKE_OVERRIDE_PHYREG); brcms_c_ucode_wake_override_set(physhim->wlc_hw,
WLC_WAKE_OVERRIDE_PHYREG);
} }
void wlapi_bmac_ucode_wake_override_phyreg_clear(wlc_phy_shim_info_t *physhim) void wlapi_bmac_ucode_wake_override_phyreg_clear(wlc_phy_shim_info_t *physhim)
{ {
wlc_ucode_wake_override_clear(physhim->wlc_hw, brcms_c_ucode_wake_override_clear(physhim->wlc_hw,
WLC_WAKE_OVERRIDE_PHYREG); WLC_WAKE_OVERRIDE_PHYREG);
} }
void void
......
...@@ -653,7 +653,7 @@ extern void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, ...@@ -653,7 +653,7 @@ extern void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc,
/* helper functions */ /* helper functions */
extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc); extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc);
extern bool wlc_radio_monitor_stop(struct brcms_c_info *wlc); extern bool brcms_c_radio_monitor_stop(struct brcms_c_info *wlc);
#define MAXBANDS 2 /* Maximum #of bands */ #define MAXBANDS 2 /* Maximum #of bands */
/* bandstate array indices */ /* bandstate array indices */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册