Skip to content

Commit 40d1ae5

Browse files
committed
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says: ==================== This probably is the last big pull request for wireless bits for 3.9. Of course, I'm sure there will be a few stragglers here and there...surely a few bug fixes as well... :-) (In fact, I see that Johannes has already queued-up a few more for me while I was preparing this...) Included are a number of pulls... For mac80211-next, Johannes says: "The biggest change I have is undoubtedly Marco's mesh powersave implementation. Beyond that, I have a patch from Emmanuel to modify the DTIM period API in mac80211, scan improvements and a removal of some previous workaround code from Stanislaw, dynamic short slot time from Thomas and 64-bit station byte counters from Vladimir. I also made a number of changes myself, some related to WoWLAN, some auth/deauth improvements and most of them BSS list cleanups." "This time, I have relatively large number of fixes in various areas of the code (a memory leak in regulatory, an RX race in mac80211, the new radar checking caused a P2P device problem, some mesh issues with stations, an older bug in tracing and for kernel-doc) as well as a number of small new features. The biggest (in the diffstat) is my work on hidden SSID tracking." "Please pull to get * radar detection work from Simon * mesh improvements from Thomas * a connection monitoring/powersave fix from Wojciech * TDLS-related station management work from Jouni * VLAN crypto fixes from Michael Braun * CCK support in minstrel_ht from Felix * an SMPS (not SMSP, oops) related improvement in mac80211 (Emmanuel) * some WoWLAN work from Amitkumar Karwar: pattern match offset and a documentation fix * some WoWLAN work from myself (TCP connection wakeup feature API) * and a lot of VHT (and some HT) work (also from myself) And a number of more random cleanups/fixes. I merged mac80211/master to avoid a merge problem there." And regarding iwlwifi-next, Johannes says: "We continue work on our new driver, but I also have a WoWLAN and AP mode improvement for the previous driver and a change to use threaded interrupts to prepare us for working with non-PCIe devices." Regarding wl12xx, Luca says: "A few more patches intended for 3.9. Mostly some clean-ups I've been doing to make it easier to support device-tree. Also including one bug fix for wl12xx where the rates we advertise were wrong and an update in the wlconf structure to support newer firmwares." For the nfc-next bits, Samuel says: "This is the second NFC pull request for 3.9. We have: - A few pn533 fixes on top of Waldemar refactorization of the driver, one of them fixes target mode. - A new driver for Inside Secure microread chipset. It supports two physical layers: i2c and MEI. The MEI one depends on a patchset that's been sent to Greg Kroah-Hartman for inclusion into the 3.9 kernel [1]. The dependency is a KConfig one which means this code is not buildable as long as the MEI API is not usptream." "This 3rd NFC pull request for 3.9 contains a fix for the microread MEI physical layer support, as the MEI bus API changed. From the MEI code, we now pass the MEI id back to the driver probe routine, and we also pass a name and a MEI id table through the mei_bus_driver structure. A few renames as well like e.g. mei_bus_driver to mei_driver or mei_bus_client to mei_device in order to be closer to the driver model practices." For the ath6kl bits, Kalle says: "There's not anything special here, most of the patches are just code cleanup. The only functional changes are using the beacon interval from user space and fixing a crash which happens when inserting and removing the module in a loop." Also, I pulled the wireless tree in order to resolve some pending merge issues. On top of that, there is a bunch of work on brcmfmac that leads up to P2P support. Also, mwifiex, rtlwifi, and a variety of other drivers see some basic cleanups and minor enhancements. Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 6cf1c5f + 98d5fac commit 40d1ae5

189 files changed

Lines changed: 12387 additions & 3236 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.

‎arch/arm/mach-omap2/board-omap3evm.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static struct omap2_hsmmc_info mmc[] = {
309309
.gpio_wp = 63,
310310
.deferred = true,
311311
},
312-
#ifdef CONFIG_WL12XX_PLATFORM_DATA
312+
#ifdef CONFIG_WILINK_PLATFORM_DATA
313313
{
314314
.name = "wl1271",
315315
.mmc = 2,
@@ -450,7 +450,7 @@ static struct regulator_init_data omap3evm_vio = {
450450
.consumer_supplies = omap3evm_vio_supply,
451451
};
452452

453-
#ifdef CONFIG_WL12XX_PLATFORM_DATA
453+
#ifdef CONFIG_WILINK_PLATFORM_DATA
454454

455455
#define OMAP3EVM_WLAN_PMENA_GPIO (150)
456456
#define OMAP3EVM_WLAN_IRQ_GPIO (149)
@@ -563,7 +563,7 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = {
563563
OMAP_PIN_OFF_NONE),
564564
OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
565565
OMAP_PIN_OFF_NONE),
566-
#ifdef CONFIG_WL12XX_PLATFORM_DATA
566+
#ifdef CONFIG_WILINK_PLATFORM_DATA
567567
/* WLAN IRQ - GPIO 149 */
568568
OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
569569

