Skip to content

Commit c8ac18f

Browse files
committed
Merge tag 'wireless-drivers-next-for-davem-2015-02-07' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Major changes: iwlwifi: * more work for new devices (4165 / 8260) * cleanups / improvemnts in rate control * fixes for TDLS * major statistics work from Johannes - more to come * improvements for the fw error dump infrastructure * usual amount of small fixes here and there (scan, D0i3 etc...) * add support for beamforming * enable stuck queue detection for iwlmvm * a few fixes for EBS scan * fixes for various failure paths * improvements for TDLS Offchannel wil6210: * performance tuning * some AP features brcm80211: * rework some code in SDIO part of the brcmfmac driver related to suspend/resume that were found doing stress testing * in PCIe part scheduling of worker thread needed to be relaxed * minor fixes and exposing firmware revision information to user-space, ie. ethtool. mwifiex: * enhancements for change virtual interface handling * remove coupling between netdev and FW supported interface combination, now conversion from any type of supported interface types to any other type is possible * DFS support in AP mode ath9k: * fix calibration issues on some boards * Wake-on-WLAN improvements ath10k: * add support for qca6174 hardware * enable RX batching to reduce CPU load Conflicts: drivers/net/wireless/rtlwifi/pci.c Conflict resolution is to get rid of the 'end' label and keep the rest. Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 93c1af6 + d530711 commit c8ac18f

173 files changed

Lines changed: 6463 additions & 2183 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.

‎drivers/bcma/bcma_private.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc);
107107
#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
108108
bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc);
109109
void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
110+
#else
111+
static inline bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
112+
{
113+
return false;
114+
}
115+
static inline void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
116+
{
117+
}
110118
#endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
111119

112120
#ifdef CONFIG_BCMA_DRIVER_GPIO

‎drivers/bcma/driver_chipcommon.c‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
178178
u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks)
179179
{
180180
u32 maxt;
181-
enum bcma_clkmode clkmode;
182181

183182
maxt = bcma_chipco_watchdog_get_max_timer(cc);
184183
if (cc->capabilities & BCMA_CC_CAP_PMU) {
@@ -188,8 +187,13 @@ u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks)
188187
ticks = maxt;
189188
bcma_cc_write32(cc, BCMA_CC_PMU_WATCHDOG, ticks);
190189
} else {
191-
clkmode = ticks ? BCMA_CLKMODE_FAST : BCMA_CLKMODE_DYNAMIC;
192-
bcma_core_set_clockmode(cc->core, clkmode);
190+
struct bcma_bus *bus = cc->core->bus;
191+
192+
if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4707 &&
193+
bus->chipinfo.id != BCMA_CHIP_ID_BCM53018)
194+
bcma_core_set_clockmode(cc->core,
195+
ticks ? BCMA_CLKMODE_FAST : BCMA_CLKMODE_DYNAMIC);
196+
193197
if (ticks > maxt)
194198
ticks = maxt;
195199
/* instant NMI */

‎drivers/bcma/driver_pci.c‎

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,47 @@ static u16 bcma_pcie_mdio_writeread(struct bcma_drv_pci *pc, u16 device,
144144
return bcma_pcie_mdio_read(pc, device, address);
145145
}
146146

