Skip to content

Commit 5470b46

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2 parents 4c1d8d0 + 0d4e671 commit 5470b46

File tree

263 files changed

+9534
-3414
lines changed

Some content is hidden

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

263 files changed

+9534
-3414
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8500,7 +8500,7 @@ F: drivers/usb/gadget/*uvc*.c
85008500
F: drivers/usb/gadget/webcam.c
85018501

85028502
USB WIRELESS RNDIS DRIVER (rndis_wlan)
8503-
M: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
8503+
M: Jussi Kivilinna <jussi.kivilinna@iki.fi>
85048504
L: linux-wireless@vger.kernel.org
85058505
S: Maintained
85068506
F: drivers/net/wireless/rndis_wlan.c

drivers/bcma/core.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status, bool on)
104104
if (i)
105105
bcma_err(core->bus, "PLL enable timeout\n");
106106
} else {
107-
bcma_warn(core->bus, "Disabling PLL not supported yet!\n");
107+
/*
108+
* Mask the PLL but don't wait for it to be disabled. PLL may be
109+
* shared between cores and will be still up if there is another
110+
* core using it.
111+
*/
112+
bcma_mask32(core, BCMA_CLKCTLST, ~req);
113+
bcma_read32(core, BCMA_CLKCTLST);
108114
}
109115
}
110116
EXPORT_SYMBOL_GPL(bcma_core_pll_ctl);

drivers/bcma/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ static int bcma_register_cores(struct bcma_bus *bus)
120120
continue;
121121
}
122122

123+
/* Only first GMAC core on BCM4706 is connected and working */
124+
if (core->id.id == BCMA_CORE_4706_MAC_GBIT &&
125+
core->core_unit > 0)
126+
continue;
127+
123128
core->dev.release = bcma_release_core_dev;
124129
core->dev.bus = &bcma_bus_type;
125130
dev_set_name(&core->dev, "bcma%d:%d", bus->num, dev_id);

drivers/net/wireless/ath/ath5k/ath5k.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,8 @@ int ath5k_hw_dma_stop(struct ath5k_hw *ah);
15231523
/* EEPROM access functions */
15241524
int ath5k_eeprom_init(struct ath5k_hw *ah);
15251525
void ath5k_eeprom_detach(struct ath5k_hw *ah);
1526-
1526+
int ath5k_eeprom_mode_from_channel(struct ath5k_hw *ah,
1527+
struct ieee80211_channel *channel);
15271528

15281529
/* Protocol Control Unit Functions */
15291530
/* Helpers */

drivers/net/wireless/ath/ath5k/eeprom.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,8 @@ ath5k_eeprom_detach(struct ath5k_hw *ah)
17791779
}
17801780

17811781
int
1782-
ath5k_eeprom_mode_from_channel(struct ieee80211_channel *channel)
1782+
ath5k_eeprom_mode_from_channel(struct ath5k_hw *ah,
1783+
struct ieee80211_channel *channel)
17831784
{
17841785
switch (channel->hw_value) {
17851786
case AR5K_MODE_11A:
@@ -1789,6 +1790,7 @@ ath5k_eeprom_mode_from_channel(struct ieee80211_channel *channel)
17891790
case AR5K_MODE_11B:
17901791
return AR5K_EEPROM_MODE_11B;
17911792
default:
1792-
return -1;
1793+
ATH5K_WARN(ah, "channel is not A/B/G!");
1794+
return AR5K_EEPROM_MODE_11A;
17931795
}
17941796
}

drivers/net/wireless/ath/ath5k/eeprom.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,3 @@ struct ath5k_eeprom_info {
493493
/* Antenna raw switch tables */
494494
u32 ee_antenna[AR5K_EEPROM_N_MODES][AR5K_ANT_MAX];
495495
};
496-
497-
int
498-
ath5k_eeprom_mode_from_channel(struct ieee80211_channel *channel);

drivers/net/wireless/ath/ath5k/phy.c

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,11 +1612,7 @@ ath5k_hw_update_noise_floor(struct ath5k_hw *ah)
16121612

16131613
ah->ah_cal_mask |= AR5K_CALIBRATION_NF;
16141614

1615-
ee_mode = ath5k_eeprom_mode_from_channel(ah->ah_current_channel);
1616-
if (WARN_ON(ee_mode < 0)) {
1617-
ah->ah_cal_mask &= ~AR5K_CALIBRATION_NF;
1618-
return;
1619-
}
1615+
ee_mode = ath5k_eeprom_mode_from_channel(ah, ah->ah_current_channel);
16201616

