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.
...@@ -41,8 +41,8 @@ struct dma32diag { /* diag access */ ...@@ -41,8 +41,8 @@ struct dma32diag { /* diag access */
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 */
}; };
...@@ -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;
...@@ -57,7 +52,7 @@ struct brcms_firmware { ...@@ -57,7 +52,7 @@ 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>
......
...@@ -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
......
...@@ -74,31 +74,48 @@ ...@@ -74,31 +74,48 @@
#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 */ /* default antdiv setting */
#define ANT_RX_DIV_DEF ANT_RX_DIV_START_0
/* legacy rx Antenna diversity for SISO rates */ /* legacy rx Antenna diversity for SISO rates */
#define ANT_TX_FORCE_0 0 /* Tx on antenna 0, "legacy term Main" */ /* Tx on antenna 0, "legacy term Main" */
#define ANT_TX_FORCE_1 1 /* Tx on antenna 1, "legacy term Aux" */ #define ANT_TX_FORCE_0 0
#define ANT_TX_LAST_RX 3 /* Tx on phy's last good Rx antenna */ /* Tx on antenna 1, "legacy term Aux" */
#define ANT_TX_DEF 3 /* driver's default tx antenna setting */ #define ANT_TX_FORCE_1 1
/* Tx on phy's last good Rx antenna */
#define TXCORE_POLICY_ALL 0x1 /* use all available core for transmit */ #define ANT_TX_LAST_RX 3
/* driver's default tx antenna setting */
#define ANT_TX_DEF 3
/* use all available core for transmit */
#define TXCORE_POLICY_ALL 0x1
/* Tx Chain values */ /* Tx Chain values */
#define TXCHAIN_DEF 0x1 /* def bitmap of txchain */ /* def bitmap of txchain */
#define TXCHAIN_DEF_NPHY 0x3 /* default bitmap of tx chains for nphy */ #define TXCHAIN_DEF 0x1
#define TXCHAIN_DEF_HTPHY 0x7 /* default bitmap of tx chains for nphy */ /* default bitmap of tx chains for nphy */
#define RXCHAIN_DEF 0x1 /* def bitmap of rxchain */ #define TXCHAIN_DEF_NPHY 0x3
#define RXCHAIN_DEF_NPHY 0x3 /* default bitmap of rx chains for nphy */ /* default bitmap of tx chains for nphy */
#define RXCHAIN_DEF_HTPHY 0x7 /* default bitmap of rx chains for nphy */ #define TXCHAIN_DEF_HTPHY 0x7
#define ANTSWITCH_NONE 0 /* no antenna switch */ /* def bitmap of rxchain */
#define ANTSWITCH_TYPE_1 1 /* antenna switch on 4321CB2, 2of3 */ #define RXCHAIN_DEF 0x1
#define ANTSWITCH_TYPE_2 2 /* antenna switch on 4321MPCI, 2of3 */ /* default bitmap of rx chains for nphy */
#define ANTSWITCH_TYPE_3 3 /* antenna switch on 4322, 2of3 */ #define RXCHAIN_DEF_NPHY 0x3
/* default bitmap of rx chains for nphy */
#define RXCHAIN_DEF_HTPHY 0x7
/* no antenna switch */
#define ANTSWITCH_NONE 0
/* antenna switch on 4321CB2, 2of3 */
#define ANTSWITCH_TYPE_1 1
/* antenna switch on 4321MPCI, 2of3 */
#define ANTSWITCH_TYPE_2 2
/* antenna switch on 4322, 2of3 */
#define ANTSWITCH_TYPE_3 3
#define RXBUFSZ PKTBUFSZ #define RXBUFSZ PKTBUFSZ
#ifndef AIDMAPSZ #ifndef AIDMAPSZ
#define AIDMAPSZ (roundup(MAXSCB, NBBY)/NBBY) /* aid bitmap size in bytes */ /* aid bitmap size in bytes */
#define AIDMAPSZ (roundup(MAXSCB, NBBY)/NBBY)
#endif /* AIDMAPSZ */ #endif /* AIDMAPSZ */
#define MAX_STREAMS_SUPPORTED 4 /* max number of streams supported */ #define MAX_STREAMS_SUPPORTED 4 /* max number of streams supported */
...@@ -115,14 +132,14 @@ struct brcms_tunables { ...@@ -115,14 +132,14 @@ struct brcms_tunables {
int maxscb; /* # of SCBs supported */ int maxscb; /* # of SCBs supported */
int ampdunummpdu; /* max number of mpdu in an ampdu */ int ampdunummpdu; /* max number of mpdu in an ampdu */
int maxpktcb; /* max # of packet callbacks */ int maxpktcb; /* max # of packet callbacks */
int maxucodebss; /* max # of BSS handled in ucode bcn/prb */ int maxucodebss;/* max # of BSS handled in ucode bcn/prb */
int maxucodebss4; /* max # of BSS handled in sw bcn/prb */ int maxucodebss4; /* max # of BSS handled in sw bcn/prb */
int maxbss; /* max # of bss info elements in scan list */ int maxbss; /* max # of bss info elements in scan list */
int datahiwat; /* data msg txq hiwat mark */ int datahiwat; /* data msg txq hiwat mark */
int ampdudatahiwat; /* AMPDU msg txq hiwat mark */ int ampdudatahiwat; /* AMPDU msg txq hiwat mark */
int rxbnd; /* max # of rx bufs to process before deferring to dpc */ int rxbnd; /* max # rx bufs to process before deferring to dpc */
int txsbnd; /* max # tx status to process in wlc_txstatus() */ int txsbnd; /* max # tx status to process in wlc_txstatus() */
int memreserved; /* memory reserved for BMAC's USB dma rx */ int memreserved;/* memory reserved for BMAC's USB dma rx */
}; };
struct brcms_c_rateset { struct brcms_c_rateset {
...@@ -181,7 +198,7 @@ struct brcms_bss_info { ...@@ -181,7 +198,7 @@ struct brcms_bss_info {
struct rsn_parms wpa; struct rsn_parms wpa;
struct rsn_parms wpa2; struct rsn_parms wpa2;
u16 qbss_load_aac; /* qbss load available admission capacity */ u16 qbss_load_aac; /* qbss load available admission capacity */
/* qbss_load_chan_free <- (0xff - channel_utilization of qbss_load_ie_t) */ /* qbss_load_chan_free <- (0xff - chan utilization of qbss_load_ie_t) */
u8 qbss_load_chan_free; /* indicates how free the channel is */ u8 qbss_load_chan_free; /* indicates how free the channel is */
u8 mcipher; /* multicast cipher */ u8 mcipher; /* multicast cipher */
u8 wpacfg; /* wpa config index */ u8 wpacfg; /* wpa config index */
...@@ -207,7 +224,7 @@ struct brcms_bss_info { ...@@ -207,7 +224,7 @@ struct brcms_bss_info {
#define MAC80211_SCAN (1 << 1) #define MAC80211_SCAN (1 << 1)
/* /*
* Public portion of "common" os-independent state structure. * Public portion of common driver state structure.
* The wlc handle points at this. * The wlc handle points at this.
*/ */
struct brcms_pub { struct brcms_pub {
...@@ -225,8 +242,8 @@ struct brcms_pub { ...@@ -225,8 +242,8 @@ struct brcms_pub {
bool hw_off; /* HW is off */ bool hw_off; /* HW is off */
/* tunables: ntxd, nrxd, maxscb, etc. */ /* tunables: ntxd, nrxd, maxscb, etc. */
struct brcms_tunables *tunables; struct brcms_tunables *tunables;
bool hw_up; /* one time hw up/down(from boot or hibernation) */ bool hw_up; /* one time hw up/down */
bool _piomode; /* true if pio mode *//* BMAC_NOTE: NEED In both */ bool _piomode; /* true if pio mode */
uint _nbands; /* # bands supported */ uint _nbands; /* # bands supported */
uint now; /* # elapsed seconds */ uint now; /* # elapsed seconds */
...@@ -337,8 +354,10 @@ enum wlc_par_id { ...@@ -337,8 +354,10 @@ enum wlc_par_id {
#define SUPPORT_11N (ENAB_1x1|ENAB_2x2) #define SUPPORT_11N (ENAB_1x1|ENAB_2x2)
#define SUPPORT_HT (ENAB_1x1|ENAB_2x2|ENAB_3x3) #define SUPPORT_HT (ENAB_1x1|ENAB_2x2|ENAB_3x3)
/* WL11N Support */ /* WL11N Support */
#if ((defined(NCONF) && (NCONF != 0)) || (defined(LCNCONF) && (LCNCONF != 0)) || \ #if ((defined(NCONF) && (NCONF != 0)) || \
(defined(HTCONF) && (HTCONF != 0)) || (defined(SSLPNCONF) && (SSLPNCONF != 0))) (defined(LCNCONF) && (LCNCONF != 0)) || \
(defined(HTCONF) && (HTCONF != 0)) || \
(defined(SSLPNCONF) && (SSLPNCONF != 0)))
#define N_ENAB(pub) ((pub)->_n_enab & SUPPORT_11N) #define N_ENAB(pub) ((pub)->_n_enab & SUPPORT_11N)
#define N_REQD(pub) ((pub)->_n_reqd) #define N_REQD(pub) ((pub)->_n_reqd)
#else #else
...@@ -370,8 +389,10 @@ enum wlc_par_id { ...@@ -370,8 +389,10 @@ enum wlc_par_id {
extern const u8 wlc_prio2prec_map[]; extern const u8 wlc_prio2prec_map[];
#define BRCMS_PRIO_TO_PREC(pri) wlc_prio2prec_map[(pri) & 7] #define BRCMS_PRIO_TO_PREC(pri) wlc_prio2prec_map[(pri) & 7]
/* This maps priority to one precedence higher - Used by PS-Poll response packets to /*
* simulate enqueue-at-head operation, but still maintain the order on the queue * This maps priority to one precedence higher - Used by PS-Poll response
* packets to simulate enqueue-at-head operation, but still maintain the
* order on the queue
*/ */
#define BRCMS_PRIO_TO_HI_PREC(pri) min(BRCMS_PRIO_TO_PREC(pri) + 1,\ #define BRCMS_PRIO_TO_HI_PREC(pri) min(BRCMS_PRIO_TO_PREC(pri) + 1,\
BRCMS_PREC_COUNT - 1) BRCMS_PREC_COUNT - 1)
...@@ -424,25 +445,31 @@ extern const u8 wme_fifo2ac[]; ...@@ -424,25 +445,31 @@ extern const u8 wme_fifo2ac[];
/* /*
* 54g modes (basic bits may still be overridden) * 54g modes (basic bits may still be overridden)
* *
* GMODE_LEGACY_B Rateset: 1b, 2b, 5.5, 11 * GMODE_LEGACY_B
* Rateset: 1b, 2b, 5.5, 11
* Preamble: Long * Preamble: Long
* Shortslot: Off * Shortslot: Off
* GMODE_AUTO Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 * GMODE_AUTO
* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
* Extended Rateset: 6, 9, 12, 48 * Extended Rateset: 6, 9, 12, 48
* Preamble: Long * Preamble: Long
* Shortslot: Auto * Shortslot: Auto
* GMODE_ONLY Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 * GMODE_ONLY
* Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54
* Extended Rateset: 6b, 9, 12b, 48 * Extended Rateset: 6b, 9, 12b, 48
* Preamble: Short required * Preamble: Short required
* Shortslot: Auto * Shortslot: Auto
* GMODE_B_DEFERRED Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 * GMODE_B_DEFERRED
* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
* Extended Rateset: 6, 9, 12, 48 * Extended Rateset: 6, 9, 12, 48
* Preamble: Long * Preamble: Long
* Shortslot: On * Shortslot: On
* GMODE_PERFORMANCE Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 * GMODE_PERFORMANCE
* Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54
* Preamble: Short required * Preamble: Short required
* Shortslot: On and required * Shortslot: On and required
* GMODE_LRS Rateset: 1b, 2b, 5.5b, 11b * GMODE_LRS
* Rateset: 1b, 2b, 5.5b, 11b
* Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 * Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54
* Preamble: Long * Preamble: Long
* Shortslot: Auto * Shortslot: Auto
...@@ -488,12 +515,18 @@ extern const u8 wme_fifo2ac[]; ...@@ -488,12 +515,18 @@ extern const u8 wme_fifo2ac[];
#define BRCMS_N_SGI_40 0x02 #define BRCMS_N_SGI_40 0x02
/* defines used by the nrate iovar */ /* defines used by the nrate iovar */
#define NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */ /* MSC in use,indicates b0-6 holds an mcs */
#define NRATE_RATE_MASK 0x0000007f /* rate/mcs value */ #define NRATE_MCS_INUSE 0x00000080
#define NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */ /* rate/mcs value */
#define NRATE_STF_SHIFT 8 /* stf mode shift */ #define NRATE_RATE_MASK 0x0000007f
#define NRATE_OVERRIDE 0x80000000 /* bit indicates override both rate & mode */ /* stf mode mask: siso, cdd, stbc, sdm */
#define NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */ #define NRATE_STF_MASK 0x0000ff00
/* stf mode shift */
#define NRATE_STF_SHIFT 8
/* bit indicates override both rate & mode */
#define NRATE_OVERRIDE 0x80000000
/* bit indicate to override mcs only */
#define NRATE_OVERRIDE_MCS_ONLY 0x40000000
#define NRATE_SGI_MASK 0x00800000 /* sgi mode */ #define NRATE_SGI_MASK 0x00800000 /* sgi mode */
#define NRATE_SGI_SHIFT 23 /* sgi mode */ #define NRATE_SGI_SHIFT 23 /* sgi mode */
#define NRATE_LDPC_CODING 0x00400000 /* bit indicates adv coding in use */ #define NRATE_LDPC_CODING 0x00400000 /* bit indicates adv coding in use */
...@@ -504,9 +537,11 @@ extern const u8 wme_fifo2ac[]; ...@@ -504,9 +537,11 @@ extern const u8 wme_fifo2ac[];
#define NRATE_STF_STBC 2 /* stf mode STBC */ #define NRATE_STF_STBC 2 /* stf mode STBC */
#define NRATE_STF_SDM 3 /* stf mode SDM */ #define NRATE_STF_SDM 3 /* stf mode SDM */
#define ANT_SELCFG_MAX 4 /* max number of antenna configurations */ /* max number of antenna configurations */
#define ANT_SELCFG_MAX 4
#define HIGHEST_SINGLE_STREAM_MCS 7 /* MCS values greater than this enable multiple streams */ /* MCS values greater than this enable multiple streams */
#define HIGHEST_SINGLE_STREAM_MCS 7
struct brcms_antselcfg { struct brcms_antselcfg {
u8 ant_config[ANT_SELCFG_MAX]; /* antenna configuration */ u8 ant_config[ANT_SELCFG_MAX]; /* antenna configuration */
...@@ -606,7 +641,4 @@ extern bool brcms_c_radio_monitor_stop(struct brcms_c_info *wlc); ...@@ -606,7 +641,4 @@ extern bool brcms_c_radio_monitor_stop(struct brcms_c_info *wlc);
#define BAND_2G_NAME "2.4G" #define BAND_2G_NAME "2.4G"
#define BAND_5G_NAME "5G" #define BAND_5G_NAME "5G"
/* BMAC RPC: 7 u32 params: pkttotlen, fifo, commit, fid, txpktpend, pktflag, rpc_id */
#define BRCMS_RPCTX_PARAMS 32
#endif /* _BRCM_PUB_H_ */ #endif /* _BRCM_PUB_H_ */
...@@ -21,7 +21,10 @@ ...@@ -21,7 +21,10 @@
#include "pub.h" #include "pub.h"
#include "rate.h" #include "rate.h"
/* Rate info per rate: It tells whether a rate is ofdm or not and its phy_rate value */ /*
* Rate info per rate: It tells whether a rate is ofdm or not and its phy_rate
* value
*/
const u8 rate_info[BRCM_MAXRATE + 1] = { const u8 rate_info[BRCM_MAXRATE + 1] = {
/* 0 1 2 3 4 5 6 7 8 9 */ /* 0 1 2 3 4 5 6 7 8 9 */
/* 0 */ 0x00, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0 */ 0x00, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -139,20 +142,25 @@ const struct brcms_mcs_info mcs_table[MCS_TABLE_SIZE] = { ...@@ -139,20 +142,25 @@ const struct brcms_mcs_info mcs_table[MCS_TABLE_SIZE] = {
{0, 6000, 0, CEIL(6000 * 10, 9), 0x00, BRCM_RATE_6M}, {0, 6000, 0, CEIL(6000 * 10, 9), 0x00, BRCM_RATE_6M},
}; };
/* phycfg for legacy OFDM frames: code rate, modulation scheme, spatial streams /*
* Number of spatial streams: always 1 * phycfg for legacy OFDM frames: code rate, modulation scheme, spatial streams
* other fields: refer to table 78 of section 17.3.2.2 of the original .11a standard * Number of spatial streams: always 1 other fields: refer to table 78 of
* section 17.3.2.2 of the original .11a standard
*/ */
struct legacy_phycfg { struct legacy_phycfg {
u32 rate_ofdm; /* ofdm mac rate */ u32 rate_ofdm; /* ofdm mac rate */
u8 tx_phy_ctl3; /* phy ctl byte 3, code rate, modulation type, # of streams */ /* phy ctl byte 3, code rate, modulation type, # of streams */
u8 tx_phy_ctl3;
}; };
#define LEGACY_PHYCFG_TABLE_SIZE 12 /* Number of legacy_rate_cfg entries in the table */ /* Number of legacy_rate_cfg entries in the table */
#define LEGACY_PHYCFG_TABLE_SIZE 12
/* In CCK mode LPPHY overloads OFDM Modulation bits with CCK Data Rate */ /*
/* Eventually MIMOPHY would also be converted to this format */ * In CCK mode LPPHY overloads OFDM Modulation bits with CCK Data Rate
/* 0 = 1Mbps; 1 = 2Mbps; 2 = 5.5Mbps; 3 = 11Mbps */ * Eventually MIMOPHY would also be converted to this format
* 0 = 1Mbps; 1 = 2Mbps; 2 = 5.5Mbps; 3 = 11Mbps
*/
static const struct static const struct
legacy_phycfg legacy_phycfg_table[LEGACY_PHYCFG_TABLE_SIZE] = { legacy_phycfg legacy_phycfg_table[LEGACY_PHYCFG_TABLE_SIZE] = {
{BRCM_RATE_1M, 0x00}, /* CCK 1Mbps, data rate 0 */ {BRCM_RATE_1M, 0x00}, /* CCK 1Mbps, data rate 0 */
...@@ -181,78 +189,81 @@ legacy_phycfg legacy_phycfg_table[LEGACY_PHYCFG_TABLE_SIZE] = { ...@@ -181,78 +189,81 @@ legacy_phycfg legacy_phycfg_table[LEGACY_PHYCFG_TABLE_SIZE] = {
const struct brcms_c_rateset cck_ofdm_mimo_rates = { const struct brcms_c_rateset cck_ofdm_mimo_rates = {
12, 12,
{ /* 1b, 2b, 5.5b, 6, 9, 11b, 12, 18, 24, 36, 48, 54 Mbps */ /* 1b, 2b, 5.5b, 6, 9, 11b, 12, 18, 24, 36, 48, */
0x82, 0x84, 0x8b, 0x0c, 0x12, 0x96, 0x18, 0x24, 0x30, 0x48, 0x60, { 0x82, 0x84, 0x8b, 0x0c, 0x12, 0x96, 0x18, 0x24, 0x30, 0x48, 0x60,
/* 54 Mbps */
0x6c}, 0x6c},
0x00, 0x00,
{0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00} 0x00, 0x00, 0x00, 0x00, 0x00}
}; };
const struct brcms_c_rateset ofdm_mimo_rates = { const struct brcms_c_rateset ofdm_mimo_rates = {
8, 8,
{ /* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */ /* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */
0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c}, { 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c},
0x00, 0x00,
{0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00} 0x00, 0x00, 0x00, 0x00, 0x00}
}; };
/* Default ratesets that include MCS32 for 40BW channels */ /* Default ratesets that include MCS32 for 40BW channels */
const struct brcms_c_rateset cck_ofdm_40bw_mimo_rates = { const struct brcms_c_rateset cck_ofdm_40bw_mimo_rates = {
12, 12,
{ /* 1b, 2b, 5.5b, 6, 9, 11b, 12, 18, 24, 36, 48, 54 Mbps */ /* 1b, 2b, 5.5b, 6, 9, 11b, 12, 18, 24, 36, 48 */
0x82, 0x84, 0x8b, 0x0c, 0x12, 0x96, 0x18, 0x24, 0x30, 0x48, 0x60, { 0x82, 0x84, 0x8b, 0x0c, 0x12, 0x96, 0x18, 0x24, 0x30, 0x48, 0x60,
/* 54 Mbps */
0x6c}, 0x6c},
0x00, 0x00,
{0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, { 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00} 0x00, 0x00, 0x00, 0x00, 0x00}
}; };
const struct brcms_c_rateset ofdm_40bw_mimo_rates = { const struct brcms_c_rateset ofdm_40bw_mimo_rates = {
8, 8,
{ /* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */ /* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */
0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c}, { 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c},
0x00, 0x00,
{0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, { 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00} 0x00, 0x00, 0x00, 0x00, 0x00}
}; };
const struct brcms_c_rateset cck_ofdm_rates = { const struct brcms_c_rateset cck_ofdm_rates = {
12, 12,
{ /* 1b, 2b, 5.5b, 6, 9, 11b, 12, 18, 24, 36, 48, 54 Mbps */ /* 1b, 2b, 5.5b, 6, 9, 11b, 12, 18, 24, 36, 48,*/
0x82, 0x84, 0x8b, 0x0c, 0x12, 0x96, 0x18, 0x24, 0x30, 0x48, 0x60, { 0x82, 0x84, 0x8b, 0x0c, 0x12, 0x96, 0x18, 0x24, 0x30, 0x48, 0x60,
/*54 Mbps */
0x6c}, 0x6c},
0x00, 0x00,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00} 0x00, 0x00, 0x00, 0x00, 0x00}
}; };
const struct brcms_c_rateset gphy_legacy_rates = { const struct brcms_c_rateset gphy_legacy_rates = {
4, 4,
{ /* 1b, 2b, 5.5b, 11b Mbps */ /* 1b, 2b, 5.5b, 11b Mbps */
0x82, 0x84, 0x8b, 0x96}, { 0x82, 0x84, 0x8b, 0x96},
0x00, 0x00,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00} 0x00, 0x00, 0x00, 0x00, 0x00}
}; };
const struct brcms_c_rateset ofdm_rates = { const struct brcms_c_rateset ofdm_rates = {
8, 8,
{ /* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */ /* 6b, 9, 12b, 18, 24b, 36, 48, 54 Mbps */
0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c}, { 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c},
0x00, 0x00,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00} 0x00, 0x00, 0x00, 0x00, 0x00}
}; };
const struct brcms_c_rateset cck_rates = { const struct brcms_c_rateset cck_rates = {
4, 4,
{ /* 1b, 2b, 5.5, 11 Mbps */ /* 1b, 2b, 5.5, 11 Mbps */
0x82, 0x84, 0x0b, 0x16}, { 0x82, 0x84, 0x0b, 0x16},
0x00, 0x00,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00} 0x00, 0x00, 0x00, 0x00, 0x00}
}; };
/* check if rateset is valid. /* check if rateset is valid.
...@@ -283,8 +294,9 @@ void brcms_c_rateset_mcs_upd(struct brcms_c_rateset *rs, u8 txstreams) ...@@ -283,8 +294,9 @@ void brcms_c_rateset_mcs_upd(struct brcms_c_rateset *rs, u8 txstreams)
rs->mcs[i] = 0; rs->mcs[i] = 0;
} }
/* filter based on hardware rateset, and sort filtered rateset with basic bit(s) preserved, /*
* and check if resulting rateset is valid. * filter based on hardware rateset, and sort filtered rateset with basic
* bit(s) preserved, and check if resulting rateset is valid.
*/ */
bool bool
brcms_c_rate_hwrs_filter_sort_validate(struct brcms_c_rateset *rs, brcms_c_rate_hwrs_filter_sort_validate(struct brcms_c_rateset *rs,
......
This diff is collapsed.
This diff is collapsed.
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