147+
/**************************************************
148+
* Early init.
149+
**************************************************/
150+
151+
static void bcma_core_pci_fixcfg(struct bcma_drv_pci *pc)
152+
{
153+
struct bcma_device *core = pc->core;
154+
u16 val16, core_index;
155+
uint regoff;
156+
157+
regoff = BCMA_CORE_PCI_SPROM(BCMA_CORE_PCI_SPROM_PI_OFFSET);
158+
core_index = (u16)core->core_index;
159+
160+
val16 = pcicore_read16(pc, regoff);
161+
if (((val16 & BCMA_CORE_PCI_SPROM_PI_MASK) >> BCMA_CORE_PCI_SPROM_PI_SHIFT)
162+
!= core_index) {
163+
val16 = (core_index << BCMA_CORE_PCI_SPROM_PI_SHIFT) |
164+
(val16 & ~BCMA_CORE_PCI_SPROM_PI_MASK);
165+
pcicore_write16(pc, regoff, val16);
166+
}
167+
}
168+
169+
/*
170+
* Apply some early fixes required before accessing SPROM.
171+
* See also si_pci_fixcfg.
172+
*/
173+
void bcma_core_pci_early_init(struct bcma_drv_pci *pc)
174+
{
175+
if (pc->early_setup_done)
176+
return;
177+
178+
pc->hostmode = bcma_core_pci_is_in_hostmode(pc);
179+
if (pc->hostmode)
180+
goto out;
181+
182+
bcma_core_pci_fixcfg(pc);
183+
184+
out:
185+
pc->early_setup_done = true;
186+
}
187+
147188
/**************************************************
148189
* Workarounds.
149190
**************************************************/
@@ -175,24 +216,6 @@ static void bcma_pcicore_serdes_workaround(struct bcma_drv_pci *pc)
175216
tmp & ~BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN);
176217
}
177218

178-
static void bcma_core_pci_fixcfg(struct bcma_drv_pci *pc)
179-
{
180-
struct bcma_device *core = pc->core;
181-
u16 val16, core_index;
182-
uint regoff;
183-
184-
regoff = BCMA_CORE_PCI_SPROM(BCMA_CORE_PCI_SPROM_PI_OFFSET);
185-
core_index = (u16)core->core_index;
186-
187-
val16 = pcicore_read16(pc, regoff);
188-
if (((val16 & BCMA_CORE_PCI_SPROM_PI_MASK) >> BCMA_CORE_PCI_SPROM_PI_SHIFT)
189-
!= core_index) {
190-
val16 = (core_index << BCMA_CORE_PCI_SPROM_PI_SHIFT) |
191-
(val16 & ~BCMA_CORE_PCI_SPROM_PI_MASK);
192-
pcicore_write16(pc, regoff, val16);
193-
}
194-
}
195-
196219
/* Fix MISC config to allow coming out of L2/L3-Ready state w/o PRST */
197220
/* Needs to happen when coming out of 'standby'/'hibernate' */
198221
static void bcma_core_pci_config_fixup(struct bcma_drv_pci *pc)
@@ -216,7 +239,6 @@ static void bcma_core_pci_config_fixup(struct bcma_drv_pci *pc)
216239

217240
static void bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc)
218241
{
219-
bcma_core_pci_fixcfg(pc);
220242
bcma_pcicore_serdes_workaround(pc);
221243
bcma_core_pci_config_fixup(pc);
222244
}
@@ -226,13 +248,11 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
226248
if (pc->setup_done)
227249
return;
228250

229-
#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
230-
pc->hostmode = bcma_core_pci_is_in_hostmode(pc);
251+
bcma_core_pci_early_init(pc);
252+
231253
if (pc->hostmode)
232254
bcma_core_pci_hostmode_init(pc);
233-
#endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
234-
235-
if (!pc->hostmode)
255+
else
236256
bcma_core_pci_clientmode_init(pc);
237257
}
238258

‎drivers/bcma/host_pci.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313

1414
static void bcma_host_pci_switch_core(struct bcma_device *core)
1515
{
16+
int win2 = core->bus->host_is_pcie2 ?
17+
BCMA_PCIE2_BAR0_WIN2 : BCMA_PCI_BAR0_WIN2;
18+
1619
pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN,
1720
core->addr);
18-
pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN2,
19-
core->wrap);
21+
pci_write_config_dword(core->bus->host_pci, win2, core->wrap);
2022
core->bus->mapped_core = core;
2123
bcma_debug(core->bus, "Switched to core: 0x%X\n", core->id.id);
2224
}

‎drivers/bcma/main.c‎

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,19 @@ static void bcma_unregister_cores(struct bcma_bus *bus)
368368
struct bcma_device *core, *tmp;
369369