16211617
/* completed NF calibration, test threshold */
16221618
nf = ath5k_hw_read_measured_noise_floor(ah);
@@ -2317,12 +2313,7 @@ ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode)
23172313

23182314
def_ant = ah->ah_def_ant;
23192315

2320-
ee_mode = ath5k_eeprom_mode_from_channel(channel);
2321-
if (ee_mode < 0) {
2322-
ATH5K_ERR(ah,
2323-
"invalid channel: %d\n", channel->center_freq);
2324-
return;
2325-
}
2316+
ee_mode = ath5k_eeprom_mode_from_channel(ah, channel);
23262317

23272318
switch (ant_mode) {
23282319
case AR5K_ANTMODE_DEFAULT:
@@ -3622,12 +3613,7 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
36223613
return -EINVAL;
36233614
}
36243615

3625-
ee_mode = ath5k_eeprom_mode_from_channel(channel);
3626-
if (ee_mode < 0) {
3627-
ATH5K_ERR(ah,
3628-
"invalid channel: %d\n", channel->center_freq);
3629-
return -EINVAL;
3630-
}
3616+
ee_mode = ath5k_eeprom_mode_from_channel(ah, channel);
36313617

36323618
/* Initialize TX power table */
36333619
switch (ah->ah_radio) {

drivers/net/wireless/ath/ath5k/reset.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -984,9 +984,7 @@ ath5k_hw_commit_eeprom_settings(struct ath5k_hw *ah,
984984
if (ah->ah_version == AR5K_AR5210)
985985
return;
986986

987-
ee_mode = ath5k_eeprom_mode_from_channel(channel);
988-
if (WARN_ON(ee_mode < 0))
989-
return;
987+
ee_mode = ath5k_eeprom_mode_from_channel(ah, channel);
990988

991989
/* Adjust power delta for channel 14 */
992990
if (channel->center_freq == 2484)

drivers/net/wireless/ath/ath6kl/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ config ATH6KL_DEBUG
3030
---help---
3131
Enables debug support
3232

33+
config ATH6KL_TRACING
34+
bool "Atheros ath6kl tracing support"
35+
depends on ATH6KL
36+
depends on EVENT_TRACING
37+
---help---
38+
Select this to ath6kl use tracing infrastructure.
39+
40+
If unsure, say Y to make it easier to debug problems.
41+
3342
config ATH6KL_REGDOMAIN
3443
bool "Atheros ath6kl regdomain support"
3544
depends on ATH6KL

drivers/net/wireless/ath/ath6kl/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,15 @@ ath6kl_core-y += txrx.o
3535
ath6kl_core-y += wmi.o
3636
ath6kl_core-y += core.o
3737
ath6kl_core-y += recovery.o
38+
3839
ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
40+
ath6kl_core-$(CONFIG_ATH6KL_TRACING) += trace.o
3941

4042
obj-$(CONFIG_ATH6KL_SDIO) += ath6kl_sdio.o
4143
ath6kl_sdio-y += sdio.o
4244

4345
obj-$(CONFIG_ATH6KL_USB) += ath6kl_usb.o
4446
ath6kl_usb-y += usb.o
47+
48+
# for tracing framework to find trace.h
49+
CFLAGS_trace.o := -I$(src)

drivers/net/wireless/ath/ath6kl/cfg80211.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static bool ath6kl_is_valid_iftype(struct ath6kl *ar, enum nl80211_iftype type,
402402
if (type == NL80211_IFTYPE_STATION ||
403403
type == NL80211_IFTYPE_AP || type == NL80211_IFTYPE_ADHOC) {
404404
for (i = 0; i < ar->vif_max; i++) {
405-
if ((ar->avail_idx_map >> i) & BIT(0)) {
405+
if ((ar->avail_idx_map) & BIT(i)) {
406406
*if_idx = i;
407407
return true;
408408
}
@@ -412,7 +412,7 @@ static bool ath6kl_is_valid_iftype(struct ath6kl *ar, enum nl80211_iftype type,
412412
if (type == NL80211_IFTYPE_P2P_CLIENT ||
413413
type == NL80211_IFTYPE_P2P_GO) {
414414
for (i = ar->max_norm_iface; i < ar->vif_max; i++) {
415-
if ((ar->avail_idx_map >> i) & BIT(0)) {
415+
if ((ar->avail_idx_map) & BIT(i)) {
416416
*if_idx = i;
417417
return true;
418418
}
@@ -1535,7 +1535,9 @@ static int ath6kl_cfg80211_del_iface(struct wiphy *wiphy,
15351535

15361536
ath6kl_cfg80211_vif_stop(vif, test_bit(WMI_READY, &ar->flag));
15371537

1538+
rtnl_lock();
15381539
ath6kl_cfg80211_vif_cleanup(vif);
1540+
rtnl_unlock();
15391541

15401542
return 0;
15411543
}
@@ -2990,13 +2992,15 @@ static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
29902992
{
29912993
struct ath6kl *ar = ath6kl_priv(dev);
29922994
struct ath6kl_vif *vif = netdev_priv(dev);
2995+
int err;
29932996

29942997
if (vif->nw_type != AP_NETWORK)
29952998
return -EOPNOTSUPP;
29962999

2997-
/* Use this only for authorizing/unauthorizing a station */
2998-
if (!(params->sta_flags_mask & BIT(NL80211_STA_FLAG_AUTHORIZED)))
2999-
return -EOPNOTSUPP;
3000+
err = cfg80211_check_station_change(wiphy, params,
3001+
CFG80211_STA_AP_MLME_CLIENT);
3002+
if (err)
3003+
return err;
30003004

30013005
if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED))
30023006
return ath6kl_wmi_ap_set_mlme(ar->wmi, vif->fw_vif_idx,
@@ -3659,7 +3663,6 @@ struct wireless_dev *ath6kl_interface_add(struct ath6kl *ar, const char *name,
36593663
vif->sme_state = SME_DISCONNECTED;
36603664
set_bit(WLAN_ENABLED, &vif->flags);
36613665
ar->wlan_pwr_state = WLAN_POWER_STATE_ON;
3662-
set_bit(NETDEV_REGISTERED, &vif->flags);
36633666

36643667
if (type == NL80211_IFTYPE_ADHOC)
36653668
ar->ibss_if_active = true;

drivers/net/wireless/ath/ath6kl/core.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,6 @@ enum ath6kl_vif_state {
560560
WMM_ENABLED,
561561
NETQ_STOPPED,
562562
DTIM_EXPIRED,
563-
NETDEV_REGISTERED,
564563
CLEAR_BSSFILTER_ON_BEACON,
565564
DTIM_PERIOD_AVAIL,
566565
WLAN_ENABLED,
@@ -936,8 +935,6 @@ void aggr_recv_addba_req_evt(struct ath6kl_vif *vif, u8 tid, u16 seq_no,
936935
u8 win_sz);
937936
void ath6kl_wakeup_event(void *dev);
938937

939-
void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
940-
bool wait_fot_compltn, bool cold_reset);
941938
void ath6kl_init_control_info(struct ath6kl_vif *vif);
942939
struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar);
943940
void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready);

drivers/net/wireless/ath/ath6kl/debug.c

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,76 @@ int ath6kl_printk(const char *level, const char *fmt, ...)
5656
}
5757
EXPORT_SYMBOL(ath6kl_printk);
5858

59+
int ath6kl_info(const char *fmt, ...)
60+
{
61+
struct va_format vaf = {
62+
.fmt = fmt,
63+
};
64+
va_list args;
65+
int ret;
66+
67+
va_start(args, fmt);
68+
vaf.va = &args;
69+
ret = ath6kl_printk(KERN_INFO, "%pV", &vaf);
70+
trace_ath6kl_log_info(&vaf);
71+
va_end(args);
72+
73+
return ret;
74+
}
75+
EXPORT_SYMBOL(ath6kl_info);
76+
77+
int ath6kl_err(const char *fmt, ...)
78+
{
79+
struct va_format vaf = {
80+
.fmt = fmt,
81+
};
82+
va_list args;
83+
int ret;
84+
85+
va_start(args, fmt);
86+
vaf.va = &args;
87+
ret = ath6kl_printk(KERN_ERR, "%pV", &vaf);
88+
trace_ath6kl_log_err(&vaf);
89+
va_end(args);
90+
91+
return ret;
92+
}
93+
EXPORT_SYMBOL(ath6kl_err);
94+
95+
int ath6kl_warn(const char *fmt, ...)
96+
{
97+
struct va_format vaf = {
98+
.fmt = fmt,
99+
};
100+
va_list args;
101+
int ret;
102+
103+
va_start(args, fmt);
104+
vaf.va = &args;
105+
ret = ath6kl_printk(KERN_WARNING, "%pV", &vaf);
106+
trace_ath6kl_log_warn(&vaf);
107+
va_end(args);
108+
109+
return ret;
110+
}
111+
EXPORT_SYMBOL(ath6kl_warn);
112+
59113
#ifdef CONFIG_ATH6KL_DEBUG
60114

61115
void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...)
62116
{
63117
struct va_format vaf;
64118
va_list args;
65119

66-
if (!(debug_mask & mask))
67-
return;
68-
69120
va_start(args, fmt);
70121

71122
vaf.fmt = fmt;
72123
vaf.va = &args;
73124

74-
ath6kl_printk(KERN_DEBUG, "%pV", &vaf);
125+
if (debug_mask & mask)
126+
ath6kl_printk(KERN_DEBUG, "%pV", &vaf);
127+
128+
trace_ath6kl_log_dbg(mask, &vaf);
75129

76130
va_end(args);
77131
}
@@ -87,6 +141,10 @@ void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
87141

88142
print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len);
89143
}
144+
145+
/* tracing code doesn't like null strings :/ */
146+
trace_ath6kl_log_dbg_dump(msg ? msg : "", prefix ? prefix : "",
147+
buf, len);
90148
}
91149
EXPORT_SYMBOL(ath6kl_dbg_dump);
92150

@@ -1752,8 +1810,10 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)
17521810
debugfs_create_file("tgt_stats", S_IRUSR, ar->debugfs_phy, ar,
17531811
&fops_tgt_stats);
17541812

1755-
debugfs_create_file("credit_dist_stats", S_IRUSR, ar->debugfs_phy, ar,
1756-
&fops_credit_dist_stats);
1813+
if (ar->hif_type == ATH6KL_HIF_TYPE_SDIO)
1814+
debugfs_create_file("credit_dist_stats", S_IRUSR,
1815+
ar->debugfs_phy, ar,
1816+
&fops_credit_dist_stats);
17571817

17581818
debugfs_create_file("endpoint_stats", S_IRUSR | S_IWUSR,
17591819
ar->debugfs_phy, ar, &fops_endpoint_stats);

drivers/net/wireless/ath/ath6kl/debug.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#define DEBUG_H
2020

2121
#include "hif.h"
22+
#include "trace.h"
2223

2324
enum ATH6K_DEBUG_MASK {
2425
ATH6KL_DBG_CREDIT = BIT(0),
@@ -51,13 +52,9 @@ enum ATH6K_DEBUG_MASK {
5152
extern unsigned int debug_mask;
5253
extern __printf(2, 3)
5354
int ath6kl_printk(const char *level, const char *fmt, ...);
54-
55-
#define ath6kl_info(fmt, ...) \
56-
ath6kl_printk(KERN_INFO, fmt, ##__VA_ARGS__)
57-
#define ath6kl_err(fmt, ...) \
58-
ath6kl_printk(KERN_ERR, fmt, ##__VA_ARGS__)
59-
#define ath6kl_warn(fmt, ...) \
60-
ath6kl_printk(KERN_WARNING, fmt, ##__VA_ARGS__)
55+
extern __printf(1, 2) int ath6kl_info(const char *fmt, ...);
56+
extern __printf(1, 2) int ath6kl_err(const char *fmt, ...);
57+
extern __printf(1, 2) int ath6kl_warn(const char *fmt, ...);
6158

6259
enum ath6kl_war {
6360
ATH6KL_WAR_INVALID_RATE,

drivers/net/wireless/ath/ath6kl/hif.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "target.h"
2323
#include "hif-ops.h"
2424
#include "debug.h"
25+
#include "trace.h"
2526

2627
#define MAILBOX_FOR_BLOCK_SIZE 1
2728

@@ -436,6 +437,8 @@ static int proc_pending_irqs(struct ath6kl_device *dev, bool *done)
436437

437438
ath6kl_dump_registers(dev, &dev->irq_proc_reg,
438439
&dev->irq_en_reg);
440+
trace_ath6kl_sdio_irq(&dev->irq_en_reg,
441+
sizeof(dev->irq_en_reg));
439442

440443
/* Update only those registers that are enabled */
441444
host_int_status = dev->irq_proc_reg.host_int_status &

0 commit comments

Comments
 (0)