@@ -601,7 +601,7 @@ static struct omap_board_mux omap36x_board_mux[] __initdata = {
601601
OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
602602
OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
603603
OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
604-
#ifdef CONFIG_WL12XX_PLATFORM_DATA
604+
#ifdef CONFIG_WILINK_PLATFORM_DATA
605605
/* WLAN IRQ - GPIO 149 */
606606
OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
607607

@@ -637,7 +637,7 @@ static struct gpio omap3_evm_ehci_gpios[] __initdata = {
637637

638638
static void __init omap3_evm_wl12xx_init(void)
639639
{
640-
#ifdef CONFIG_WL12XX_PLATFORM_DATA
640+
#ifdef CONFIG_WILINK_PLATFORM_DATA
641641
int ret;
642642

643643
/* WL12xx WLAN Init */

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,6 +1613,10 @@ ath5k_hw_update_noise_floor(struct ath5k_hw *ah)
16131613
ah->ah_cal_mask |= AR5K_CALIBRATION_NF;
16141614

16151615
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+
}
16161620

16171621
/* completed NF calibration, test threshold */
16181622
nf = ath5k_hw_read_measured_noise_floor(ah);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,8 @@ ath5k_hw_commit_eeprom_settings(struct ath5k_hw *ah,
985985
return;
986986

987987
ee_mode = ath5k_eeprom_mode_from_channel(channel);
988+
if (WARN_ON(ee_mode < 0))
989+
return;
988990

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

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

Lines changed: 73 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,30 @@ static bool ath6kl_is_tx_pending(struct ath6kl *ar)
427427
return ar->tx_pending[ath6kl_wmi_get_control_ep(ar->wmi)] == 0;
428428
}
429429

430+
static void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif,
431+
bool enable)
432+
{
433+
int err;
434+
435+
if (WARN_ON(!test_bit(WMI_READY, &vif->ar->flag)))
436+
return;
437+
438+
if (vif->nw_type != INFRA_NETWORK)
439+
return;
440+
441+
if (!test_bit(ATH6KL_FW_CAPABILITY_BMISS_ENHANCE,
442+
vif->ar->fw_capabilities))
443+
return;
444+
445+
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s fw bmiss enhance\n",
446+
enable ? "enable" : "disable");
447+
448+
err = ath6kl_wmi_sta_bmiss_enhance_cmd(vif->ar->wmi,
449+
vif->fw_vif_idx, enable);
450+
if (err)
451+
ath6kl_err("failed to %s enhanced bmiss detection: %d\n",
452+
enable ? "enable" : "disable", err);
453+
}
430454

431455
static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
432456
struct cfg80211_connect_params *sme)
@@ -616,13 +640,13 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
616640
vif->req_bssid, vif->ch_hint,
617641
ar->connect_ctrl_flags, nw_subtype);
618642

619-
/* disable background scan if period is 0 */
620-
if (sme->bg_scan_period == 0)
643+
if (sme->bg_scan_period == 0) {
644+
/* disable background scan if period is 0 */
621645
sme->bg_scan_period = 0xffff;
622-
623-
/* configure default value if not specified */
624-
if (sme->bg_scan_period == -1)
646+
} else if (sme->bg_scan_period == -1) {
647+
/* configure default value if not specified */
625648
sme->bg_scan_period = DEFAULT_BG_SCAN_PERIOD;
649+
}
626650

627651
ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0, 0,
628652
sme->bg_scan_period, 0, 0, 0, 3, 0, 0, 0);
@@ -767,7 +791,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel,
767791
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "ad-hoc %s selected\n",
768792
nw_type & ADHOC_CREATOR ? "creator" : "joiner");
769793
cfg80211_ibss_joined(vif->ndev, bssid, GFP_KERNEL);
770-
cfg80211_put_bss(bss);
794+
cfg80211_put_bss(ar->wiphy, bss);
771795
return;
772796
}
773797

@@ -778,7 +802,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel,
778802
assoc_req_ie, assoc_req_len,
779803
assoc_resp_ie, assoc_resp_len,
780804
WLAN_STATUS_SUCCESS, GFP_KERNEL);
781-
cfg80211_put_bss(bss);
805+
cfg80211_put_bss(ar->wiphy, bss);
782806
} else if (vif->sme_state == SME_CONNECTED) {
783807
/* inform roam event to cfg80211 */
784808
cfg80211_roamed_bss(vif->ndev, bss, assoc_req_ie, assoc_req_len,
@@ -1454,10 +1478,10 @@ static int ath6kl_cfg80211_set_power_mgmt(struct wiphy *wiphy,
14541478
return -EIO;
14551479

14561480
if (pmgmt) {
1457-
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: max perf\n", __func__);
1481+
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: rec power\n", __func__);
14581482
mode.pwr_mode = REC_POWER;
14591483
} else {
1460-
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: rec power\n", __func__);
1484+
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: max perf\n", __func__);
14611485
mode.pwr_mode = MAX_PERF_POWER;
14621486
}
14631487

@@ -1509,7 +1533,7 @@ static int ath6kl_cfg80211_del_iface(struct wiphy *wiphy,
15091533
list_del(&vif->list);
15101534
spin_unlock_bh(&ar->list_lock);
15111535

1512-
ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag));
1536+
ath6kl_cfg80211_vif_stop(vif, test_bit(WMI_READY, &ar->flag));
15131537

15141538
ath6kl_cfg80211_vif_cleanup(vif);
15151539

@@ -1559,17 +1583,13 @@ static int ath6kl_cfg80211_change_iface(struct wiphy *wiphy,
15591583
set_iface_type:
15601584
switch (type) {
15611585
case NL80211_IFTYPE_STATION:
1586+
case NL80211_IFTYPE_P2P_CLIENT:
15621587
vif->next_mode = INFRA_NETWORK;
15631588
break;
15641589
case NL80211_IFTYPE_ADHOC:
15651590
vif->next_mode = ADHOC_NETWORK;
15661591
break;
15671592
case NL80211_IFTYPE_AP:
1568-
vif->next_mode = AP_NETWORK;
1569-
break;
1570-
case NL80211_IFTYPE_P2P_CLIENT:
1571-
vif->next_mode = INFRA_NETWORK;
1572-
break;
15731593
case NL80211_IFTYPE_P2P_GO:
15741594
vif->next_mode = AP_NETWORK;
15751595
break;
@@ -1778,14 +1798,14 @@ static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev,
17781798

17791799
if (vif->target_stats.rx_byte) {
17801800
sinfo->rx_bytes = vif->target_stats.rx_byte;
1781-
sinfo->filled |= STATION_INFO_RX_BYTES;
1801+
sinfo->filled |= STATION_INFO_RX_BYTES64;
17821802
sinfo->rx_packets = vif->target_stats.rx_pkt;
17831803
sinfo->filled |= STATION_INFO_RX_PACKETS;
17841804
}
17851805

17861806
if (vif->target_stats.tx_byte) {
17871807
sinfo->tx_bytes = vif->target_stats.tx_byte;
1788-
sinfo->filled |= STATION_INFO_TX_BYTES;
1808+
sinfo->filled |= STATION_INFO_TX_BYTES64;
17891809
sinfo->tx_packets = vif->target_stats.tx_pkt;
17901810
sinfo->filled |= STATION_INFO_TX_PACKETS;
17911811
}
@@ -2673,30 +2693,6 @@ static int ath6kl_set_ies(struct ath6kl_vif *vif,
26732693
return 0;
26742694
}
26752695

2676-
void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable)
2677-
{
2678-
int err;
2679-
2680-
if (WARN_ON(!test_bit(WMI_READY, &vif->ar->flag)))
2681-
return;
2682-
2683-
if (vif->nw_type != INFRA_NETWORK)
2684-
return;
2685-
2686-
if (!test_bit(ATH6KL_FW_CAPABILITY_BMISS_ENHANCE,
2687-
vif->ar->fw_capabilities))
2688-
return;
2689-
2690-
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s fw bmiss enhance\n",
2691-
enable ? "enable" : "disable");
2692-
2693-
err = ath6kl_wmi_sta_bmiss_enhance_cmd(vif->ar->wmi,
2694-
vif->fw_vif_idx, enable);
2695-
if (err)
2696-
ath6kl_err("failed to %s enhanced bmiss detection: %d\n",
2697-
enable ? "enable" : "disable", err);
2698-
}
2699-
27002696
static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
27012697
u8 *rsn_capab)
27022698
{
@@ -2776,9 +2772,11 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
27762772

27772773
ar->ap_mode_bkey.valid = false;
27782774

2779-
/* TODO:
2780-
* info->interval
2781-
*/
2775+
ret = ath6kl_wmi_ap_set_beacon_intvl_cmd(ar->wmi, vif->fw_vif_idx,
2776+
info->beacon_interval);
2777+
2778+
if (ret)
2779+
ath6kl_warn("Failed to set beacon interval: %d\n", ret);
27822780

27832781
ret = ath6kl_wmi_ap_set_dtim_cmd(ar->wmi, vif->fw_vif_idx,
27842782
info->dtim_period);
@@ -3557,6 +3555,37 @@ static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif)
35573555
return 0;
35583556
}
35593557