370370
list_for_each_entry_safe(core, tmp, &bus->cores, list) {
371+
if (!core->dev_registered)
372+
continue;
371373
list_del(&core->list);
372-
if (core->dev_registered)
373-
device_unregister(&core->dev);
374+
device_unregister(&core->dev);
374375
}
375376
if (bus->hosttype == BCMA_HOSTTYPE_SOC)
376377
platform_device_unregister(bus->drv_cc.watchdog);
378+
379+
/* Now noone uses internally-handled cores, we can free them */
380+
list_for_each_entry_safe(core, tmp, &bus->cores, list) {
381+
list_del(&core->list);
382+
kfree(core);
383+
}
377384
}
378385

379386
int bcma_bus_register(struct bcma_bus *bus)
@@ -395,6 +402,13 @@ int bcma_bus_register(struct bcma_bus *bus)
395402
bcma_core_chipcommon_early_init(&bus->drv_cc);
396403
}
397404

405+
/* Early init PCIE core */
406+
core = bcma_find_core(bus, BCMA_CORE_PCIE);
407+
if (core) {
408+
bus->drv_pci[0].core = core;
409+
bcma_core_pci_early_init(&bus->drv_pci[0]);
410+
}
411+
398412
/* Cores providing flash access go before SPROM init */
399413
list_for_each_entry(core, &bus->cores, list) {
400414
if (bcma_is_core_needed_early(core->id.id))
@@ -467,7 +481,6 @@ int bcma_bus_register(struct bcma_bus *bus)
467481

468482
void bcma_bus_unregister(struct bcma_bus *bus)
469483
{
470-
struct bcma_device *cores[3];
471484
int err;
472485

473486
err = bcma_gpio_unregister(&bus->drv_cc);
@@ -478,15 +491,7 @@ void bcma_bus_unregister(struct bcma_bus *bus)
478491

479492
bcma_core_chipcommon_b_free(&bus->drv_cc_b);
480493

481-
cores[0] = bcma_find_core(bus, BCMA_CORE_MIPS_74K);
482-
cores[1] = bcma_find_core(bus, BCMA_CORE_PCIE);
483-
cores[2] = bcma_find_core(bus, BCMA_CORE_4706_MAC_GBIT_COMMON);
484-
485494
bcma_unregister_cores(bus);
486-
487-
kfree(cores[2]);
488-
kfree(cores[1]);
489-
kfree(cores[0]);
490495
}
491496

492497
/*

‎drivers/bcma/sprom.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,8 @@ int bcma_sprom_get(struct bcma_bus *bus)
579579
u16 offset = BCMA_CC_SPROM;
580580
u16 *sprom;
581581
size_t sprom_sizes[] = { SSB_SPROMSIZE_WORDS_R4,
582-
SSB_SPROMSIZE_WORDS_R10, };
582+
SSB_SPROMSIZE_WORDS_R10,
583+
SSB_SPROMSIZE_WORDS_R11, };
583584
int i, err = 0;
584585

585586
if (!bus->drv_cc.core)

‎drivers/net/wireless/ath/ath.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ enum ath_op_flags {
6464
ATH_OP_HW_RESET,
6565
ATH_OP_SCANNING,
6666
ATH_OP_MULTI_CHANNEL,
67+
ATH_OP_WOW_ENABLED,
6768
};
6869

6970
enum ath_bus_type {

‎drivers/net/wireless/ath/ath10k/Makefile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ ath10k_core-y += mac.o \
99
txrx.o \
1010
wmi.o \
1111
wmi-tlv.o \
12-
bmi.o
12+
bmi.o \
13+
hw.o
1314

1415
ath10k_core-$(CONFIG_ATH10K_DEBUGFS) += spectral.o
1516
ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
1617
ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
1718
ath10k_core-$(CONFIG_THERMAL) += thermal.o
19+
ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
1820

1921
obj-$(CONFIG_ATH10K_PCI) += ath10k_pci.o
2022
ath10k_pci-y += pci.o \

‎drivers/net/wireless/ath/ath10k/ce.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ int ath10k_ce_disable_interrupts(struct ath10k *ar)
803803
int ce_id;
804804

805805
for (ce_id = 0; ce_id < CE_COUNT; ce_id++) {
806-
u32 ctrl_addr = ath10k_ce_base_address(ce_id);
806+
u32 ctrl_addr = ath10k_ce_base_address(ar, ce_id);
807807

808808
ath10k_ce_copy_complete_intr_disable(ar, ctrl_addr);
809809
ath10k_ce_error_intr_disable(ar, ctrl_addr);
@@ -832,7 +832,7 @@ static int ath10k_ce_init_src_ring(struct ath10k *ar,
832832
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
833833
struct ath10k_ce_pipe *ce_state = &ar_pci->ce_states[ce_id];
834834
struct ath10k_ce_ring *src_ring = ce_state->src_ring;
835-
u32 nentries, ctrl_addr = ath10k_ce_base_address(ce_id);
835+
u32 nentries, ctrl_addr = ath10k_ce_base_address(ar, ce_id);
836836

837837
nentries = roundup_pow_of_two(attr->src_nentries);
838838

@@ -869,7 +869,7 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar,
869869
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
870870
struct ath10k_ce_pipe *ce_state = &ar_pci->ce_states[ce_id];
871871
struct ath10k_ce_ring *dest_ring = ce_state->dest_ring;
872-
u32 nentries, ctrl_addr = ath10k_ce_base_address(ce_id);
872+
u32 nentries, ctrl_addr = ath10k_ce_base_address(ar, ce_id);
873873

874874
nentries = roundup_pow_of_two(attr->dest_nentries);
875875

@@ -1051,7 +1051,7 @@ int ath10k_ce_init_pipe(struct ath10k *ar, unsigned int ce_id,
10511051

10521052
static void ath10k_ce_deinit_src_ring(struct ath10k *ar, unsigned int ce_id)
10531053
{
1054-
u32 ctrl_addr = ath10k_ce_base_address(ce_id);
1054+
u32 ctrl_addr = ath10k_ce_base_address(ar, ce_id);
10551055

10561056
ath10k_ce_src_ring_base_addr_set(ar, ctrl_addr, 0);
10571057
ath10k_ce_src_ring_size_set(ar, ctrl_addr, 0);
@@ -1061,7 +1061,7 @@ static void ath10k_ce_deinit_src_ring(struct ath10k *ar, unsigned int ce_id)
10611061

10621062
static void ath10k_ce_deinit_dest_ring(struct ath10k *ar, unsigned int ce_id)
10631063
{
1064-
u32 ctrl_addr = ath10k_ce_base_address(ce_id);
1064+
u32 ctrl_addr = ath10k_ce_base_address(ar, ce_id);
10651065

10661066
ath10k_ce_dest_ring_base_addr_set(ar, ctrl_addr, 0);
10671067
ath10k_ce_dest_ring_size_set(ar, ctrl_addr, 0);
@@ -1098,7 +1098,7 @@ int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
10981098

10991099
ce_state->ar = ar;
11001100
ce_state->id = ce_id;
1101-
ce_state->ctrl_addr = ath10k_ce_base_address(ce_id);
1101+
ce_state->ctrl_addr = ath10k_ce_base_address(ar, ce_id);
11021102
ce_state->attr_flags = attr->flags;
11031103
ce_state->src_sz_max = attr->src_sz_max;
11041104

‎drivers/net/wireless/ath/ath10k/ce.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ struct ce_attr {
394394
#define DST_WATERMARK_HIGH_RESET 0
395395
#define DST_WATERMARK_ADDRESS 0x0050
396396

397-
static inline u32 ath10k_ce_base_address(unsigned int ce_id)
397+
static inline u32 ath10k_ce_base_address(struct ath10k *ar, unsigned int ce_id)
398398
{
399399
return CE0_BASE_ADDRESS + (CE1_BASE_ADDRESS - CE0_BASE_ADDRESS) * ce_id;
400400
}

0 commit comments

Comments
 (0)