diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-04-10 10:39:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-10 10:39:27 -0400 |
commit | d3641409a05dcb8e28116bb2ad638f5a42805d9d (patch) | |
tree | 1d43a5e0129709502edb631a4fd66de369ee5620 /drivers/net/wireless/b43 | |
parent | 953c96e0d85615d1ab1f100e525d376053294dc2 (diff) | |
parent | 6fe5468f452c0c40348ebd4e737758a842286ca8 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
drivers/net/wireless/rt2x00/rt2x00pci.c
net/mac80211/sta_info.c
net/wireless/core.h
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r-- | drivers/net/wireless/b43/b43.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/b43/main.c | 23 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_lp.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/b43/radio_2056.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/b43/sdio.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_phy_lcn.c | 6 |
8 files changed, 27 insertions, 36 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index fe4a77ee05c9..f5e840104f4b 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -285,7 +285,9 @@ enum { | |||
285 | #define B43_SHM_SH_DTIMPER 0x0012 /* DTIM period */ | 285 | #define B43_SHM_SH_DTIMPER 0x0012 /* DTIM period */ |
286 | #define B43_SHM_SH_NOSLPZNATDTIM 0x004C /* NOSLPZNAT DTIM */ | 286 | #define B43_SHM_SH_NOSLPZNATDTIM 0x004C /* NOSLPZNAT DTIM */ |
287 | /* SHM_SHARED beacon/AP variables */ | 287 | /* SHM_SHARED beacon/AP variables */ |
288 | #define B43_SHM_SH_BT_BASE0 0x0068 /* Beacon template base 0 */ | ||
288 | #define B43_SHM_SH_BTL0 0x0018 /* Beacon template length 0 */ | 289 | #define B43_SHM_SH_BTL0 0x0018 /* Beacon template length 0 */ |
290 | #define B43_SHM_SH_BT_BASE1 0x0468 /* Beacon template base 1 */ | ||
289 | #define B43_SHM_SH_BTL1 0x001A /* Beacon template length 1 */ | 291 | #define B43_SHM_SH_BTL1 0x001A /* Beacon template length 1 */ |
290 | #define B43_SHM_SH_BTSFOFF 0x001C /* Beacon TSF offset */ | 292 | #define B43_SHM_SH_BTSFOFF 0x001C /* Beacon TSF offset */ |
291 | #define B43_SHM_SH_TIMBPOS 0x001E /* TIM B position in beacon */ | 293 | #define B43_SHM_SH_TIMBPOS 0x001E /* TIM B position in beacon */ |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index c4d0cc582555..4ac73d2f8605 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -1310,17 +1310,19 @@ static u32 b43_jssi_read(struct b43_wldev *dev) | |||
1310 | { | 1310 | { |
1311 | u32 val = 0; | 1311 | u32 val = 0; |
1312 | 1312 | ||
1313 | val = b43_shm_read16(dev, B43_SHM_SHARED, 0x08A); | 1313 | val = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI1); |
1314 | val <<= 16; | 1314 | val <<= 16; |
1315 | val |= b43_shm_read16(dev, B43_SHM_SHARED, 0x088); | 1315 | val |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI0); |
1316 | 1316 | ||
1317 | return val; | 1317 | return val; |
1318 | } | 1318 | } |
1319 | 1319 | ||
1320 | static void b43_jssi_write(struct b43_wldev *dev, u32 jssi) | 1320 | static void b43_jssi_write(struct b43_wldev *dev, u32 jssi) |
1321 | { | 1321 | { |
1322 | b43_shm_write16(dev, B43_SHM_SHARED, 0x088, (jssi & 0x0000FFFF)); | 1322 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI0, |
1323 | b43_shm_write16(dev, B43_SHM_SHARED, 0x08A, (jssi & 0xFFFF0000) >> 16); | 1323 | (jssi & 0x0000FFFF)); |
1324 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI1, | ||
1325 | (jssi & 0xFFFF0000) >> 16); | ||
1324 | } | 1326 | } |
1325 | 1327 | ||
1326 | static void b43_generate_noise_sample(struct b43_wldev *dev) | 1328 | static void b43_generate_noise_sample(struct b43_wldev *dev) |
@@ -1623,7 +1625,7 @@ static void b43_upload_beacon0(struct b43_wldev *dev) | |||
1623 | 1625 | ||
1624 | if (wl->beacon0_uploaded) | 1626 | if (wl->beacon0_uploaded) |
1625 | return; | 1627 | return; |
1626 | b43_write_beacon_template(dev, 0x68, 0x18); | 1628 | b43_write_beacon_template(dev, B43_SHM_SH_BT_BASE0, B43_SHM_SH_BTL0); |
1627 | wl->beacon0_uploaded = true; | 1629 | wl->beacon0_uploaded = true; |
1628 | } | 1630 | } |
1629 | 1631 | ||
@@ -1633,7 +1635,7 @@ static void b43_upload_beacon1(struct b43_wldev *dev) | |||
1633 | 1635 | ||
1634 | if (wl->beacon1_uploaded) | 1636 | if (wl->beacon1_uploaded) |
1635 | return; | 1637 | return; |
1636 | b43_write_beacon_template(dev, 0x468, 0x1A); | 1638 | b43_write_beacon_template(dev, B43_SHM_SH_BT_BASE1, B43_SHM_SH_BTL1); |
1637 | wl->beacon1_uploaded = true; | 1639 | wl->beacon1_uploaded = true; |
1638 | } | 1640 | } |
1639 | 1641 | ||
@@ -2780,9 +2782,7 @@ static int b43_gpio_init(struct b43_wldev *dev) | |||
2780 | switch (dev->dev->bus_type) { | 2782 | switch (dev->dev->bus_type) { |
2781 | #ifdef CONFIG_B43_BCMA | 2783 | #ifdef CONFIG_B43_BCMA |
2782 | case B43_BUS_BCMA: | 2784 | case B43_BUS_BCMA: |
2783 | bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL, | 2785 | bcma_chipco_gpio_control(&dev->dev->bdev->bus->drv_cc, mask, set); |
2784 | (bcma_cc_read32(&dev->dev->bdev->bus->drv_cc, | ||
2785 | BCMA_CC_GPIOCTL) & ~mask) | set); | ||
2786 | break; | 2786 | break; |
2787 | #endif | 2787 | #endif |
2788 | #ifdef CONFIG_B43_SSB | 2788 | #ifdef CONFIG_B43_SSB |
@@ -2807,8 +2807,7 @@ static void b43_gpio_cleanup(struct b43_wldev *dev) | |||
2807 | switch (dev->dev->bus_type) { | 2807 | switch (dev->dev->bus_type) { |
2808 | #ifdef CONFIG_B43_BCMA | 2808 | #ifdef CONFIG_B43_BCMA |
2809 | case B43_BUS_BCMA: | 2809 | case B43_BUS_BCMA: |
2810 | bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL, | 2810 | bcma_chipco_gpio_control(&dev->dev->bdev->bus->drv_cc, ~0, 0); |
2811 | 0); | ||
2812 | break; | 2811 | break; |
2813 | #endif | 2812 | #endif |
2814 | #ifdef CONFIG_B43_SSB | 2813 | #ifdef CONFIG_B43_SSB |
@@ -3116,7 +3115,7 @@ static int b43_chip_init(struct b43_wldev *dev) | |||
3116 | 3115 | ||
3117 | /* Probe Response Timeout value */ | 3116 | /* Probe Response Timeout value */ |
3118 | /* FIXME: Default to 0, has to be set by ioctl probably... :-/ */ | 3117 | /* FIXME: Default to 0, has to be set by ioctl probably... :-/ */ |
3119 | b43_shm_write16(dev, B43_SHM_SHARED, 0x0074, 0x0000); | 3118 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_PRMAXTIME, 0); |
3120 | 3119 | ||
3121 | /* Initially set the wireless operation mode. */ | 3120 | /* Initially set the wireless operation mode. */ |
3122 | b43_adjust_opmode(dev); | 3121 | b43_adjust_opmode(dev); |
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index 3ae28561f7a4..5ed352ddae9e 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c | |||
@@ -104,14 +104,8 @@ static void lpphy_read_band_sprom(struct b43_wldev *dev) | |||
104 | maxpwr = sprom->maxpwr_bg; | 104 | maxpwr = sprom->maxpwr_bg; |
105 | lpphy->max_tx_pwr_med_band = maxpwr; | 105 | lpphy->max_tx_pwr_med_band = maxpwr; |
106 | cckpo = sprom->cck2gpo; | 106 | cckpo = sprom->cck2gpo; |
107 | /* | ||
108 | * We don't read SPROM's opo as specs say. On rev8 SPROMs | ||
109 | * opo == ofdm2gpo and we don't know any SSB with LP-PHY | ||
110 | * and SPROM rev below 8. | ||
111 | */ | ||
112 | B43_WARN_ON(sprom->revision < 8); | ||
113 | ofdmpo = sprom->ofdm2gpo; | ||
114 | if (cckpo) { | 107 | if (cckpo) { |
108 | ofdmpo = sprom->ofdm2gpo; | ||
115 | for (i = 0; i < 4; i++) { | 109 | for (i = 0; i < 4; i++) { |
116 | lpphy->tx_max_rate[i] = | 110 | lpphy->tx_max_rate[i] = |
117 | maxpwr - (ofdmpo & 0xF) * 2; | 111 | maxpwr - (ofdmpo & 0xF) * 2; |
@@ -124,11 +118,11 @@ static void lpphy_read_band_sprom(struct b43_wldev *dev) | |||
124 | ofdmpo >>= 4; | 118 | ofdmpo >>= 4; |
125 | } | 119 | } |
126 | } else { | 120 | } else { |
127 | ofdmpo &= 0xFF; | 121 | u8 opo = sprom->opo; |
128 | for (i = 0; i < 4; i++) | 122 | for (i = 0; i < 4; i++) |
129 | lpphy->tx_max_rate[i] = maxpwr; | 123 | lpphy->tx_max_rate[i] = maxpwr; |
130 | for (i = 4; i < 15; i++) | 124 | for (i = 4; i < 15; i++) |
131 | lpphy->tx_max_rate[i] = maxpwr - ofdmpo; | 125 | lpphy->tx_max_rate[i] = maxpwr - opo; |
132 | } | 126 | } |
133 | } else { /* 5GHz */ | 127 | } else { /* 5GHz */ |
134 | lpphy->tx_isolation_low_band = sprom->tri5gl; | 128 | lpphy->tx_isolation_low_band = sprom->tri5gl; |
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index e8486c1e091a..f9339e7ea6af 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -2789,10 +2789,6 @@ static void b43_nphy_iq_cal_gain_params(struct b43_wldev *dev, u16 core, | |||
2789 | * Tx and Rx | 2789 | * Tx and Rx |
2790 | **************************************************/ | 2790 | **************************************************/ |
2791 | 2791 | ||
2792 | void b43_nphy_set_rxantenna(struct b43_wldev *dev, int antenna) | ||
2793 | {//TODO | ||
2794 | } | ||
2795 | |||
2796 | static void b43_nphy_op_adjust_txpower(struct b43_wldev *dev) | 2792 | static void b43_nphy_op_adjust_txpower(struct b43_wldev *dev) |
2797 | {//TODO | 2793 | {//TODO |
2798 | } | 2794 | } |
@@ -4892,7 +4888,7 @@ static void b43_nphy_superswitch_init(struct b43_wldev *dev, bool init) | |||
4892 | } | 4888 | } |
4893 | 4889 | ||
4894 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/Init/N */ | 4890 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/Init/N */ |
4895 | int b43_phy_initn(struct b43_wldev *dev) | 4891 | static int b43_phy_initn(struct b43_wldev *dev) |
4896 | { | 4892 | { |
4897 | struct ssb_sprom *sprom = dev->dev->bus_sprom; | 4893 | struct ssb_sprom *sprom = dev->dev->bus_sprom; |
4898 | struct b43_phy *phy = &dev->phy; | 4894 | struct b43_phy *phy = &dev->phy; |
diff --git a/drivers/net/wireless/b43/radio_2056.c b/drivers/net/wireless/b43/radio_2056.c index ce037fb6789a..b4fd9345d673 100644 --- a/drivers/net/wireless/b43/radio_2056.c +++ b/drivers/net/wireless/b43/radio_2056.c | |||
@@ -2980,7 +2980,7 @@ static const struct b2056_inittab_entry b2056_inittab_rev8_rx[] = { | |||
2980 | .rx = prefix##_rx, \ | 2980 | .rx = prefix##_rx, \ |
2981 | .rx_length = ARRAY_SIZE(prefix##_rx) | 2981 | .rx_length = ARRAY_SIZE(prefix##_rx) |
2982 | 2982 | ||
2983 | struct b2056_inittabs_pts b2056_inittabs[] = { | 2983 | static const struct b2056_inittabs_pts b2056_inittabs[] = { |
2984 | [3] = { INITTABSPTS(b2056_inittab_rev3) }, | 2984 | [3] = { INITTABSPTS(b2056_inittab_rev3) }, |
2985 | [4] = { INITTABSPTS(b2056_inittab_rev4) }, | 2985 | [4] = { INITTABSPTS(b2056_inittab_rev4) }, |
2986 | [5] = { INITTABSPTS(b2056_inittab_rev5) }, | 2986 | [5] = { INITTABSPTS(b2056_inittab_rev5) }, |
@@ -9035,7 +9035,7 @@ static void b2056_upload_inittab(struct b43_wldev *dev, bool ghz5, | |||
9035 | void b2056_upload_inittabs(struct b43_wldev *dev, | 9035 | void b2056_upload_inittabs(struct b43_wldev *dev, |
9036 | bool ghz5, bool ignore_uploadflag) | 9036 | bool ghz5, bool ignore_uploadflag) |
9037 | { | 9037 | { |
9038 | struct b2056_inittabs_pts *pts; | 9038 | const struct b2056_inittabs_pts *pts; |
9039 | 9039 | ||
9040 | if (dev->phy.rev >= ARRAY_SIZE(b2056_inittabs)) { | 9040 | if (dev->phy.rev >= ARRAY_SIZE(b2056_inittabs)) { |
9041 | B43_WARN_ON(1); | 9041 | B43_WARN_ON(1); |
@@ -9057,7 +9057,7 @@ void b2056_upload_inittabs(struct b43_wldev *dev, | |||
9057 | 9057 | ||
9058 | void b2056_upload_syn_pll_cp2(struct b43_wldev *dev, bool ghz5) | 9058 | void b2056_upload_syn_pll_cp2(struct b43_wldev *dev, bool ghz5) |
9059 | { | 9059 | { |
9060 | struct b2056_inittabs_pts *pts; | 9060 | const struct b2056_inittabs_pts *pts; |
9061 | const struct b2056_inittab_entry *e; | 9061 | const struct b2056_inittab_entry *e; |
9062 | 9062 | ||
9063 | if (dev->phy.rev >= ARRAY_SIZE(b2056_inittabs)) { | 9063 | if (dev->phy.rev >= ARRAY_SIZE(b2056_inittabs)) { |
diff --git a/drivers/net/wireless/b43/sdio.h b/drivers/net/wireless/b43/sdio.h index fb633094403a..1e93926f388f 100644 --- a/drivers/net/wireless/b43/sdio.h +++ b/drivers/net/wireless/b43/sdio.h | |||
@@ -25,12 +25,12 @@ void b43_sdio_exit(void); | |||
25 | #else /* CONFIG_B43_SDIO */ | 25 | #else /* CONFIG_B43_SDIO */ |
26 | 26 | ||
27 | 27 | ||
28 | int b43_sdio_request_irq(struct b43_wldev *dev, | 28 | static inline int b43_sdio_request_irq(struct b43_wldev *dev, |
29 | void (*handler)(struct b43_wldev *dev)) | 29 | void (*handler)(struct b43_wldev *dev)) |
30 | { | 30 | { |
31 | return -ENODEV; | 31 | return -ENODEV; |
32 | } | 32 | } |
33 | void b43_sdio_free_irq(struct b43_wldev *dev) | 33 | static inline void b43_sdio_free_irq(struct b43_wldev *dev) |
34 | { | 34 | { |
35 | } | 35 | } |
36 | static inline int b43_sdio_init(void) | 36 | static inline int b43_sdio_init(void) |
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c index aaca60c6f575..110510d53958 100644 --- a/drivers/net/wireless/b43/tables_nphy.c +++ b/drivers/net/wireless/b43/tables_nphy.c | |||
@@ -2800,7 +2800,7 @@ static const struct nphy_rf_control_override_rev7 | |||
2800 | { 0x0010, 0x344, 0x345, 0x0010, 4 }, | 2800 | { 0x0010, 0x344, 0x345, 0x0010, 4 }, |
2801 | }; | 2801 | }; |
2802 | 2802 | ||
2803 | struct nphy_gain_ctl_workaround_entry nphy_gain_ctl_wa_phy6_radio11_ghz2 = { | 2803 | static struct nphy_gain_ctl_workaround_entry nphy_gain_ctl_wa_phy6_radio11_ghz2 = { |
2804 | { 10, 14, 19, 27 }, | 2804 | { 10, 14, 19, 27 }, |
2805 | { -5, 6, 10, 15 }, | 2805 | { -5, 6, 10, 15 }, |
2806 | { 0xA, 0xA, 0xA, 0xA, 0xA, 0xA, 0xA, 0xA, 0xA, 0xA }, | 2806 | { 0xA, 0xA, 0xA, 0xA, 0xA, 0xA, 0xA, 0xA, 0xA, 0xA }, |
@@ -2811,7 +2811,7 @@ struct nphy_gain_ctl_workaround_entry nphy_gain_ctl_wa_phy6_radio11_ghz2 = { | |||
2811 | 0x18, 0x18, 0x18, | 2811 | 0x18, 0x18, 0x18, |
2812 | 0x01D0, 0x5, | 2812 | 0x01D0, 0x5, |
2813 | }; | 2813 | }; |
2814 | struct nphy_gain_ctl_workaround_entry nphy_gain_ctl_workaround[2][4] = { | 2814 | static struct nphy_gain_ctl_workaround_entry nphy_gain_ctl_workaround[2][4] = { |
2815 | { /* 2GHz */ | 2815 | { /* 2GHz */ |
2816 | { /* PHY rev 3 */ | 2816 | { /* PHY rev 3 */ |
2817 | { 7, 11, 16, 23 }, | 2817 | { 7, 11, 16, 23 }, |
diff --git a/drivers/net/wireless/b43/tables_phy_lcn.c b/drivers/net/wireless/b43/tables_phy_lcn.c index 5176363cadf2..e347b8d80ea4 100644 --- a/drivers/net/wireless/b43/tables_phy_lcn.c +++ b/drivers/net/wireless/b43/tables_phy_lcn.c | |||
@@ -313,7 +313,7 @@ static const u32 b43_lcntab_0x18[] = { | |||
313 | * TX gain. | 313 | * TX gain. |
314 | **************************************************/ | 314 | **************************************************/ |
315 | 315 | ||
316 | const struct b43_lcntab_tx_gain_tbl_entry | 316 | static const struct b43_lcntab_tx_gain_tbl_entry |
317 | b43_lcntab_tx_gain_tbl_2ghz_ext_pa_rev0[B43_LCNTAB_TX_GAIN_SIZE] = { | 317 | b43_lcntab_tx_gain_tbl_2ghz_ext_pa_rev0[B43_LCNTAB_TX_GAIN_SIZE] = { |
318 | { 0x03, 0x00, 0x1f, 0x0, 0x48 }, | 318 | { 0x03, 0x00, 0x1f, 0x0, 0x48 }, |
319 | { 0x03, 0x00, 0x1f, 0x0, 0x46 }, | 319 | { 0x03, 0x00, 0x1f, 0x0, 0x46 }, |
@@ -449,7 +449,7 @@ const struct b43_lcntab_tx_gain_tbl_entry | |||
449 | * SW control. | 449 | * SW control. |
450 | **************************************************/ | 450 | **************************************************/ |
451 | 451 | ||
452 | const u16 b43_lcntab_sw_ctl_4313_epa_rev0[] = { | 452 | static const u16 b43_lcntab_sw_ctl_4313_epa_rev0[] = { |
453 | 0x0002, 0x0008, 0x0004, 0x0001, 0x0002, 0x0008, | 453 | 0x0002, 0x0008, 0x0004, 0x0001, 0x0002, 0x0008, |
454 | 0x0004, 0x0001, 0x0002, 0x0008, 0x0004, 0x0001, | 454 | 0x0004, 0x0001, 0x0002, 0x0008, 0x0004, 0x0001, |
455 | 0x0002, 0x0008, 0x0004, 0x0001, 0x0002, 0x0008, | 455 | 0x0002, 0x0008, 0x0004, 0x0001, 0x0002, 0x0008, |
@@ -631,7 +631,7 @@ static void b43_phy_lcn_upload_static_tables(struct b43_wldev *dev) | |||
631 | lcntab_upload(dev, B43_LCNTAB32(0x18, 0), b43_lcntab_0x18); | 631 | lcntab_upload(dev, B43_LCNTAB32(0x18, 0), b43_lcntab_0x18); |
632 | } | 632 | } |
633 | 633 | ||
634 | void b43_phy_lcn_load_tx_gain_tab(struct b43_wldev *dev, | 634 | static void b43_phy_lcn_load_tx_gain_tab(struct b43_wldev *dev, |
635 | const struct b43_lcntab_tx_gain_tbl_entry *gain_table) | 635 | const struct b43_lcntab_tx_gain_tbl_entry *gain_table) |
636 | { | 636 | { |
637 | u32 i; | 637 | u32 i; |