3558+
void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready)
3559+
{
3560+
static u8 bcast_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
3561+
bool discon_issued;
3562+
3563+
netif_stop_queue(vif->ndev);
3564+
3565+
clear_bit(WLAN_ENABLED, &vif->flags);
3566+
3567+
if (wmi_ready) {
3568+
discon_issued = test_bit(CONNECTED, &vif->flags) ||
3569+
test_bit(CONNECT_PEND, &vif->flags);
3570+
ath6kl_disconnect(vif);
3571+
del_timer(&vif->disconnect_timer);
3572+
3573+
if (discon_issued)
3574+
ath6kl_disconnect_event(vif, DISCONNECT_CMD,
3575+
(vif->nw_type & AP_NETWORK) ?
3576+
bcast_mac : vif->bssid,
3577+
0, NULL, 0);
3578+
}
3579+
3580+
if (vif->scan_req) {
3581+
cfg80211_scan_done(vif->scan_req, true);
3582+
vif->scan_req = NULL;
3583+
}
3584+
3585+
/* need to clean up enhanced bmiss detection fw state */
3586+
ath6kl_cfg80211_sta_bmiss_enhance(vif, false);
3587+
}
3588+
35603589
void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif)
35613590
{
35623591
struct ath6kl *ar = vif->ar;

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,5 @@ void ath6kl_cfg80211_cleanup(struct ath6kl *ar);
6161

6262
struct ath6kl *ath6kl_cfg80211_create(void);
6363
void ath6kl_cfg80211_destroy(struct ath6kl *ar);
64-
/* TODO: remove this once ath6kl_vif_cleanup() is moved to cfg80211.c */
65-
void ath6kl_cfg80211_sta_bmiss_enhance(struct ath6kl_vif *vif, bool enable);
6664

6765
#endif /* ATH6KL_CFG80211_H */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
940940
bool wait_fot_compltn, bool cold_reset);
941941
void ath6kl_init_control_info(struct ath6kl_vif *vif);
942942
struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar);
943-
void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready);
943+
void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready);
944944
int ath6kl_init_hw_start(struct ath6kl *ar);
945945
int ath6kl_init_hw_stop(struct ath6kl *ar);
946946
int ath6kl_init_fetch_firmwares(struct ath6kl *ar);

‎drivers/net/wireless/ath/ath6kl/htc_pipe.c‎

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,7 @@ static void destroy_htc_txctrl_packet(struct htc_packet *packet)
509509
{
510510
struct sk_buff *skb;
511511
skb = packet->skb;
512-
if (skb != NULL)
513-
dev_kfree_skb(skb);
514-
512+
dev_kfree_skb(skb);
515513
kfree(packet);
516514
}
517515

@@ -969,6 +967,22 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb,
969967
u16 payload_len;
970968
int status = 0;
971969

970+
/*
971+
* ar->htc_target can be NULL due to a race condition that can occur
972+
* during driver initialization(we do 'ath6kl_hif_power_on' before
973+
* initializing 'ar->htc_target' via 'ath6kl_htc_create').
974+
* 'ath6kl_hif_power_on' assigns 'ath6kl_recv_complete' as
975+
* usb_complete_t/callback function for 'usb_fill_bulk_urb'.
976+
* Thus the possibility of ar->htc_target being NULL
977+
* via ath6kl_recv_complete -> ath6kl_usb_io_comp_work.
978+
*/
979+
if (WARN_ON_ONCE(!target)) {
980+
ath6kl_err("Target not yet initialized\n");
981+
status = -EINVAL;
982+
goto free_skb;
983+
}
984+
985+
972986
netdata = skb->data;
973987
netlen = skb->len;
974988

@@ -1054,6 +1068,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb,
10541068

10551069
dev_kfree_skb(skb);
10561070
skb = NULL;
1071+
10571072
goto free_skb;
10581073
}
10591074

@@ -1089,8 +1104,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb,
10891104
skb = NULL;
10901105

10911106
free_skb:
1092-
if (skb != NULL)
1093-
dev_kfree_skb(skb);
1107+
dev_kfree_skb(skb);
10941108

10951109
return status;
10961110

@@ -1184,7 +1198,7 @@ static void reset_endpoint_states(struct htc_target *target)
11841198
INIT_LIST_HEAD(&ep->pipe.tx_lookup_queue);
11851199
INIT_LIST_HEAD(&ep->rx_bufq);
11861200
ep->target = target;
1187-
ep->pipe.tx_credit_flow_enabled = (bool) 1; /* FIXME */
1201+
ep->pipe.tx_credit_flow_enabled = true;
11881202
}
11891203
}
11901204

0 commit comments

Comments
 (0)