}
#ifndef ABS
-#define ABS(a) (((a) < 0)? -(a):(a))
+#define ABS(a) (((a) < 0) ? -(a):(a))
#endif /* ABS */
#ifndef MIN
-#define MIN(a, b) (((a) < (b))?(a):(b))
+#define MIN(a, b) (((a) < (b)) ? (a):(b))
#endif /* MIN */
#ifndef MAX
-#define MAX(a, b) (((a) > (b))?(a):(b))
+#define MAX(a, b) (((a) > (b)) ? (a):(b))
#endif /* MAX */
#define CEIL(x, y) (((x) + ((y)-1)) / (y))
static INLINE uint32 find_msbit(uint32 x)
{
uint msbit;
- __asm__("bsrl %1,%0":"=r"(msbit)
+ __asm__("bsrl %1,%0" : "=r"(msbit)
: "r"(x));
return msbit;
}
#define LCNPHY_IQLOCC_READ(val) ((uint8)(-(int8)(((val) & 0xf0) >> 4) + (int8)((val) & 0x0f)))
#define FIXED_TXPWR 78
-#define LCNPHY_TEMPSENSE(val) ((int16)((val > 255)?(val - 512):val))
+#define LCNPHY_TEMPSENSE(val) ((int16)((val > 255) ? (val - 512) : val))
static uint32 wlc_lcnphy_qdiv_roundup(uint32 divident, uint32 divisor,
uint8 precision);
static struct pci_driver wl_pci_driver = {
name: "brcm80211",
- probe:wl_pci_probe,
+ probe: wl_pci_probe,
#ifdef LINUXSTA_PS
- suspend:wl_suspend,
- resume:wl_resume,
+ suspend: wl_suspend,
+ resume: wl_resume,
#endif /* LINUXSTA_PS */
- remove:__devexit_p(wl_remove),
- id_table:wl_id_table,
+ remove: __devexit_p(wl_remove),
+ id_table: wl_id_table,
};
#endif /* !BCMSDIO */
/* macro to get 5 GHz channel group index for tx power */
#define CHANNEL_POWER_IDX_5G(c) \
- (((c) < 52) ? 0 : (((c) < 62) ? 1 :(((c) < 100) ? 2 : (((c) < 149) ? 3 : 4))))
+ (((c) < 52) ? 0 : (((c) < 62) ? 1 : (((c) < 100) ? 2 : (((c) < 149) ? 3 : 4))))
#define WLC_MAXPWR_TBL_SIZE 6 /* max of BAND_5G_PWR_LVLS and 6 for 2.4 GHz */
#define WLC_MAXPWR_MIMO_TBL_SIZE 14 /* max of BAND_5G_PWR_LVLS and 14 for 2.4 GHz */
};
#define CHANNEL_BANDUNIT(wlc, ch) (((ch) <= CH_MAX_2G_CHANNEL) ? BAND_2G_INDEX : BAND_5G_INDEX)
-#define OTHERBANDUNIT(wlc) ((uint)((wlc)->band->bandunit? BAND_2G_INDEX : BAND_5G_INDEX))
+#define OTHERBANDUNIT(wlc) ((uint)((wlc)->band->bandunit ? BAND_2G_INDEX : BAND_5G_INDEX))
#define IS_MBAND_UNLOCKED(wlc) \
((NBANDS(wlc) > 1) && !(wlc)->bandlocked)
#define WLPKTFLAG_RIFS(pkttag) ((pkttag)->flags & WLF_RIFS)
/* API for accessing BSSCFG index in WLPKTTAG */
-#define BSSCFGIDX_ISVALID(bsscfgidx) (((bsscfgidx >= 0)&&(bsscfgidx < WLC_MAXBSSCFG)) ? 1 : 0)
+#define BSSCFGIDX_ISVALID(bsscfgidx) (((bsscfgidx >= 0) && (bsscfgidx < WLC_MAXBSSCFG)) ? 1 : 0)
static INLINE int8 wlc_pkttag_bsscfg_get(void *p)
{