staging: brcm80211: removal of obsolete mips code
cover staging: brcm80211: removal of obsolete mips code
Code cleanup. Follow up on feedback from John Linville.
Roland Vossen (2):
staging: brcm80211: removed #ifdef __mips__
staging: brcm80211: removed BCMFASTPATH macro
.../staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c | 50 +------------------- drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c | 2 +- drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 8 ++-- drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c | 10 ++-- drivers/staging/brcm80211/brcmsmac/wlc_antsel.c | 2 +- drivers/staging/brcm80211/brcmsmac/wlc_bmac.c | 12 ++-- drivers/staging/brcm80211/brcmsmac/wlc_main.c | 40 ++++++++-------- drivers/staging/brcm80211/brcmsmac/wlc_rate.c | 4 +- drivers/staging/brcm80211/include/bcmdefs.h | 6 -- drivers/staging/brcm80211/include/bcmutils.h | 31 ------------ drivers/staging/brcm80211/util/bcmutils.c | 44 +++-------------- drivers/staging/brcm80211/util/hnddma.c | 37 +++------------ 12 files changed, 55 insertions(+), 191 deletions(-)
PATCH 1/2 staging: brcm80211: removed #ifdef __mips__
Code cleanup. __mips__ was undefined for current builds.
--- .../staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c | 48 -------------------- drivers/staging/brcm80211/include/bcmdefs.h | 4 -- drivers/staging/brcm80211/include/bcmutils.h | 31 ------------- drivers/staging/brcm80211/util/bcmutils.c | 28 ----------- drivers/staging/brcm80211/util/hnddma.c | 23 --------- 5 files changed, 0 insertions(+), 134 deletions(-)
drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c +0 -48
@@ -246,15 +246,9 @@ u16 read_radio_reg(phy_info_t *pi, u16 addr) (D11REV_IS(pi->sh->corerev, 22) && (pi->pubpi.phy_type != PHY_TYPE_SSN))) { W_REG(&pi->regs->radioregaddr, addr); -#ifdef __mips__ - (void)R_REG(&pi->regs->radioregaddr); -#endif data = R_REG(&pi->regs->radioregdata); } else {W_REG (&pi->regs->phy4waddr, addr); -#ifdef __mips__ - (void )R_REG (&pi->regs->phy4waddr); -#endif #ifdef __ARM_ARCH_4T__ __asm__(" .align 4 " );
@@ -280,15 +274,9 @@ void write_radio_reg(phy_info_t *pi, u16 addr, u16 val) && (pi->pubpi.phy_type != PHY_TYPE_SSN))) { W_REG(&pi->regs->radioregaddr, addr); -#ifdef __mips__ - (void)R_REG(&pi->regs->radioregaddr); -#endif W_REG(&pi->regs->radioregdata, val); } else {W_REG (&pi->regs->phy4waddr, addr); -#ifdef __mips__ - (void )R_REG (&pi->regs->phy4waddr); -#endif W_REG (&pi->regs->phy4wdatalo, val); }
@@ -311,28 +299,16 @@ static u32 read_radio_id(phy_info_t *pi)u32 b0, b1, b2;W_REG (&pi->regs->radioregaddr,0 ); -#ifdef __mips__ - (void )R_REG (&pi->regs->radioregaddr); -#endif b0 = (u32 )R_REG (&pi->regs->radioregdata);W_REG (&pi->regs->radioregaddr,1 ); -#ifdef __mips__ - (void )R_REG (&pi->regs->radioregaddr); -#endif b1 = (u32 )R_REG (&pi->regs->radioregdata);W_REG (&pi->regs->radioregaddr,2 ); -#ifdef __mips__ - (void )R_REG (&pi->regs->radioregaddr); -#endif b2 = (u32 )R_REG (&pi->regs->radioregdata); id = ((b0 &0xf ) <<28 ) | (((b2 <<8 ) | b1) <<12 ) | ((b0 >>4 ) &0xf ); }else {W_REG (&pi->regs->phy4waddr,RADIO_IDCODE ); -#ifdef __mips__ - (void )R_REG (&pi->regs->phy4waddr); -#endif id = (u32 )R_REG (&pi->regs->phy4wdatalo); id |= (u32 )R_REG (&pi->regs->phy4wdatahi) <<16 ; }
@@ -396,10 +372,6 @@ u16 read_phy_reg(phy_info_t *pi, u16 addr) regs = pi->regs;W_REG (®s->phyregaddr, addr); -#ifdef __mips__ - (void )R_REG (®s->phyregaddr); -#endif - pi->phy_wreg =0 ;return R_REG (®s->phyregdata); }
@@ -410,13 +382,6 @@ void write_phy_reg(phy_info_t *pi, u16 addr, u16 val) regs = pi->regs; -#ifdef __mips__ -W_REG (®s->phyregaddr, addr); - (void )R_REG (®s->phyregaddr); -W_REG (®s->phyregdata, val); -if (addr ==0x72 ) - (void )R_REG (®s->phyregdata); -#else W_REG ((u32 *)(®s->phyregaddr), addr | (val <<16 ));if (pi->sh->bustype ==PCI_BUS ) {
@@ -425,7 +390,6 @@ void write_phy_reg(phy_info_t *pi, u16 addr, u16 val) (void )R_REG (®s->phyversion); } } -#endif }void and_phy_reg (phy_info_t *pi,u16 addr,u16 val)
@@ -435,10 +399,6 @@ void and_phy_reg(phy_info_t *pi, u16 addr, u16 val) regs = pi->regs;W_REG (®s->phyregaddr, addr); -#ifdef __mips__ - (void )R_REG (®s->phyregaddr); -#endif -W_REG (®s->phyregdata, (R_REG (®s->phyregdata) & val)); pi->phy_wreg =0 ; }
@@ -450,10 +410,6 @@ void or_phy_reg(phy_info_t *pi, u16 addr, u16 val) regs = pi->regs;W_REG (®s->phyregaddr, addr); -#ifdef __mips__ - (void )R_REG (®s->phyregaddr); -#endif -W_REG (®s->phyregdata, (R_REG (®s->phyregdata) | val)); pi->phy_wreg =0 ; }
@@ -465,10 +421,6 @@ void mod_phy_reg(phy_info_t *pi, u16 addr, u16 mask, u16 val) regs = pi->regs;W_REG (®s->phyregaddr, addr); -#ifdef __mips__ - (void )R_REG (®s->phyregaddr); -#endif -W_REG (®s->phyregdata, ((R_REG (®s->phyregdata) & ~mask) | (val & mask))); pi->phy_wreg =0 ;
drivers/staging/brcm80211/include/bcmdefs.h +0 -4
@@ -36,11 +36,7 @@#define AUTO (-1)/* Auto = -1 */ -#ifdef mips -#define BCMFASTPATH __attribute__ ((__section__(".text.fastpath"))) -#else #define BCMFASTPATH -#endif /* Bus types */ #define SI_BUS 0/* SOC Interconnect */
drivers/staging/brcm80211/include/bcmutils.h +0 -31
@@ -299,43 +299,12 @@ extern void osl_assert(char *exp, char *file, int line);/* register access macros */ #ifndef IL_BIGENDIAN -#ifndef __mips__#define R_REG (r) (\ SELECT_BUS_READ(sizeof(*(r)) == sizeof(u8) ? \ readb((volatile u8*)(r)) : \ sizeof(*(r)) == sizeof(u16) ? readw((volatile u16*)(r)) : \ readl((volatile u32*)(r)), OSL_READ_REG(r)) \ ) -#else /* __mips__ */ -#define R_REG (r) (\ - SELECT_BUS_READ( \ - ({ \ - __typeof(*(r)) __osl_v; \ - __asm__ __volatile__("sync"); \ - switch (sizeof(*(r))) { \ - case sizeof(u8): \ - __osl_v = readb((volatile u8*)(r)); \ - break; \ - case sizeof(u16): \ - __osl_v = readw((volatile u16*)(r)); \ - break; \ - case sizeof(u32): \ - __osl_v = \ - readl((volatile u32*)(r)); \ - break; \ - } \ - __asm__ __volatile__("sync"); \ - __osl_v; \ - }), \ - ({ \ - __typeof(*(r)) __osl_v; \ - __asm__ __volatile__("sync"); \ - __osl_v = OSL_READ_REG(r); \ - __asm__ __volatile__("sync"); \ - __osl_v; \ - })) \ -) -#endif /* __mips__ */ #define W_REG (r, v) do { \ SELECT_BUS_WRITE( \
drivers/staging/brcm80211/util/bcmutils.c +0 -28
@@ -724,37 +724,9 @@ u32 hndcrc32(u8 *pdata, /* pointer to array of data to process */ ) {u8 *pend; -#ifdef __mips__ -u8 tmp[4 ]; -unsigned long *tptr = (unsigned long *) tmp; - -/* in case the beginning of the buffer isn't aligned */ - pend = (u8 *) ((uint) (pdata +3 ) &0xfffffffc ); - nbytes -= (pend - pdata); -while (pdata < pend) -CRC_INNER_LOOP (32 , crc, *pdata++); - -/* handle bulk of data as 32-bit words */ - pend = pdata + (nbytes &0xfffffffc ); -while (pdata < pend) { - *tptr = *(unsigned long *) pdata; - pdata +=sizeof (unsigned long *); -CRC_INNER_LOOP (32 , crc, tmp[0 ]); -CRC_INNER_LOOP (32 , crc, tmp[1 ]); -CRC_INNER_LOOP (32 , crc, tmp[2 ]); -CRC_INNER_LOOP (32 , crc, tmp[3 ]); - } - -/* 1-3 bytes at end of buffer */ - pend = pdata + (nbytes &0x03 ); -while (pdata < pend) -CRC_INNER_LOOP (32 , crc, *pdata++); -#else pend = pdata + nbytes;while (pdata < pend)CRC_INNER_LOOP (32 , crc, *pdata++); -#endif /* __mips__ */ -return crc; }/*
drivers/staging/brcm80211/util/hnddma.c +0 -23
@@ -27,10 +27,6 @@#include <sbhnddma.h> #include <hnddma.h> -#if defined(__mips__) -#include <asm/addrspace.h> -#endif -#ifdef BRCM_FULLMAC #error "hnddma.c shouldn't be needed for FULLMAC"#endif
@@ -350,9 +346,6 @@ struct hnddma_pub *dma_attach(char *name, si_t *sih, di->dataoffsetlow = di->ddoffsetlow; di->dataoffsethigh = di->ddoffsethigh; } -#if defined(__mips__) && defined(IL_BIGENDIAN ) - di->dataoffsetlow = di->dataoffsetlow +SI_SDRAM_SWAPPED ; -#endif /* defined(__mips__) && defined(IL_BIGENDIAN) */ /* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */ if ((ai_coreid (sih) ==SDIOD_CORE_ID ) && ((ai_corerev (sih) >0 ) && (ai_corerev (sih) <=2 )))
@@ -467,12 +460,7 @@ dma64_dd_upd(dma_info_t *di, dma64dd_t *ddring, dmaaddr_t pa, uint outidx,u32 ctrl2 = bufcount &D64_CTRL2_BC_MASK ;/* PCI bus with big(>1G) physical address, use address extension */ -#if defined(__mips__) && defined(IL_BIGENDIAN ) -if ((di->dataoffsetlow ==SI_SDRAM_SWAPPED ) - || !(PHYSADDRLO (pa) &PCI32ADDR_HIGH )) { -#else if ((di->dataoffsetlow ==0 ) || !(PHYSADDRLO (pa) &PCI32ADDR_HIGH )) { -#endif /* defined(__mips__) && defined(IL_BIGENDIAN) */ W_SM (&ddring[outidx].addrlow,BUS_SWAP32 (PHYSADDRLO (pa) + di->dataoffsetlow)); W_SM(&ddring[outidx].addrhigh,
@@ -726,17 +714,6 @@ static void *BCMFASTPATH _dma_rx(dma_info_t *di) len =le16_to_cpu (*(u16 *) (head->data));DMA_TRACE (("%s: dma_rx len %d\n" , di->name, len)); - -#if defined(__mips__) -#define OSL_UNCACHED (va) ((void *)KSEG1ADDR((va))) -if (!len) { -while (!(len = *(u16 *)OSL_UNCACHED (head->data))) -udelay (1 ); - - *(u16 *) (head->data) =cpu_to_le16 ((u16 ) len); - } -#endif /* defined(__mips__) */ -/* set actual length */ pkt_len =min ((di->rxoffset + len), di->rxbufsize);__skb_trim (head, pkt_len);
Signature · 1 line
1.7.1
Re: [PATCH 1/2] staging: brcm80211: removed #ifdef __mips__
Quoted 17 lines · Roland Vossen
Code cleanup.
__mips__was undefined for current builds.Signed-off-by Roland Vossen <[email protected]>Reviewed-by Arend van Spriel <[email protected]>--- .../staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c | 48 -------------------- drivers/staging/brcm80211/include/bcmdefs.h | 4 -- drivers/staging/brcm80211/include/bcmutils.h | 31 ------------- drivers/staging/brcm80211/util/bcmutils.c | 28 ----------- drivers/staging/brcm80211/util/hnddma.c | 23 --------- 5 files changed, 0 insertions(+), 134 deletions(-)drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c +0
-0
drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c u16 read_radio_reg(phy_info_t *pi, u16 addr) · line 251
Quoted 6 lines
drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c +0
-3@@ -246,15 +246,9 @@ u16 read_radio_reg(phy_info_t *pi, u16 addr) (D11REV_IS(pi->sh->corerev, 22) && (pi->pubpi.phy_type != PHY_TYPE_SSN))) {W_REG (&pi->regs->radioregaddr, addr); -#ifdef __mips__ - (void )R_REG (&pi->regs->radioregaddr); -#endif
Are you sure? __mips__ is automagically defined by GCC, if compiling for MIPS. Maybe it should be converted to some CONFIG_... symbol. But removal seems wrong.
Signature · 1 line
Greetings Michael.
Re: [PATCH 1/2] staging: brcm80211: removed #ifdef __mips__
Hello guys,
Greg, please drop this patch set. Rest of this email is FYI only.
Michael:
Quoted 3 lines
Are you sure?
__mips__is automagically defined by GCC, if compiling for MIPS. Maybe it should be converted to someCONFIG_... symbol. But removal seems wrong.
You are right. The majority of the removed #ifdef __mips__ code has to do with write flushing. To accomplish this, it performs a R_REG after a W_REG. I assumed that writeb() and friends guarantee ordering and write flushing, but after some reading I learned that this is not the case.
I will rework the code and submit a new patch set.
For some background info: this patch was a reaction on an email from John Linville to us. John wrote:
<quote>
I took a quick run through a pull of staging from today. I made a few notes, but a lot of them would seem to relate to the utils stuff you mention above. One general comment would be that there still seems to be a lot of MIPS-specific stuff buried in the code, in particular a lot of "#ifdef __mips__" stuff that if necessary should at least be hidden inside the W_REG macro.
</quote>
Thanks, Roland.
Re: [PATCH 1/2] staging: brcm80211: removed #ifdef __mips__
Quoted 20 lines · Roland Vossen
Hello guys,
Greg, please drop this patch set. Rest of this email is FYI only.
Michael:
Quoted 3 lines
Are you sure?
__mips__is automagically defined by GCC, if compiling for MIPS. Maybe it should be converted to someCONFIG_... symbol. But removal seems wrong.You are right. The majority of the removed #ifdef
__mips__code has to do with write flushing. To accomplish this, it performs aR_REGafter aW_REG. I assumed thatwriteb()and friends guarantee ordering and write flushing, but after some reading I learned that this is not the case.I will rework the code and submit a new patch set.
For some background info: this patch was a reaction on an email from John Linville to us. John wrote:
Quoted 8 lines
<quote>
I took a quick run through a pull of staging from today. I made a few notes, but a lot of them would seem to relate to the utils stuff you mention above. One general comment would be that there still seems to be a lot of MIPS-specific stuff buried in the code, in particular a lot of "#ifdef__mips__" stuff that if necessary should at least be hidden inside theW_REGmacro.
</quote>
You should probably create a new macro W_REG_FLUSH or something like that, which enforces ordering by reading back the register, if required. That avoids ugly #ifdefs in the code.
Signature · 1 line
Greetings Michael.
Re: [PATCH 1/2] staging: brcm80211: removed #ifdef __mips__
Quoted 30 lines · Michael Büsch
Quoted 20 lines · Roland Vossen
Hello guys,
Greg, please drop this patch set. Rest of this email is FYI only.
Michael:
Quoted 3 lines
Are you sure?
__mips__is automagically defined by GCC, if compiling for MIPS. Maybe it should be converted to someCONFIG_... symbol. But removal seems wrong.You are right. The majority of the removed #ifdef
__mips__code has to do with write flushing. To accomplish this, it performs aR_REGafter aW_REG. I assumed thatwriteb()and friends guarantee ordering and write flushing, but after some reading I learned that this is not the case.I will rework the code and submit a new patch set.
For some background info: this patch was a reaction on an email from John Linville to us. John wrote:
Quoted 8 lines
<quote>
I took a quick run through a pull of staging from today. I made a few notes, but a lot of them would seem to relate to the utils stuff you mention above. One general comment would be that there still seems to be a lot of MIPS-specific stuff buried in the code, in particular a lot of "#ifdef__mips__" stuff that if necessary should at least be hidden inside theW_REGmacro.
</quote>
Quoted 3 lines
You should probably create a new macro
W_REG_FLUSHor something like that, which enforces ordering by reading back the register, if required. That avoids ugly #ifdefs in the code.
I don't see how write flushing would be MIPS specific anyway? It's a function of the bus (PCI), not the host architecture, no?
johannes
Re: [PATCH 1/2] staging: brcm80211: removed #ifdef __mips__
Quoted 2 lines · Johannes Berg
I don't see how write flushing would be MIPS specific anyway? It's a function of the bus (PCI), not the host architecture, no?
Since I am not the original author of that piece of code, I had to make some inquiries, hence my non immediate response.
It turns out that the read-after-write construct was introduced in the code to ensure write order for certain Broadcom chips. Those chips are: bcm4706, bcm4716, bcm4717, bcm4718. All these chips contain a MIPS processor.
The #ifdef __mips__ in the code is broader than just those chips. The side effect is that other broadcom chips with a mips processor also execute the extra read, leading to some I/O overhead, which is acceptable.
Bye, Roland.
PATCH 2/2 staging: brcm80211: removed BCMFASTPATH macro
In reply to Roland VossenCode cleanup. BCMFASTPATH expanded to an empty string.
--- .../staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c | 2 +- drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c | 2 +- drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 8 ++-- drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c | 10 ++-- drivers/staging/brcm80211/brcmsmac/wlc_antsel.c | 2 +- drivers/staging/brcm80211/brcmsmac/wlc_bmac.c | 12 +++--- drivers/staging/brcm80211/brcmsmac/wlc_main.c | 40 ++++++++++---------- drivers/staging/brcm80211/brcmsmac/wlc_rate.c | 4 +- drivers/staging/brcm80211/include/bcmdefs.h | 2 - drivers/staging/brcm80211/util/bcmutils.c | 16 ++++---- drivers/staging/brcm80211/util/hnddma.c | 14 +++--- 11 files changed, 55 insertions(+), 57 deletions(-)
drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c +1 -1
@@ -2716,7 +2716,7 @@ void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_cmplx_pwr_dB, u8 core) } } -void BCMFASTPATH wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx) +void wlc_phy_rssi_compute (wlc_phy_t *pih,void *ctx) {wlc_d11rxhdr_t *wlc_rxhdr = (wlc_d11rxhdr_t *) ctx;d11rxhdr_t *rxh = &wlc_rxhdr->rxhdr;
drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c +1 -1
@@ -21438,7 +21438,7 @@ static void wlc_phy_rssi_cal_nphy_rev2(phy_info_t *pi, u8 rssi_type)wlc_phy_resetcca_nphy (pi); } -int BCMFASTPATH +int wlc_phy_rssi_compute_nphy (phy_info_t *pi,wlc_d11rxhdr_t *wlc_rxh) {d11rxhdr_t *rxh = &wlc_rxh->rxhdr;
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c +4 -4
@@ -1465,7 +1465,7 @@ uint wl_reset(struct wl_info *wl)* These are interrupt on/off entry points. Disable interrupts * during interrupt state transition. */ -void BCMFASTPATH wl_intrson(struct wl_info *wl) +void wl_intrson (struct wl_info *wl) {unsigned long flags;
@@ -1482,7 +1482,7 @@ bool wl_alloc_dma_resources(struct wl_info *wl, uint addrwidth)return true; } -u32 BCMFASTPATH wl_intrsoff(struct wl_info *wl) +u32 wl_intrsoff (struct wl_info *wl) {unsigned long flags;u32 status;
@@ -1539,7 +1539,7 @@ void wl_down(struct wl_info *wl)WL_LOCK (wl); } -static irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id) +static irqreturn_t wl_isr (int irq,void *dev_id) {struct wl_info *wl;bool ours, wantdpc;
@@ -1566,7 +1566,7 @@ static irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)return IRQ_RETVAL (ours); } -static void BCMFASTPATH wl_dpc(unsigned long data) +static void wl_dpc (unsigned long data) {struct wl_info *wl;
drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c +5 -5
@@ -447,7 +447,7 @@ static void wlc_ffpld_calc_mcs2ampdu_table(struct ampdu_info *ampdu, int f) } } -static void BCMFASTPATH +static void wlc_ampdu_agg (struct ampdu_info *ampdu,struct scb *scb,struct sk_buff *p,uint prec) {
@@ -465,7 +465,7 @@ wlc_ampdu_agg(struct ampdu_info *ampdu, struct scb *scb, struct sk_buff *p,return ; } -int BCMFASTPATH +int wlc_sendampdu (struct ampdu_info *ampdu,struct wlc_txq_info *qi,struct sk_buff **pdu,int prec) {
@@ -861,7 +861,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,return err; } -void BCMFASTPATH +void wlc_ampdu_dotxstatus (struct ampdu_info *ampdu,struct scb *scb,struct sk_buff *p,tx_status_t *txs) {
@@ -933,7 +933,7 @@ rate_status(struct wlc_info *wlc, struct ieee80211_tx_info *tx_info,#define SHORTNAME "AMPDU status" -static void BCMFASTPATH +static void wlc_ampdu_dotxstatus_complete (struct ampdu_info *ampdu,struct scb *scb,struct sk_buff *p,tx_status_t *txs,u32 s1,u32 s2)
@@ -1233,7 +1233,7 @@ static void ampdu_update_max_txlen(struct ampdu_info *ampdu, u8 dur) } } -u8 BCMFASTPATH +u8 wlc_ampdu_null_delim_cnt (struct ampdu_info *ampdu,struct scb *scb,ratespec_t rspec,int phylen) {
drivers/staging/brcm80211/brcmsmac/wlc_antsel.c +1 -1
@@ -200,7 +200,7 @@ wlc_antsel_init_cfg(struct antsel_info *asi, wlc_antselcfg_t *antsel, } } -void BCMFASTPATH +void wlc_antsel_antcfg_get (struct antsel_info *asi,bool usedef,bool sel,u8 antselid,u8 fbantselid,u8 *antcfg,u8 *fbantcfg)
drivers/staging/brcm80211/brcmsmac/wlc_bmac.c +6 -6
@@ -256,7 +256,7 @@ static u32 WLBANDINITFN(wlc_setband_inact) (struct wlc_info *wlc, uint bandunit)* Return true if more frames need to be processed. false otherwise. * Param 'bound' indicates max. # frames to process before break out. */ -static bool BCMFASTPATH +static bool wlc_bmac_recv (struct wlc_hw_info *wlc_hw,uint fifo,bool bound) {struct sk_buff *p;
@@ -305,7 +305,7 @@ wlc_bmac_recv(struct wlc_hw_info *wlc_hw, uint fifo, bool bound)* Return true if another dpc needs to be re-scheduled. false otherwise. * Param 'bounded' indicates if applicable loops should be bounded. */ -bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded) +bool wlc_dpc (struct wlc_info *wlc,bool bounded) {u32 macintstatus;struct wlc_hw_info *wlc_hw = wlc->hw;
@@ -2975,7 +2975,7 @@ bool wlc_intrsupd(struct wlc_info *wlc)* *wantdpc will be set to true if further wlc_dpc() processing is required, * false otherwise. */ -bool BCMFASTPATH wlc_isr(struct wlc_info *wlc, bool *wantdpc) +bool wlc_isr (struct wlc_info *wlc,bool *wantdpc) {struct wlc_hw_info *wlc_hw = wlc->hw;u32 macintstatus;
@@ -3004,7 +3004,7 @@ bool BCMFASTPATH wlc_isr(struct wlc_info *wlc, bool *wantdpc) } -static bool BCMFASTPATH +static bool wlc_bmac_dotxstatus (struct wlc_hw_info *wlc_hw,tx_status_t *txs,u32 s2) {/* discard intermediate indications for ucode with one legitimate case:
@@ -3023,7 +3023,7 @@ wlc_bmac_dotxstatus(struct wlc_hw_info *wlc_hw, tx_status_t *txs, u32 s2)/* process tx completion events in BMAC * Return true if more tx status need to be processed. false otherwise. */ -static bool BCMFASTPATH +static bool wlc_bmac_txstatus (struct wlc_hw_info *wlc_hw,bool bound,bool *fatal) {bool morepending = false;
@@ -3253,7 +3253,7 @@ void wlc_bmac_band_stf_ss_set(struct wlc_hw_info *wlc_hw, u8 stf_mode)wlc_upd_ofdm_pctl1_table (wlc_hw); } -void BCMFASTPATH +void wlc_bmac_read_tsf (struct wlc_hw_info *wlc_hw,u32 *tsf_l_ptr,u32 *tsf_h_ptr) {
drivers/staging/brcm80211/brcmsmac/wlc_main.c +20 -20
@@ -243,7 +243,7 @@ static const u8 acbitmap2maxprio[] = {#define WLC_REPLAY_CNTRS_VALUE WPA_CAP_16_REPLAY_CNTRS/* local prototypes */ -static u16 BCMFASTPATH wlc_d11hdrs_mac80211(struct wlc_info *wlc, +static u16 wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw, struct sk_buff *p, struct scb *scb, uint frag,
@@ -4818,13 +4818,13 @@ static u16 wlc_rate_shm_offset(struct wlc_info *wlc, u8 rate)* * Returns true if packet consumed (queued), false if not. */ -bool BCMFASTPATH +bool wlc_prec_enq (struct wlc_info *wlc,struct pktq *q,void *pkt,int prec) {return wlc_prec_enq_head (wlc, q, pkt, prec, false); } -bool BCMFASTPATH +bool wlc_prec_enq_head (struct wlc_info *wlc,struct pktq *q,struct sk_buff *pkt,int prec,bool head) {
@@ -4880,7 +4880,7 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt,return true; } -void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu, +void wlc_txq_enq (void *ctx,struct scb *scb,struct sk_buff *sdu,uint prec) {struct wlc_info *wlc = (struct wlc_info *) ctx;
@@ -4921,7 +4921,7 @@ void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu, } } -bool BCMFASTPATH +bool wlc_sendpkt_mac80211 (struct wlc_info *wlc,struct sk_buff *sdu,struct ieee80211_hw *hw) {
@@ -4946,7 +4946,7 @@ wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu,return 0 ; } -void BCMFASTPATH wlc_send_q(struct wlc_info *wlc) +void wlc_send_q (struct wlc_info *wlc) {struct sk_buff *pkt[DOT11_MAXNUMFRAGS ];int prec;
@@ -5033,7 +5033,7 @@ bcmc_fid_generate(struct wlc_info *wlc, struct wlc_bsscfg *bsscfg,return frameid; } -void BCMFASTPATH +void wlc_txfifo (struct wlc_info *wlc,uint fifo,struct sk_buff *p,bool commit,s8 txpktpend) {
@@ -5116,7 +5116,7 @@ wlc_compute_airtime(struct wlc_info *wlc, ratespec_t rspec, uint length)return usec; } -void BCMFASTPATH +void wlc_compute_plcp (struct wlc_info *wlc,ratespec_t rspec,uint length,u8 *plcp) {if (IS_MCS (rspec)) {
@@ -5144,7 +5144,7 @@ static void wlc_compute_mimo_plcp(ratespec_t rspec, uint length, u8 *plcp) }/* Rate: 802.11 rate code, length: PSDU length in octets */ -static void BCMFASTPATH +static void wlc_compute_ofdm_plcp (ratespec_t rspec,u32 length,u8 *plcp) {u8 rate_signal;
@@ -5236,7 +5236,7 @@ static void wlc_compute_cck_plcp(struct wlc_info *wlc, ratespec_t rspec,* next_frag_len next MPDU length in bytes * preamble_type use short/GF or long/MM PLCP header */ -static u16 BCMFASTPATH +static u16 wlc_compute_frame_dur (struct wlc_info *wlc,ratespec_t rate,u8 preamble_type,uint next_frag_len) {
@@ -5270,7 +5270,7 @@ wlc_compute_frame_dur(struct wlc_info *wlc, ratespec_t rate, u8 preamble_type,* rate next MPDU rate in unit of 500kbps * frame_len next MPDU frame length in bytes */ -u16 BCMFASTPATH +u16 wlc_compute_rtscts_dur (struct wlc_info *wlc,bool cts_only,ratespec_t rts_rate,ratespec_t frame_rate,u8 rts_preamble_type,u8 frame_preamble_type,uint frame_len,bool ba)
@@ -5302,7 +5302,7 @@ wlc_compute_rtscts_dur(struct wlc_info *wlc, bool cts_only, ratespec_t rts_rate,return dur; } -u16 BCMFASTPATH wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec) +u16 wlc_phytxctl1_calc (struct wlc_info *wlc,ratespec_t rspec) {u16 phyctl1 =0 ;u16 bw;
@@ -5348,7 +5348,7 @@ u16 BCMFASTPATH wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec)return phyctl1; } -ratespec_t BCMFASTPATH +ratespec_t wlc_rspec_to_rts_rspec (struct wlc_info *wlc,ratespec_t rspec,bool use_rspec,u16 mimo_ctlchbw) {
@@ -5404,7 +5404,7 @@ wlc_rspec_to_rts_rspec(struct wlc_info *wlc, ratespec_t rspec, bool use_rspec,* headroom == D11_PHY_HDR_LEN + D11_TXH_LEN (D11_TXH_LEN is now 104 bytes) * */ -static u16 BCMFASTPATH +static u16 wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw, struct sk_buff *p, struct scb *scb, uint frag, uint nfrags, uint queue, uint next_frag_len,
@@ -6197,7 +6197,7 @@ static void wlc_war16165(struct wlc_info *wlc, bool tx)/* process an individual tx_status_t */ /* WLC_HIGH_API */ -bool BCMFASTPATH +bool wlc_dotxstatus (struct wlc_info *wlc,tx_status_t *txs,u32 frm_tx2) {struct sk_buff *p;
@@ -6355,7 +6355,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2) } -void BCMFASTPATH +void wlc_txfifo_complete (struct wlc_info *wlc,uint fifo,s8 txpktpend) {TXPKTPENDDEC (wlc, fifo, txpktpend);
@@ -6660,7 +6660,7 @@ void wlc_bss_list_free(struct wlc_info *wlc, struct wlc_bss_list *bss_list)* Param 'bound' indicates max. # frames to process before break out. */ /* WLC_HIGH_API */ -void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p) +void wlc_recv (struct wlc_info *wlc,struct sk_buff *p) {d11rxhdr_t *rxh;struct ieee80211_hdr *h;
@@ -6759,7 +6759,7 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)* Formula given by HT PHY Spec v 1.13 * len = 3(nsyms + nstream + 3) - 3 */ -u16 BCMFASTPATH +u16 wlc_calc_lsig_len (struct wlc_info *wlc,ratespec_t ratespec,uint mac_len) {uint nsyms, len =0 , kNdps;
@@ -6799,7 +6799,7 @@ wlc_calc_lsig_len(struct wlc_info *wlc, ratespec_t ratespec, uint mac_len) }/* calculate frame duration of a given rate and length, return time in usec unit */ -uint BCMFASTPATH +uint wlc_calc_frame_time (struct wlc_info *wlc,ratespec_t ratespec,u8 preamble_type,uint mac_len) {
@@ -6929,7 +6929,7 @@ wlc_calc_ba_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type) FCS_LEN)); } -static uint BCMFASTPATH +static uint wlc_calc_ack_time (struct wlc_info *wlc,ratespec_t rspec,u8 preamble_type) {uint dur =0 ;
drivers/staging/brcm80211/brcmsmac/wlc_rate.c +2 -2
@@ -332,7 +332,7 @@ wlc_rate_hwrs_filter_sort_validate(wlc_rateset_t *rs, }/* calculate the rate of a rx'd frame and return it as a ratespec */ -ratespec_t BCMFASTPATH wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp) +ratespec_t wlc_compute_rspec (d11rxhdr_t *rxh,u8 *plcp) {int phy_type;ratespec_t rspec =PHY_TXC1_BW_20MHZ <<RSPEC_BW_SHIFT ;
@@ -466,7 +466,7 @@ wlc_rateset_default(wlc_rateset_t *rs_tgt, const wlc_rateset_t *rs_hw, mcsallow ? txstreams : 1); } -s16 BCMFASTPATH wlc_rate_legacy_phyctl(uint rate) +s16 wlc_rate_legacy_phyctl (uint rate) {uint i;for (i =0 ; i <LEGACY_PHYCFG_TABLE_SIZE ; i++)
drivers/staging/brcm80211/include/bcmdefs.h +0 -2
@@ -36,8 +36,6 @@#define AUTO (-1)/* Auto = -1 */ -#define BCMFASTPATH -/* Bus types */ #define SI_BUS 0/* SOC Interconnect */ #define PCI_BUS 1/* PCI target */
drivers/staging/brcm80211/util/bcmutils.c +8 -8
@@ -32,7 +32,7 @@/* Global ASSERT type flag */ u32 g_assert_type; -struct sk_buff *BCMFASTPATH pkt_buf_get_skb(uint len) +struct sk_buff *pkt_buf_get_skb (uint len) {struct sk_buff *skb;
@@ -46,7 +46,7 @@ struct sk_buff *BCMFASTPATH pkt_buf_get_skb(uint len) }/* Free the driver packet. Free the tag if present */ -void BCMFASTPATH pkt_buf_free_skb(struct sk_buff *skb) +void pkt_buf_free_skb (struct sk_buff *skb) {struct sk_buff *nskb;int nest =0 ;
@@ -101,7 +101,7 @@ uint pktfrombuf(struct sk_buff *p, uint offset, int len,return ret; }/* return total length of buffer chain */ -uint BCMFASTPATH pkttotlen(struct sk_buff *p) +uint pkttotlen (struct sk_buff *p) {uint total;
@@ -115,7 +115,7 @@ uint BCMFASTPATH pkttotlen(struct sk_buff *p)* osl multiple-precedence packet queue * hi_prec is always >= the number of the highest non-empty precedence */ -struct sk_buff *BCMFASTPATH pktq_penq(struct pktq *pq, int prec, +struct sk_buff *pktq_penq (struct pktq *pq,int prec,struct sk_buff *p) {struct pktq_prec *q;
@@ -141,7 +141,7 @@ struct sk_buff *BCMFASTPATH pktq_penq(struct pktq *pq, int prec,return p; } -struct sk_buff *BCMFASTPATH pktq_penq_head(struct pktq *pq, int prec, +struct sk_buff *pktq_penq_head (struct pktq *pq,int prec,struct sk_buff *p) {struct pktq_prec *q;
@@ -166,7 +166,7 @@ struct sk_buff *BCMFASTPATH pktq_penq_head(struct pktq *pq, int prec,return p; } -struct sk_buff *BCMFASTPATH pktq_pdeq(struct pktq *pq, int prec) +struct sk_buff *pktq_pdeq (struct pktq *pq,int prec) {struct pktq_prec *q;struct sk_buff *p;
@@ -190,7 +190,7 @@ struct sk_buff *BCMFASTPATH pktq_pdeq(struct pktq *pq, int prec)return p; } -struct sk_buff *BCMFASTPATH pktq_pdeq_tail(struct pktq *pq, int prec) +struct sk_buff *pktq_pdeq_tail (struct pktq *pq,int prec) {struct pktq_prec *q;struct sk_buff *p, *prev;
@@ -331,7 +331,7 @@ int pktq_mlen(struct pktq *pq, uint prec_bmp)return len; }/* Priority dequeue from a specific set of precedences */ -struct sk_buff *BCMFASTPATH pktq_mdeq(struct pktq *pq, uint prec_bmp, +struct sk_buff *pktq_mdeq (struct pktq *pq,uint prec_bmp,int *prec_out) {struct pktq_prec *q;
drivers/staging/brcm80211/util/hnddma.c +7 -7
@@ -700,7 +700,7 @@ _dma_rx_param_get(dma_info_t *di, u16 *rxoffset, u16 *rxbufsize)* After it reaches the max size of buffer, the data continues in next DMA descriptor * buffer WITHOUT DMA header */ -static void *BCMFASTPATH _dma_rx(dma_info_t *di) +static void *_dma_rx (dma_info_t *di) {struct sk_buff *p, *head, *tail;uint len;
@@ -761,7 +761,7 @@ static void *BCMFASTPATH _dma_rx(dma_info_t *di)* this will stall the rx dma and user might want to call rxfill again asap * This unlikely happens on memory-rich NIC, but often on memory-constrained dongle */ -static bool BCMFASTPATH _dma_rxfill(dma_info_t *di) +static bool _dma_rxfill (dma_info_t *di) {struct sk_buff *p;u16 rxin, rxout;
@@ -896,7 +896,7 @@ static void _dma_rxreclaim(dma_info_t *di)pkt_buf_free_skb (p); } -static void *BCMFASTPATH _dma_getnextrxp(dma_info_t *di, bool forceall) +static void *_dma_getnextrxp (dma_info_t *di,bool forceall) {if (di->nrxd ==0 )return NULL ;
@@ -1111,7 +1111,7 @@ static bool dma64_txsuspended(dma_info_t *di) D64_XC_SE); } -static void BCMFASTPATH dma64_txreclaim(dma_info_t *di, txd_range_t range) +static void dma64_txreclaim (dma_info_t *di,txd_range_t range) {void *p;
@@ -1358,7 +1358,7 @@ static int dma64_txunframed(dma_info_t *di, void *buf, uint len, bool commit)* WARNING: call must check the return value for error. * the error(toss frames) could be fatal and cause many subsequent hard to debug problems */ -static int BCMFASTPATH dma64_txfast(dma_info_t *di, struct sk_buff *p0, +static int dma64_txfast (dma_info_t *di,struct sk_buff *p0,bool commit) {struct sk_buff *p, *next;
@@ -1480,7 +1480,7 @@ static int BCMFASTPATH dma64_txfast(dma_info_t *di, struct sk_buff *p0,* If range is HNDDMA_RANGE_ALL, reclaim all txd(s) posted to the ring and * return associated packet regardless of the value of hardware pointers. */ -static void *BCMFASTPATH dma64_getnexttxp(dma_info_t *di, txd_range_t range) +static void *dma64_getnexttxp (dma_info_t *di,txd_range_t range) {u16 start, end, i;u16 active_desc;
@@ -1573,7 +1573,7 @@ static void *BCMFASTPATH dma64_getnexttxp(dma_info_t *di, txd_range_t range) }/* if forcing, dma engine must be disabled */ -static void *BCMFASTPATH dma64_getnextrxp(dma_info_t *di, bool forceall) +static void *dma64_getnextrxp (dma_info_t *di,bool forceall) {uint i, curr;void *rxp;
Signature · 1 line
1.7.1