Skip to content

Commit 41bf371

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2 parents 415b333 + 6e6e8c5 commit 41bf371

177 files changed

Lines changed: 7325 additions & 6259 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎MAINTAINERS‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4097,6 +4097,12 @@ S: Maintained
40974097
F: drivers/net/mv643xx_eth.*
40984098
F: include/linux/mv643xx.h
40994099

4100+
MARVELL MWIFIEX WIRELESS DRIVER
4101+
M: Bing Zhao <bzhao@marvell.com>
4102+
L: linux-wireless@vger.kernel.org
4103+
S: Maintained
4104+
F: drivers/net/wireless/mwifiex/
4105+
41004106
MARVELL MWL8K WIRELESS DRIVER
41014107
M: Lennert Buytenhek <buytenh@wantstofly.org>
41024108
L: linux-wireless@vger.kernel.org
@@ -6938,9 +6944,9 @@ S: Maintained
69386944
F: drivers/input/misc/wistron_btns.c
69396945

69406946
WL1251 WIRELESS DRIVER
6941-
M: Kalle Valo <kvalo@adurom.com>
6947+
M: Luciano Coelho <coelho@ti.com>
69426948
L: linux-wireless@vger.kernel.org
6943-
W: http://wireless.kernel.org
6949+
W: http://wireless.kernel.org/en/users/Drivers/wl1251
69446950
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
69456951
S: Maintained
69466952
F: drivers/net/wireless/wl1251/*

‎drivers/bcma/core.c‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,75 @@ int bcma_core_enable(struct bcma_device *core, u32 flags)
5050
return 0;
5151
}
5252
EXPORT_SYMBOL_GPL(bcma_core_enable);
53+
54+
void bcma_core_set_clockmode(struct bcma_device *core,
55+
enum bcma_clkmode clkmode)
56+
{
57+
u16 i;
58+
59+
WARN_ON(core->id.id != BCMA_CORE_CHIPCOMMON &&
60+
core->id.id != BCMA_CORE_PCIE &&
61+
core->id.id != BCMA_CORE_80211);
62+
63+
switch (clkmode) {
64+
case BCMA_CLKMODE_FAST:
65+
bcma_set32(core, BCMA_CLKCTLST, BCMA_CLKCTLST_FORCEHT);
66+
udelay(64);
67+
for (i = 0; i < 1500; i++) {
68+
if (bcma_read32(core, BCMA_CLKCTLST) &
69+
BCMA_CLKCTLST_HAVEHT) {
70+
i = 0;
71+
break;
72+
}
73+
udelay(10);
74+
}
75+
if (i)
76+
pr_err("HT force timeout\n");
77+
break;
78+
case BCMA_CLKMODE_DYNAMIC:
79+
pr_warn("Dynamic clockmode not supported yet!\n");
80+
break;
81+
}
82+
}
83+
EXPORT_SYMBOL_GPL(bcma_core_set_clockmode);
84+
85+
void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status, bool on)
86+
{
87+
u16 i;
88+
89+
WARN_ON(req & ~BCMA_CLKCTLST_EXTRESREQ);
90+
WARN_ON(status & ~BCMA_CLKCTLST_EXTRESST);
91+
92+
if (on) {
93+
bcma_set32(core, BCMA_CLKCTLST, req);
94+
for (i = 0; i < 10000; i++) {
95+
if ((bcma_read32(core, BCMA_CLKCTLST) & status) ==
96+
status) {
97+
i = 0;
98+
break;
99+
}
100+
udelay(10);
101+
}
102+
if (i)
103+
pr_err("PLL enable timeout\n");
104+
} else {
105+
pr_warn("Disabling PLL not supported yet!\n");
106+
}
107+
}
108+
EXPORT_SYMBOL_GPL(bcma_core_pll_ctl);
109+
110+
u32 bcma_core_dma_translation(struct bcma_device *core)
111+
{
112+
switch (core->bus->hosttype) {
113+
case BCMA_HOSTTYPE_PCI:
114+
if (bcma_aread32(core, BCMA_IOST) & BCMA_IOST_DMA64)
115+
return BCMA_DMA_TRANSLATION_DMA64_CMT;
116+
else
117+
return BCMA_DMA_TRANSLATION_DMA32_CMT;
118+
default:
119+
pr_err("DMA translation unknown for host %d\n",
120+
core->bus->hosttype);
121+
}
122+
return BCMA_DMA_TRANSLATION_NONE;
123+
}
124+
EXPORT_SYMBOL(bcma_core_dma_translation);

‎drivers/bcma/driver_chipcommon.c‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ static inline u32 bcma_cc_write32_masked(struct bcma_drv_cc *cc, u16 offset,
2323

2424
void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
2525
{
26+
u32 leddc_on = 10;
27+
u32 leddc_off = 90;
28+
2629
if (cc->core->id.rev >= 11)
2730
cc->status = bcma_cc_read32(cc, BCMA_CC_CHIPSTAT);
2831
cc->capabilities = bcma_cc_read32(cc, BCMA_CC_CAP);
@@ -38,6 +41,17 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
3841
bcma_pmu_init(cc);
3942
if (cc->capabilities & BCMA_CC_CAP_PCTL)
4043
pr_err("Power control not implemented!\n");
44+
45+
if (cc->core->id.rev >= 16) {
46+
if (cc->core->bus->sprom.leddc_on_time &&
47+
cc->core->bus->sprom.leddc_off_time) {
48+
leddc_on = cc->core->bus->sprom.leddc_on_time;
49+
leddc_off = cc->core->bus->sprom.leddc_off_time;
50+
}
51+
bcma_cc_write32(cc, BCMA_CC_GPIOTIMER,
52+
((leddc_on << BCMA_CC_GPIOTIMER_ONTIME_SHIFT) |
53+
(leddc_off << BCMA_CC_GPIOTIMER_OFFTIME_SHIFT)));
54+
}
4155
}
4256

4357
/* Set chip watchdog reset timer to fire in 'ticks' backplane cycles */

‎drivers/bcma/driver_pci.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ static bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
172172
chipid_top != 0x5300)
173173
return false;
174174

175+
#ifdef CONFIG_SSB_DRIVER_PCICORE
175176
if (bus->sprom.boardflags_lo & SSB_PCICORE_BFL_NOPCI)
176177
return false;
178+
#endif /* CONFIG_SSB_DRIVER_PCICORE */
177179

178180
#if 0
179181
/* TODO: on BCMA we use address from EROM instead of magic formula */

‎drivers/bcma/sprom.c‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
* R/W ops.
2121
**************************************************/
2222

23-
static void bcma_sprom_read(struct bcma_bus *bus, u16 *sprom)
23+
static void bcma_sprom_read(struct bcma_bus *bus, u16 offset, u16 *sprom)
2424
{
2525
int i;
2626
for (i = 0; i < SSB_SPROMSIZE_WORDS_R4; i++)
2727
sprom[i] = bcma_read16(bus->drv_cc.core,
28-
BCMA_CC_SPROM + (i * 2));
28+
offset + (i * 2));
2929
}
3030

3131
/**************************************************
@@ -112,7 +112,7 @@ static int bcma_sprom_valid(const u16 *sprom)
112112
return err;
113113

114114
revision = sprom[SSB_SPROMSIZE_WORDS_R4 - 1] & SSB_SPROM_REVISION_REV;
115-
if (revision != 8) {
115+
if (revision != 8 && revision != 9) {
116116
pr_err("Unsupported SPROM revision: %d\n", revision);
117117
return -ENOENT;
118118
}
@@ -137,6 +137,7 @@ static void bcma_sprom_extract_r8(struct bcma_bus *bus, const u16 *sprom)
137137

138138
int bcma_sprom_get(struct bcma_bus *bus)
139139
{
140+
u16 offset;
140141
u16 *sprom;
141142
int err = 0;
142143

@@ -151,7 +152,12 @@ int bcma_sprom_get(struct bcma_bus *bus)
151152
if (!sprom)
152153
return -ENOMEM;
153154

154-
bcma_sprom_read(bus, sprom);
155+
/* Most cards have SPROM moved by additional offset 0x30 (48 dwords).
156+
* According to brcm80211 this applies to cards with PCIe rev >= 6
157+
* TODO: understand this condition and use it */
158+
offset = (bus->chipinfo.id == 0x4331) ? BCMA_CC_SPROM :
159+
BCMA_CC_SPROM_PCIE6;
160+
bcma_sprom_read(bus, offset, sprom);
155161

156162
err = bcma_sprom_valid(sprom);
157163
if (err)

‎drivers/net/wireless/ath/ath5k/ahb.c‎

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ static void ath5k_ahb_read_cachesize(struct ath_common *common, int *csz)
3535
static bool
3636
ath5k_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
3737
{
38-
struct ath5k_softc *sc = common->priv;
39-
struct platform_device *pdev = to_platform_device(sc->dev);
38+
struct ath5k_hw *ah = common->priv;
39+
struct platform_device *pdev = to_platform_device(ah->dev);
4040
struct ar231x_board_config *bcfg = pdev->dev.platform_data;
4141
u16 *eeprom, *eeprom_end;
4242

@@ -56,21 +56,19 @@ ath5k_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
5656

5757
int ath5k_hw_read_srev(struct ath5k_hw *ah)
5858
{
59-
struct ath5k_softc *sc = ah->ah_sc;
60-
struct platform_device *pdev = to_platform_device(sc->dev);
59+
struct platform_device *pdev = to_platform_device(ah->dev);
6160
struct ar231x_board_config *bcfg = pdev->dev.platform_data;
6261
ah->ah_mac_srev = bcfg->devid;
6362
return 0;
6463
}
6564

6665
static int ath5k_ahb_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac)
6766
{
68-
struct ath5k_softc *sc = ah->ah_sc;
69-
struct platform_device *pdev = to_platform_device(sc->dev);
67+
struct platform_device *pdev = to_platform_device(ah->dev);
7068
struct ar231x_board_config *bcfg = pdev->dev.platform_data;
7169
u8 *cfg_mac;
7270

73-
if (to_platform_device(sc->dev)->id == 0)
71+
if (to_platform_device(ah->dev)->id == 0)
7472
cfg_mac = bcfg->config->wlan0_mac;
7573
else
7674
cfg_mac = bcfg->config->wlan1_mac;
@@ -90,7 +88,7 @@ static const struct ath_bus_ops ath_ahb_bus_ops = {
9088
static int ath_ahb_probe(struct platform_device *pdev)
9189
{
9290
struct ar231x_board_config *bcfg = pdev->dev.platform_data;
93-
struct ath5k_softc *sc;
91+
struct ath5k_hw *ah;
9492
struct ieee80211_hw *hw;
9593
struct resource *res;
9694
void __iomem *mem;
@@ -127,19 +125,19 @@ static int ath_ahb_probe(struct platform_device *pdev)
127125

128126
irq = res->start;
129127

130-
hw = ieee80211_alloc_hw(sizeof(struct ath5k_softc), &ath5k_hw_ops);
128+
hw = ieee80211_alloc_hw(sizeof(struct ath5k_hw), &ath5k_hw_ops);
131129
if (hw == NULL) {
132130
dev_err(&pdev->dev, "no memory for ieee80211_hw\n");
133131
ret = -ENOMEM;
134132
goto err_out;
135133
}
136134

137-
sc = hw->priv;
138-
sc->hw = hw;
139-
sc->dev = &pdev->dev;
140-
sc->iobase = mem;
141-
sc->irq = irq;
142-
sc->devid = bcfg->devid;
135+
ah = hw->priv;
136+
ah->hw = hw;
137+
ah->dev = &pdev->dev;
138+
ah->iobase = mem;
139+
ah->irq = irq;
140+
ah->devid = bcfg->devid;
143141

144142
if (bcfg->devid >= AR5K_SREV_AR2315_R6) {
145143
/* Enable WMAC AHB arbitration */
@@ -155,7 +153,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
155153
/* Enable WMAC DMA access (assuming 5312 or 231x*/
156154
/* TODO: check other platforms */
157155
reg = __raw_readl((void __iomem *) AR5K_AR5312_ENABLE);
158-
if (to_platform_device(sc->dev)->id == 0)
156+
if (to_platform_device(ah->dev)->id == 0)
159157
reg |= AR5K_AR5312_ENABLE_WLAN0;
160158
else
161159
reg |= AR5K_AR5312_ENABLE_WLAN1;
@@ -166,13 +164,13 @@ static int ath_ahb_probe(struct platform_device *pdev)
166164
* used as pass-through. Disable 2 GHz support in the
167165
* driver for it
168166
*/
169-
if (to_platform_device(sc->dev)->id == 0 &&
167+
if (to_platform_device(ah->dev)->id == 0 &&
170168
(bcfg->config->flags & (BD_WLAN0 | BD_WLAN1)) ==
171169
(BD_WLAN1 | BD_WLAN0))
172-
__set_bit(ATH_STAT_2G_DISABLED, sc->status);
170+
__set_bit(ATH_STAT_2G_DISABLED, ah->status);
173171
}
174172

175-
ret = ath5k_init_softc(sc, &ath_ahb_bus_ops);
173+
ret = ath5k_init_softc(ah, &ath_ahb_bus_ops);
176174
if (ret != 0) {
177175
dev_err(&pdev->dev, "failed to attach device, err=%d\n", ret);
178176
ret = -ENODEV;
@@ -194,13 +192,13 @@ static int ath_ahb_remove(struct platform_device *pdev)
194192
{
195193
struct ar231x_board_config *bcfg = pdev->dev.platform_data;
196194
struct ieee80211_hw *hw = platform_get_drvdata(pdev);
197-
struct ath5k_softc *sc;
195+
struct ath5k_hw *ah;
198196
u32 reg;
199197

200198
if (!hw)
201199
return 0;
202200

203-
sc = hw->priv;
201+
ah = hw->priv;
204202

205203
if (bcfg->devid >= AR5K_SREV_AR2315_R6) {
206204
/* Disable WMAC AHB arbitration */
@@ -210,14 +208,14 @@ static int ath_ahb_remove(struct platform_device *pdev)
210208
} else {
211209
/*Stop DMA access */
212210
reg = __raw_readl((void __iomem *) AR5K_AR5312_ENABLE);
213-
if (to_platform_device(sc->dev)->id == 0)
211+
if (to_platform_device(ah->dev)->id == 0)
214212
reg &= ~AR5K_AR5312_ENABLE_WLAN0;
215213
else
216214
reg &= ~AR5K_AR5312_ENABLE_WLAN1;
217215
__raw_writel(reg, (void __iomem *) AR5K_AR5312_ENABLE);
218216
}
219217

220-
ath5k_deinit_softc(sc);
218+
ath5k_deinit_softc(ah);
221219
platform_set_drvdata(pdev, NULL);
222220
ieee80211_free_hw(hw);
223221

0 commit comments

Comments
 (0)