Skip to content

Commit 3732053

Browse files
committed
Merge tag 'wireless-drivers-next-for-davem-2017-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says: ==================== wireless-drivers-next patches for 4.15 The first pull request for 4.15, unusually late this time but still relatively small. Also includes merge from wireless-drivers to fix conflicts in iwlwifi. Major changes: rsi * add P2P mode support * sdio suspend and resume support iwlwifi * A fix and an addition for PCI devices for the A000 family * Dump PCI registers when an error occurs, to make it easier to debug rtlwifi * add support for 64 bit DMA, enabled with a module parameter * add module parameter to enable ASPM ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents d18b4b3 + 66cc044 commit 3732053

Some content is hidden

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

150 files changed

+2639
-1911
lines changed

drivers/bcma/Kconfig

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ menuconfig BCMA
1010
Bus driver for Broadcom specific Advanced Microcontroller Bus
1111
Architecture.
1212

13+
if BCMA
14+
1315
# Support for Block-I/O. SELECT this from the driver that needs it.
1416
config BCMA_BLOCKIO
1517
bool
16-
depends on BCMA
1718

1819
config BCMA_HOST_PCI_POSSIBLE
1920
bool
20-
depends on BCMA && PCI = y
21+
depends on PCI = y
2122
default y
2223

2324
config BCMA_HOST_PCI
@@ -28,7 +29,6 @@ config BCMA_HOST_PCI
2829

2930
config BCMA_HOST_SOC
3031
bool "Support for BCMA in a SoC"
31-
depends on BCMA
3232
help
3333
Host interface for a Broadcom AIX bus directly mapped into
3434
the memory. This only works with the Broadcom SoCs from the
@@ -38,7 +38,7 @@ config BCMA_HOST_SOC
3838

3939
config BCMA_DRIVER_PCI
4040
bool "BCMA Broadcom PCI core driver"
41-
depends on BCMA && PCI
41+
depends on PCI
4242
default y
4343
help
4444
BCMA bus may have many versions of PCIe core. This driver
@@ -54,13 +54,13 @@ config BCMA_DRIVER_PCI
5454

5555
config BCMA_DRIVER_PCI_HOSTMODE
5656
bool "Driver for PCI core working in hostmode"
57-
depends on BCMA && MIPS && BCMA_DRIVER_PCI
57+
depends on MIPS && BCMA_DRIVER_PCI
5858
help
5959
PCI core hostmode operation (external PCI bus).
6060

6161
config BCMA_DRIVER_MIPS
6262
bool "BCMA Broadcom MIPS core driver"
63-
depends on BCMA && MIPS
63+
depends on MIPS
6464
help
6565
Driver for the Broadcom MIPS core attached to Broadcom specific
6666
Advanced Microcontroller Bus.
@@ -91,7 +91,6 @@ config BCMA_NFLASH
9191

9292
config BCMA_DRIVER_GMAC_CMN
9393
bool "BCMA Broadcom GBIT MAC COMMON core driver"
94-
depends on BCMA
9594
help
9695
Driver for the Broadcom GBIT MAC COMMON core attached to Broadcom
9796
specific Advanced Microcontroller Bus.
@@ -100,7 +99,7 @@ config BCMA_DRIVER_GMAC_CMN
10099

101100
config BCMA_DRIVER_GPIO
102101
bool "BCMA GPIO driver"
103-
depends on BCMA && GPIOLIB
102+
depends on GPIOLIB
104103
select GPIOLIB_IRQCHIP if BCMA_HOST_SOC
105104
help
106105
Driver to provide access to the GPIO pins of the bcma bus.
@@ -109,8 +108,9 @@ config BCMA_DRIVER_GPIO
109108

110109
config BCMA_DEBUG
111110
bool "BCMA debugging"
112-
depends on BCMA
113111
help
114112
This turns on additional debugging messages.
115113

116114
If unsure, say N
115+
116+
endif # BCMA

drivers/bcma/driver_mips.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,11 @@ static void bcma_core_mips_print_irq(struct bcma_device *dev, unsigned int irq)
184184
{
185185
int i;
186186
static const char *irq_name[] = {"2(S)", "3", "4", "5", "6", "D", "I"};
187-
printk(KERN_DEBUG KBUILD_MODNAME ": core 0x%04x, irq :", dev->id.id);
187+
188+
bcma_debug(dev->bus, "core 0x%04x, irq :", dev->id.id);
188189
for (i = 0; i <= 6; i++)
189-
printk(" %s%s", irq_name[i], i == irq ? "*" : " ");
190-
printk("\n");
190+
pr_cont(" %s%s", irq_name[i], i == irq ? "*" : " ");
191+
pr_cont("\n");
191192
}
192193

193194
static void bcma_core_mips_dump_irq(struct bcma_bus *bus)

drivers/net/wireless/broadcom/b43/phy_g.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,7 @@ static u8 b43_gphy_aci_detect(struct b43_wldev *dev, u8 channel)
22972297
static u8 b43_gphy_aci_scan(struct b43_wldev *dev)
22982298
{
22992299
struct b43_phy *phy = &dev->phy;
2300-
u8 ret[13];
2300+
u8 ret[13] = { 0 };
23012301
unsigned int channel = phy->channel;
23022302
unsigned int i, j, start, end;
23032303

drivers/net/wireless/broadcom/b43/phy_ht.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static void b43_radio_2059_rcal(struct b43_wldev *dev)
119119
/* Calibrate the internal RC oscillator? */
120120
static void b43_radio_2057_rccal(struct b43_wldev *dev)
121121
{
122-
const u16 radio_values[3][2] = {
122+
static const u16 radio_values[3][2] = {
123123
{ 0x61, 0xE9 }, { 0x69, 0xD5 }, { 0x73, 0x99 },
124124
};
125125
int i;
@@ -154,7 +154,7 @@ static void b43_radio_2059_init_pre(struct b43_wldev *dev)
154154

155155
static void b43_radio_2059_init(struct b43_wldev *dev)
156156
{
157-
const u16 routing[] = { R2059_C1, R2059_C2, R2059_C3 };
157+
static const u16 routing[] = { R2059_C1, R2059_C2, R2059_C3 };
158158
int i;
159159

160160
/* Prepare (reset?) radio */
@@ -263,7 +263,7 @@ static void b43_phy_ht_reset_cca(struct b43_wldev *dev)
263263
static void b43_phy_ht_zero_extg(struct b43_wldev *dev)
264264
{
265265
u8 i, j;
266-
u16 base[] = { 0x40, 0x60, 0x80 };
266+
static const u16 base[] = { 0x40, 0x60, 0x80 };
267267

268268
for (i = 0; i < ARRAY_SIZE(base); i++) {
269269
for (j = 0; j < 4; j++)

drivers/net/wireless/broadcom/b43legacy/radio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ u8 b43legacy_radio_aci_detect(struct b43legacy_wldev *dev, u8 channel)
280280
u8 b43legacy_radio_aci_scan(struct b43legacy_wldev *dev)
281281
{
282282
struct b43legacy_phy *phy = &dev->phy;
283-
u8 ret[13];
283+
u8 ret[13] = { 0 };
284284
unsigned int channel = phy->channel;
285285
unsigned int i;
286286
unsigned int j;

drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,6 @@ static void brcmf_fweh_event_worker(struct work_struct *work)
257257
brcmf_dbg_hex_dump(BRCMF_EVENT_ON(), event->data,
258258
min_t(u32, emsg.datalen, 64),
259259
"event payload, len=%d\n", emsg.datalen);
260-
if (emsg.datalen > event->datalen) {
261-
brcmf_err("event invalid length header=%d, msg=%d\n",
262-
event->datalen, emsg.datalen);
263-
goto event_free;
264-
}
265260

266261
/* special handling of interface event */
267262
if (event->code == BRCMF_E_IF) {
@@ -429,7 +424,8 @@ void brcmf_fweh_process_event(struct brcmf_pub *drvr,
429424
if (code != BRCMF_E_IF && !fweh->evt_handler[code])
430425
return;
431426

432-
if (datalen > BRCMF_DCMD_MAXLEN)
427+
if (datalen > BRCMF_DCMD_MAXLEN ||
428+
datalen + sizeof(*event_packet) > packet_len)
433429
return;
434430

435431
if (in_interrupt())

drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,6 @@ s32 brcmf_p2p_notify_rx_mgmt_p2p_probereq(struct brcmf_if *ifp,
18531853
struct afx_hdl *afx_hdl = &p2p->afx_hdl;
18541854
struct brcmf_cfg80211_vif *vif = ifp->vif;
18551855
struct brcmf_rx_mgmt_data *rxframe = (struct brcmf_rx_mgmt_data *)data;
1856-
u16 chanspec = be16_to_cpu(rxframe->chanspec);
18571856
struct brcmu_chan ch;
18581857
u8 *mgmt_frame;
18591858
u32 mgmt_frame_len;
@@ -1906,7 +1905,7 @@ s32 brcmf_p2p_notify_rx_mgmt_p2p_probereq(struct brcmf_if *ifp,
19061905
cfg80211_rx_mgmt(&vif->wdev, freq, 0, mgmt_frame, mgmt_frame_len, 0);
19071906

19081907
brcmf_dbg(INFO, "mgmt_frame_len (%d) , e->datalen (%d), chanspec (%04x), freq (%d)\n",
1909-
mgmt_frame_len, e->datalen, chanspec, freq);
1908+
mgmt_frame_len, e->datalen, ch.chspec, freq);
19101909

19111910
return 0;
19121911
}

drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4144,10 +4144,8 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
41444144
init_waitqueue_head(&bus->dcmd_resp_wait);
41454145

41464146
/* Set up the watchdog timer */
4147-
init_timer(&bus->timer);
4148-
bus->timer.data = (unsigned long)bus;
4149-
bus->timer.function = brcmf_sdio_watchdog;
4150-
4147+
setup_timer(&bus->timer, brcmf_sdio_watchdog,
4148+
(unsigned long)bus);
41514149
/* Initialize watchdog thread */
41524150
init_completion(&bus->watchdog_wait);
41534151
bus->watchdog_tsk = kthread_run(brcmf_sdio_watchdog_thread,

drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@ void wlc_phy_txpower_update_shm(struct brcms_phy *pi)
19161916
pi->hwpwr_txcur);
19171917

19181918
for (j = TXP_FIRST_OFDM; j <= TXP_LAST_OFDM; j++) {
1919-
const u8 ucode_ofdm_rates[] = {
1919+
static const u8 ucode_ofdm_rates[] = {
19201920
0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c
19211921
};
19221922
offset = wlapi_bmac_rate_shm_offset(

0 commit comments

Comments
 (0)