Commit 419ad34e authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: reformat long lines in brcmsmac to 80 columns

Linux coding style strongly suggest to limit length of source lines
to 80 characters. This commit correct this for the brcmsmac sources.
Reviewed-by: default avatarHenry Ptasinski <henryp@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7cdac4ff
...@@ -242,16 +242,23 @@ ...@@ -242,16 +242,23 @@
#define SRC_PRESENT 0x00000001 #define SRC_PRESENT 0x00000001
/* 4330 chip-specific ChipStatus register bits */ /* 4330 chip-specific ChipStatus register bits */
#define CST4330_CHIPMODE_SDIOD(cs) (((cs) & 0x7) < 6) /* SDIO || gSPI */ /* SDIO || gSPI */
#define CST4330_CHIPMODE_USB20D(cs) (((cs) & 0x7) >= 6) /* USB || USBDA */ #define CST4330_CHIPMODE_SDIOD(cs) (((cs) & 0x7) < 6)
#define CST4330_CHIPMODE_SDIO(cs) (((cs) & 0x4) == 0) /* SDIO */ /* USB || USBDA */
#define CST4330_CHIPMODE_GSPI(cs) (((cs) & 0x6) == 4) /* gSPI */ #define CST4330_CHIPMODE_USB20D(cs) (((cs) & 0x7) >= 6)
#define CST4330_CHIPMODE_USB(cs) (((cs) & 0x7) == 6) /* USB packet-oriented */ /* SDIO */
#define CST4330_CHIPMODE_USBDA(cs) (((cs) & 0x7) == 7) /* USB Direct Access */ #define CST4330_CHIPMODE_SDIO(cs) (((cs) & 0x4) == 0)
/* gSPI */
#define CST4330_CHIPMODE_GSPI(cs) (((cs) & 0x6) == 4)
/* USB packet-oriented */
#define CST4330_CHIPMODE_USB(cs) (((cs) & 0x7) == 6)
/* USB Direct Access */
#define CST4330_CHIPMODE_USBDA(cs) (((cs) & 0x7) == 7)
#define CST4330_OTP_PRESENT 0x00000010 #define CST4330_OTP_PRESENT 0x00000010
#define CST4330_LPO_AUTODET_EN 0x00000020 #define CST4330_LPO_AUTODET_EN 0x00000020
#define CST4330_ARMREMAP_0 0x00000040 #define CST4330_ARMREMAP_0 0x00000040
#define CST4330_SPROM_PRESENT 0x00000080 /* takes priority over OTP if both set */ /* takes priority over OTP if both set */
#define CST4330_SPROM_PRESENT 0x00000080
#define CST4330_ILPDIV_EN 0x00000100 #define CST4330_ILPDIV_EN 0x00000100
#define CST4330_LPO_SEL 0x00000200 #define CST4330_LPO_SEL 0x00000200
#define CST4330_RES_INIT_MODE_SHIFT 10 #define CST4330_RES_INIT_MODE_SHIFT 10
......
This diff is collapsed.
...@@ -259,7 +259,10 @@ static u8 brcms_c_antsel_id2antcfg(struct antsel_info *asi, u8 id) ...@@ -259,7 +259,10 @@ static u8 brcms_c_antsel_id2antcfg(struct antsel_info *asi, u8 id)
return antcfg; return antcfg;
} }
/* boardlevel antenna selection: convert ant_cfg to mimo_antsel (ucode interface) */ /*
* boardlevel antenna selection:
* convert ant_cfg to mimo_antsel (ucode interface)
*/
static u16 brcms_c_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg) static u16 brcms_c_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg)
{ {
u8 idx = BRCMS_ANTIDX_11N(BRCMS_ANTSEL_11N(ant_cfg)); u8 idx = BRCMS_ANTIDX_11N(BRCMS_ANTSEL_11N(ant_cfg));
...@@ -293,7 +296,10 @@ static int brcms_c_antsel_cfgupd(struct antsel_info *asi, ...@@ -293,7 +296,10 @@ static int brcms_c_antsel_cfgupd(struct antsel_info *asi,
ant_cfg = antsel->ant_config[ANT_SELCFG_TX_DEF]; ant_cfg = antsel->ant_config[ANT_SELCFG_TX_DEF];
mimo_antsel = brcms_c_antsel_antcfg2antsel(asi, ant_cfg); mimo_antsel = brcms_c_antsel_antcfg2antsel(asi, ant_cfg);
brcms_c_write_shm(wlc, M_MIMO_ANTSEL_TXDFLT, mimo_antsel); brcms_c_write_shm(wlc, M_MIMO_ANTSEL_TXDFLT, mimo_antsel);
/* Update driver stats for currently selected default tx/rx antenna config */ /*
* Update driver stats for currently selected
* default tx/rx antenna config
*/
asi->antcfg_cur.ant_config[ANT_SELCFG_TX_DEF] = ant_cfg; asi->antcfg_cur.ant_config[ANT_SELCFG_TX_DEF] = ant_cfg;
/* 2) Update RX antconfig for all frames that are not unicast data /* 2) Update RX antconfig for all frames that are not unicast data
...@@ -302,7 +308,10 @@ static int brcms_c_antsel_cfgupd(struct antsel_info *asi, ...@@ -302,7 +308,10 @@ static int brcms_c_antsel_cfgupd(struct antsel_info *asi,
ant_cfg = antsel->ant_config[ANT_SELCFG_RX_DEF]; ant_cfg = antsel->ant_config[ANT_SELCFG_RX_DEF];
mimo_antsel = brcms_c_antsel_antcfg2antsel(asi, ant_cfg); mimo_antsel = brcms_c_antsel_antcfg2antsel(asi, ant_cfg);
brcms_c_write_shm(wlc, M_MIMO_ANTSEL_RXDFLT, mimo_antsel); brcms_c_write_shm(wlc, M_MIMO_ANTSEL_RXDFLT, mimo_antsel);
/* Update driver stats for currently selected default tx/rx antenna config */ /*
* Update driver stats for currently selected
* default tx/rx antenna config
*/
asi->antcfg_cur.ant_config[ANT_SELCFG_RX_DEF] = ant_cfg; asi->antcfg_cur.ant_config[ANT_SELCFG_RX_DEF] = ant_cfg;
return 0; return 0;
......
...@@ -40,12 +40,14 @@ ...@@ -40,12 +40,14 @@
*/ */
/* macro to get 2.4 GHz channel group index for tx power */ /* macro to get 2.4 GHz channel group index for tx power */
#define CHANNEL_POWER_IDX_2G_CCK(c) (((c) < 2) ? 0 : (((c) < 11) ? 1 : 2)) /* cck index */ #define CHANNEL_POWER_IDX_2G_CCK(c) (((c) < 2) ? 0 : (((c) < 11) ? 1 : 2))
#define CHANNEL_POWER_IDX_2G_OFDM(c) (((c) < 2) ? 3 : (((c) < 11) ? 4 : 5)) /* ofdm index */ #define CHANNEL_POWER_IDX_2G_OFDM(c) (((c) < 2) ? 3 : (((c) < 11) ? 4 : 5))
/* macro to get 5 GHz channel group index for tx power */ /* macro to get 5 GHz channel group index for tx power */
#define CHANNEL_POWER_IDX_5G(c) \ #define CHANNEL_POWER_IDX_5G(c) (((c) < 52) ? 0 : \
(((c) < 52) ? 0 : (((c) < 62) ? 1 : (((c) < 100) ? 2 : (((c) < 149) ? 3 : 4)))) (((c) < 62) ? 1 : \
(((c) < 100) ? 2 : \
(((c) < 149) ? 3 : 4))))
/* max of BAND_5G_PWR_LVLS and 6 for 2.4 GHz */ /* max of BAND_5G_PWR_LVLS and 6 for 2.4 GHz */
#define BRCMS_MAXPWR_TBL_SIZE 6 #define BRCMS_MAXPWR_TBL_SIZE 6
...@@ -67,9 +69,8 @@ struct locale_info { ...@@ -67,9 +69,8 @@ struct locale_info {
u8 restricted_channels; u8 restricted_channels;
/* Max tx pwr in qdBm for each sub-band */ /* Max tx pwr in qdBm for each sub-band */
s8 maxpwr[BRCMS_MAXPWR_TBL_SIZE]; s8 maxpwr[BRCMS_MAXPWR_TBL_SIZE];
s8 pub_maxpwr[BAND_5G_PWR_LVLS]; /* Country IE advertised max tx pwr in dBm /* Country IE advertised max tx pwr in dBm per sub-band */
* per sub-band s8 pub_maxpwr[BAND_5G_PWR_LVLS];
*/
u8 flags; u8 flags;
}; };
......
This diff is collapsed.
This diff is collapsed.
...@@ -39,12 +39,12 @@ struct dma32diag { /* diag access */ ...@@ -39,12 +39,12 @@ struct dma32diag { /* diag access */
/* dma registers per channel(xmt or rcv) */ /* dma registers per channel(xmt or rcv) */
struct dma64regs { struct dma64regs {
u32 control; /* enable, et al */ u32 control; /* enable, et al */
u32 ptr; /* last descriptor posted to chip */ u32 ptr; /* last descriptor posted to chip */
u32 addrlow; /* descriptor ring base address low 32-bits (8K aligned) */ u32 addrlow; /* desc ring base address low 32-bits (8K aligned) */
u32 addrhigh; /* descriptor ring base address bits 63:32 (8K aligned) */ u32 addrhigh; /* desc ring base address bits 63:32 (8K aligned) */
u32 status0; /* current descriptor, xmt state */ u32 status0; /* current descriptor, xmt state */
u32 status1; /* active descriptor, xmt error */ u32 status1; /* active descriptor, xmt error */
}; };
/* map/unmap direction */ /* map/unmap direction */
...@@ -172,7 +172,8 @@ extern const struct di_fcn_s dma64proc; ...@@ -172,7 +172,8 @@ extern const struct di_fcn_s dma64proc;
#define dma_rxactive(di) (dma64proc.rxactive(di)) #define dma_rxactive(di) (dma64proc.rxactive(di))
#define dma_txrotate(di) (dma64proc.txrotate(di)) #define dma_txrotate(di) (dma64proc.txrotate(di))
#define dma_counterreset(di) (dma64proc.counterreset(di)) #define dma_counterreset(di) (dma64proc.counterreset(di))
#define dma_ctrlflags(di, mask, flags) (dma64proc.ctrlflags((di), (mask), (flags))) #define dma_ctrlflags(di, mask, flags) \
(dma64proc.ctrlflags((di), (mask), (flags)))
#define dma_txpending(di) (dma64proc.txpending(di)) #define dma_txpending(di) (dma64proc.txpending(di))
#define dma_txcommitted(di) (dma64proc.txcommitted(di)) #define dma_txcommitted(di) (dma64proc.txcommitted(di))
......
...@@ -606,7 +606,10 @@ brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -606,7 +606,10 @@ brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_20 |
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_40MHZ_INTOLERANT; IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_40MHZ_INTOLERANT;
/* minstrel_ht initiates addBA on our behalf by calling ieee80211_start_tx_ba_session() */ /*
* minstrel_ht initiates addBA on our behalf by calling
* ieee80211_start_tx_ba_session()
*/
return 0; return 0;
} }
...@@ -644,7 +647,10 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw, ...@@ -644,7 +647,10 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw,
tid); tid);
return -EINVAL; return -EINVAL;
} }
/* Future improvement: Use the starting sequence number provided ... */ /*
* Future improvement:
* Use the starting sequence number provided ...
*/
*ssn = 0; *ssn = 0;
ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
break; break;
...@@ -1019,8 +1025,9 @@ static struct ieee80211_supported_band brcms_band_5GHz_nphy = { ...@@ -1019,8 +1025,9 @@ static struct ieee80211_supported_band brcms_band_5GHz_nphy = {
.bitrates = legacy_ratetable + 4, .bitrates = legacy_ratetable + 4,
.n_bitrates = ARRAY_SIZE(legacy_ratetable) - 4, .n_bitrates = ARRAY_SIZE(legacy_ratetable) - 4,
.ht_cap = { .ht_cap = {
/* use IEEE80211_HT_CAP_* from include/linux/ieee80211.h */ .cap = IEEE80211_HT_CAP_GRN_FLD | IEEE80211_HT_CAP_SGI_20 |
.cap = IEEE80211_HT_CAP_GRN_FLD | IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_40MHZ_INTOLERANT, /* No 40 mhz yet */ IEEE80211_HT_CAP_SGI_40 |
IEEE80211_HT_CAP_40MHZ_INTOLERANT, /* No 40 mhz yet */
.ht_supported = true, .ht_supported = true,
.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K, .ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K,
.ampdu_density = AMPDU_DEF_MPDU_DENSITY, .ampdu_density = AMPDU_DEF_MPDU_DENSITY,
...@@ -1086,7 +1093,8 @@ static int ieee_hw_init(struct ieee80211_hw *hw) ...@@ -1086,7 +1093,8 @@ static int ieee_hw_init(struct ieee80211_hw *hw)
hw->queues = N_TX_QUEUES; hw->queues = N_TX_QUEUES;
hw->max_rates = 2; /* Primary rate and 1 fallback rate */ hw->max_rates = 2; /* Primary rate and 1 fallback rate */
hw->channel_change_time = 7 * 1000; /* channel change time is dependent on chip and band */ /* channel change time is dependent on chip and band */
hw->channel_change_time = 7 * 1000;
hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
hw->rate_control_algorithm = "minstrel_ht"; hw->rate_control_algorithm = "minstrel_ht";
...@@ -1361,8 +1369,9 @@ static void brcms_free(struct brcms_info *wl) ...@@ -1361,8 +1369,9 @@ static void brcms_free(struct brcms_info *wl)
} }
/* /*
* unregister_netdev() calls get_stats() which may read chip registers * unregister_netdev() calls get_stats() which may read chip
* so we cannot unmap the chip registers until after calling unregister_netdev() . * registers so we cannot unmap the chip registers until
* after calling unregister_netdev() .
*/ */
if (wl->regsva && wl->bcm_bustype != SDIO_BUS && if (wl->regsva && wl->bcm_bustype != SDIO_BUS &&
wl->bcm_bustype != JTAG_BUS) wl->bcm_bustype != JTAG_BUS)
...@@ -1632,7 +1641,8 @@ struct brcms_timer *brcms_init_timer(struct brcms_info *wl, ...@@ -1632,7 +1641,8 @@ struct brcms_timer *brcms_init_timer(struct brcms_info *wl,
return t; return t;
} }
/* BMAC_NOTE: Add timer adds only the kernel timer since it's going to be more accurate /*
* adds only the kernel timer since it's going to be more accurate
* as well as it's easier to make it periodic * as well as it's easier to make it periodic
* *
* precondition: perimeter lock has been acquired * precondition: perimeter lock has been acquired
......
...@@ -23,11 +23,6 @@ ...@@ -23,11 +23,6 @@
/* softmac ioctl definitions */ /* softmac ioctl definitions */
#define BRCMS_SET_SHORTSLOT_OVERRIDE 146 #define BRCMS_SET_SHORTSLOT_OVERRIDE 146
/* BMAC Note: High-only driver is no longer working in softirq context as it needs to block and
* sleep so perimeter lock has to be a semaphore instead of spinlock. This requires timers to be
* submitted to workqueue instead of being on kernel timer
*/
struct brcms_timer { struct brcms_timer {
struct timer_list timer; struct timer_list timer;
struct brcms_info *wl; struct brcms_info *wl;
...@@ -56,8 +51,8 @@ struct brcms_firmware { ...@@ -56,8 +51,8 @@ struct brcms_firmware {
}; };
struct brcms_info { struct brcms_info {
struct brcms_pub *pub; /* pointer to public wlc state */ struct brcms_pub *pub; /* pointer to public wlc state */
void *wlc; /* pointer to private common os-independent data */ void *wlc; /* pointer to private common data */
u32 magic; u32 magic;
int irq; int irq;
......
This diff is collapsed.
This diff is collapsed.
...@@ -24,10 +24,14 @@ ...@@ -24,10 +24,14 @@
#define OTPS_GUP_MASK 0x00000f00 #define OTPS_GUP_MASK 0x00000f00
#define OTPS_GUP_SHIFT 8 #define OTPS_GUP_SHIFT 8
#define OTPS_GUP_HW 0x00000100 /* h/w subregion is programmed */ /* h/w subregion is programmed */
#define OTPS_GUP_SW 0x00000200 /* s/w subregion is programmed */ #define OTPS_GUP_HW 0x00000100
#define OTPS_GUP_CI 0x00000400 /* chipid/pkgopt subregion is programmed */ /* s/w subregion is programmed */
#define OTPS_GUP_FUSE 0x00000800 /* fuse subregion is programmed */ #define OTPS_GUP_SW 0x00000200
/* chipid/pkgopt subregion is programmed */
#define OTPS_GUP_CI 0x00000400
/* fuse subregion is programmed */
#define OTPS_GUP_FUSE 0x00000800
/* Fields in otpprog in rev >= 21 */ /* Fields in otpprog in rev >= 21 */
#define OTPP_COL_MASK 0x000000ff #define OTPP_COL_MASK 0x000000ff
...@@ -195,8 +199,9 @@ static u16 ipxotp_read_bit(void *oh, struct chipcregs *cc, uint off) ...@@ -195,8 +199,9 @@ static u16 ipxotp_read_bit(void *oh, struct chipcregs *cc, uint off)
return (int)st; return (int)st;
} }
/* Calculate max HW/SW region byte size by subtracting fuse region and checksum size, /*
* osizew is oi->wsize (OTP size - GU size) in words * Calculate max HW/SW region byte size by subtracting fuse region
* and checksum size, osizew is oi->wsize (OTP size - GU size) in words
*/ */
static int ipxotp_max_rgnsz(struct si_pub *sih, int osizew) static int ipxotp_max_rgnsz(struct si_pub *sih, int osizew)
{ {
...@@ -222,12 +227,18 @@ static void _ipxotp_init(struct otpinfo *oi, struct chipcregs *cc) ...@@ -222,12 +227,18 @@ static void _ipxotp_init(struct otpinfo *oi, struct chipcregs *cc)
uint k; uint k;
u32 otpp, st; u32 otpp, st;
/* record word offset of General Use Region for various chipcommon revs */ /*
* record word offset of General Use Region
* for various chipcommon revs
*/
if (oi->sih->ccrev == 21 || oi->sih->ccrev == 24 if (oi->sih->ccrev == 21 || oi->sih->ccrev == 24
|| oi->sih->ccrev == 27) { || oi->sih->ccrev == 27) {
oi->otpgu_base = REVA4_OTPGU_BASE; oi->otpgu_base = REVA4_OTPGU_BASE;
} else if (oi->sih->ccrev == 36) { } else if (oi->sih->ccrev == 36) {
/* OTP size greater than equal to 2KB (128 words), otpgu_base is similar to rev23 */ /*
* OTP size greater than equal to 2KB (128 words),
* otpgu_base is similar to rev23
*/
if (oi->wsize >= 128) if (oi->wsize >= 128)
oi->otpgu_base = REVB8_OTPGU_BASE; oi->otpgu_base = REVB8_OTPGU_BASE;
else else
...@@ -262,8 +273,9 @@ static void _ipxotp_init(struct otpinfo *oi, struct chipcregs *cc) ...@@ -262,8 +273,9 @@ static void _ipxotp_init(struct otpinfo *oi, struct chipcregs *cc)
} }
/* /*
* h/w region base and fuse region limit are fixed to the top and * h/w region base and fuse region limit are fixed to
* the bottom of the general use region. Everything else can be flexible. * the top and the bottom of the general use region.
* Everything else can be flexible.
*/ */
oi->hwbase = oi->otpgu_base + OTPGU_SROM_OFF; oi->hwbase = oi->otpgu_base + OTPGU_SROM_OFF;
oi->hwlim = oi->wsize; oi->hwlim = oi->wsize;
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#define OTP_SW_RGN 2 #define OTP_SW_RGN 2
#define OTP_CI_RGN 4 #define OTP_CI_RGN 4
#define OTP_FUSE_RGN 8 #define OTP_FUSE_RGN 8
#define OTP_ALL_RGN 0xf /* From h/w region to end of OTP including checksum */ /* From h/w region to end of OTP including checksum */
#define OTP_ALL_RGN 0xf
/* OTP Size */ /* OTP Size */
#define OTP_SZ_MAX (6144/8) /* maximum bytes in one CIS */ #define OTP_SZ_MAX (6144/8) /* maximum bytes in one CIS */
......
...@@ -15,10 +15,11 @@ ...@@ -15,10 +15,11 @@
*/ */
/* /*
* This is "two-way" interface, acting as the SHIM layer between WL and PHY layer. * This is "two-way" interface, acting as the SHIM layer between driver
* WL driver can optinally call this translation layer to do some preprocessing, then reach PHY. * and PHY layer. The driver can optionally call this translation layer
* On the PHY->WL driver direction, all calls go through this layer since PHY doesn't have the * to do some preprocessing, then reach PHY. On the PHY->driver direction,
* access to wlc_hw pointer. * all calls go through this layer since PHY doesn't have access to the
* driver's brcms_hardware pointer.
*/ */
#include <linux/slab.h> #include <linux/slab.h>
#include <net/mac80211.h> #include <net/mac80211.h>
......
...@@ -45,17 +45,17 @@ ...@@ -45,17 +45,17 @@
#define FRA_ERR_20MHZ 60 #define FRA_ERR_20MHZ 60
#define FRA_ERR_40MHZ 120 #define FRA_ERR_40MHZ 120
#define ANTSEL_NA 0 /* No boardlevel selection available */ #define ANTSEL_NA 0 /* No boardlevel selection available */
#define ANTSEL_2x4 1 /* 2x4 boardlevel selection available */ #define ANTSEL_2x4 1 /* 2x4 boardlevel selection available */
#define ANTSEL_2x3 2 /* 2x3 CB2 boardlevel selection available */ #define ANTSEL_2x3 2 /* 2x3 CB2 boardlevel selection available */
/* Rx Antenna diversity control values */ /* Rx Antenna diversity control values */
#define ANT_RX_DIV_FORCE_0 0 /* Use antenna 0 */ #define ANT_RX_DIV_FORCE_0 0 /* Use antenna 0 */
#define ANT_RX_DIV_FORCE_1 1 /* Use antenna 1 */ #define ANT_RX_DIV_FORCE_1 1 /* Use antenna 1 */
#define ANT_RX_DIV_START_1 2 /* Choose starting with 1 */ #define ANT_RX_DIV_START_1 2 /* Choose starting with 1 */
#define ANT_RX_DIV_START_0 3 /* Choose starting with 0 */ #define ANT_RX_DIV_START_0 3 /* Choose starting with 0 */
#define ANT_RX_DIV_ENABLE 3 /* APHY bbConfig Enable RX Diversity */ #define ANT_RX_DIV_ENABLE 3 /* APHY bbConfig Enable RX Diversity */
#define ANT_RX_DIV_DEF ANT_RX_DIV_START_0 /* default antdiv setting */ #define ANT_RX_DIV_DEF ANT_RX_DIV_START_0 /* default antdiv setting */
#define WL_ANT_RX_MAX 2 /* max 2 receive antennas */ #define WL_ANT_RX_MAX 2 /* max 2 receive antennas */
#define WL_ANT_HT_RX_MAX 3 /* max 3 receive antennas/cores */ #define WL_ANT_HT_RX_MAX 3 /* max 3 receive antennas/cores */
...@@ -77,26 +77,40 @@ ...@@ -77,26 +77,40 @@
#define WL_TX_POWER_RATES 101 #define WL_TX_POWER_RATES 101
#define WL_TX_POWER_CCK_FIRST 0 #define WL_TX_POWER_CCK_FIRST 0
#define WL_TX_POWER_CCK_NUM 4 #define WL_TX_POWER_CCK_NUM 4
#define WL_TX_POWER_OFDM_FIRST 4 /* Index for first 20MHz OFDM SISO rate */ /* Index for first 20MHz OFDM SISO rate */
#define WL_TX_POWER_OFDM20_CDD_FIRST 12 /* Index for first 20MHz OFDM CDD rate */ #define WL_TX_POWER_OFDM_FIRST 4
#define WL_TX_POWER_OFDM40_SISO_FIRST 52 /* Index for first 40MHz OFDM SISO rate */ /* Index for first 20MHz OFDM CDD rate */
#define WL_TX_POWER_OFDM40_CDD_FIRST 60 /* Index for first 40MHz OFDM CDD rate */ #define WL_TX_POWER_OFDM20_CDD_FIRST 12
/* Index for first 40MHz OFDM SISO rate */
#define WL_TX_POWER_OFDM40_SISO_FIRST 52
/* Index for first 40MHz OFDM CDD rate */
#define WL_TX_POWER_OFDM40_CDD_FIRST 60
#define WL_TX_POWER_OFDM_NUM 8 #define WL_TX_POWER_OFDM_NUM 8
#define WL_TX_POWER_MCS20_SISO_FIRST 20 /* Index for first 20MHz MCS SISO rate */ /* Index for first 20MHz MCS SISO rate */
#define WL_TX_POWER_MCS20_CDD_FIRST 28 /* Index for first 20MHz MCS CDD rate */ #define WL_TX_POWER_MCS20_SISO_FIRST 20
#define WL_TX_POWER_MCS20_STBC_FIRST 36 /* Index for first 20MHz MCS STBC rate */ /* Index for first 20MHz MCS CDD rate */
#define WL_TX_POWER_MCS20_SDM_FIRST 44 /* Index for first 20MHz MCS SDM rate */ #define WL_TX_POWER_MCS20_CDD_FIRST 28
#define WL_TX_POWER_MCS40_SISO_FIRST 68 /* Index for first 40MHz MCS SISO rate */ /* Index for first 20MHz MCS STBC rate */
#define WL_TX_POWER_MCS40_CDD_FIRST 76 /* Index for first 40MHz MCS CDD rate */ #define WL_TX_POWER_MCS20_STBC_FIRST 36
#define WL_TX_POWER_MCS40_STBC_FIRST 84 /* Index for first 40MHz MCS STBC rate */ /* Index for first 20MHz MCS SDM rate */
#define WL_TX_POWER_MCS40_SDM_FIRST 92 /* Index for first 40MHz MCS SDM rate */ #define WL_TX_POWER_MCS20_SDM_FIRST 44
/* Index for first 40MHz MCS SISO rate */
#define WL_TX_POWER_MCS40_SISO_FIRST 68
/* Index for first 40MHz MCS CDD rate */
#define WL_TX_POWER_MCS40_CDD_FIRST 76
/* Index for first 40MHz MCS STBC rate */
#define WL_TX_POWER_MCS40_STBC_FIRST 84
/* Index for first 40MHz MCS SDM rate */
#define WL_TX_POWER_MCS40_SDM_FIRST 92
#define WL_TX_POWER_MCS_1_STREAM_NUM 8 #define WL_TX_POWER_MCS_1_STREAM_NUM 8
#define WL_TX_POWER_MCS_2_STREAM_NUM 8 #define WL_TX_POWER_MCS_2_STREAM_NUM 8
#define WL_TX_POWER_MCS_32 100 /* Index for 40MHz rate MCS 32 */ /* Index for 40MHz rate MCS 32 */
#define WL_TX_POWER_MCS_32 100
#define WL_TX_POWER_MCS_32_NUM 1 #define WL_TX_POWER_MCS_32_NUM 1
/* sslpnphy specifics */ /* sslpnphy specifics */
#define WL_TX_POWER_MCS20_SISO_FIRST_SSN 12 /* Index for first 20MHz MCS SISO rate */ /* Index for first 20MHz MCS SISO rate */
#define WL_TX_POWER_MCS20_SISO_FIRST_SSN 12
/* struct tx_power::flags bits */ /* struct tx_power::flags bits */
#define WL_TX_POWER_F_ENABLED 1 #define WL_TX_POWER_F_ENABLED 1
......
...@@ -70,11 +70,13 @@ ...@@ -70,11 +70,13 @@
#define PMURES_BIT(bit) (1 << (bit)) #define PMURES_BIT(bit) (1 << (bit))
/* PMU corerev and chip specific PLL controls. /* PMU corerev and chip specific PLL controls.
* PMU<rev>_PLL<num>_XX where <rev> is PMU corerev and <num> is an arbitrary number * PMU<rev>_PLL<num>_XX where <rev> is PMU corerev and <num> is an arbitrary
* to differentiate different PLLs controlled by the same PMU rev. * number to differentiate different PLLs controlled by the same PMU rev.
*/
/* pllcontrol registers:
* ndiv_pwrdn, pwrdn_ch<x>, refcomp_pwrdn, dly_ch<x>,
* p1div, p2div, _bypass_sdmod
*/ */
/* pllcontrol registers */
/* ndiv_pwrdn, pwrdn_ch<x>, refcomp_pwrdn, dly_ch<x>, p1div, p2div, _bypass_sdmod */
#define PMU1_PLL0_PLLCTL0 0 #define PMU1_PLL0_PLLCTL0 0
#define PMU1_PLL0_PLLCTL1 1 #define PMU1_PLL0_PLLCTL1 1
#define PMU1_PLL0_PLLCTL2 2 #define PMU1_PLL0_PLLCTL2 2
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -23,13 +23,15 @@ ...@@ -23,13 +23,15 @@
#include "types.h" #include "types.h"
#define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */ #define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */
/* structure to store per-tid state for the ampdu initiator */ /* structure to store per-tid state for the ampdu initiator */
struct scb_ampdu_tid_ini { struct scb_ampdu_tid_ini {
u8 tx_in_transit; /* number of pending mpdus in transit in driver */ u8 tx_in_transit; /* number of pending mpdus in transit in driver */
u8 tid; /* initiator tid for easy lookup */ u8 tid; /* initiator tid for easy lookup */
u8 txretry[AMPDU_TX_BA_MAX_WSIZE]; /* tx retry count; indexed by seq modulo */ /* tx retry count; indexed by seq modulo */
struct scb *scb; /* backptr for easy lookup */ u8 txretry[AMPDU_TX_BA_MAX_WSIZE];
u8 ba_wsize; /* negotiated ba window size (in pdu) */ struct scb *scb; /* backptr for easy lookup */
u8 ba_wsize; /* negotiated ba window size (in pdu) */
}; };
#define AMPDU_MAX_SCB_TID NUMPRIO #define AMPDU_MAX_SCB_TID NUMPRIO
...@@ -43,9 +45,10 @@ struct scb_ampdu { ...@@ -43,9 +45,10 @@ struct scb_ampdu {
u32 max_rx_ampdu_bytes; /* max ampdu rcv length; 8k, 16k, 32k, 64k */ u32 max_rx_ampdu_bytes; /* max ampdu rcv length; 8k, 16k, 32k, 64k */
struct pktq txq; /* sdu transmit queue pending aggregation */ struct pktq txq; /* sdu transmit queue pending aggregation */
/* This could easily be a ini[] pointer and we keep this info in wl itself instead /*
* of having mac80211 hold it for us. Also could be made dynamic per tid instead of * This could easily be a ini[] pointer and we keep this info in wl
* static. * itself instead of having mac80211 hold it for us. Also could be made
* dynamic per tid instead of static.
*/ */
/* initiator info - per tid (NUMPRIO): */ /* initiator info - per tid (NUMPRIO): */
struct scb_ampdu_tid_ini ini[AMPDU_MAX_SCB_TID]; struct scb_ampdu_tid_ini ini[AMPDU_MAX_SCB_TID];
...@@ -56,18 +59,18 @@ struct scb_ampdu { ...@@ -56,18 +59,18 @@ struct scb_ampdu {
/* station control block - one per remote MAC address */ /* station control block - one per remote MAC address */
struct scb { struct scb {
u32 magic; u32 magic;
u32 flags; /* various bit flags as defined below */ u32 flags; /* various bit flags as defined below */
u32 flags2; /* various bit flags2 as defined below */ u32 flags2; /* various bit flags2 as defined below */
u8 state; /* current state bitfield of auth/assoc process */ u8 state; /* current state bitfield of auth/assoc process */
u8 ea[ETH_ALEN]; /* station address */ u8 ea[ETH_ALEN]; /* station address */
void *fragbuf[NUMPRIO]; /* defragmentation buffer per prio */ void *fragbuf[NUMPRIO]; /* defragmentation buffer per prio */
uint fragresid[NUMPRIO]; /* #bytes unused in frag buffer per prio */ uint fragresid[NUMPRIO];/* #bytes unused in frag buffer per prio */
u16 seqctl[NUMPRIO]; /* seqctl of last received frame (for dups) */ u16 seqctl[NUMPRIO]; /* seqctl of last received frame (for dups) */
u16 seqctl_nonqos; /* seqctl of last received frame (for dups) for /* seqctl of last received frame (for dups) for non-QoS data and
* non-QoS data and management * management */
*/ u16 seqctl_nonqos;
u16 seqnum[NUMPRIO]; /* WME: driver maintained sw seqnum per priority */ u16 seqnum[NUMPRIO];/* WME: driver maintained sw seqnum per priority */
struct scb_ampdu scb_ampdu; /* AMPDU state including per tid info */ struct scb_ampdu scb_ampdu; /* AMPDU state including per tid info */
}; };
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment