Skip to content

Commit

Permalink
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/linville/wireless

John W. Linville says:

====================
Please accept this batch of fixes intended for the 3.11 tree...

Alexey Khoroshilov fixes a suspend-related race in ath9k_htc.

Arnd Bergmann corrects the alignment of a structure in the ssb code
to be compatible with ARM devices.

Bob Copeland provides an ath5k fix that corrects a mistaken variable
initialization.

Felix Fietkau corrects some frame accounting for dropped frames
in ath9k.

Geert Uytterhoeven brings a Kconfig fix to indicate the DMA
requirements for rt2x00.

Larry Finger offers two rtlwifi fixes: one that properly initializes
a callback; and, a scattered collection of Kconfig, Makefile, and
EXPORT_SYMBOL changes that correct some build problems.

Finally, Sujith Manoharan provides an ath9k fix to disable a feature
on a specific hardware device.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 21, 2013
2 parents 8d716c7 + 876fbb5 commit f5f7ab6
Show file tree
Hide file tree
Showing 17 changed files with 154 additions and 72 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath5k/mac80211-ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ ath5k_prepare_multicast(struct ieee80211_hw *hw,
struct netdev_hw_addr *ha;

mfilt[0] = 0;
mfilt[1] = 1;
mfilt[1] = 0;

netdev_hw_addr_list_for_each(ha, mc_list) {
/* calculate XOR of eight 6-bit values */
Expand Down
10 changes: 9 additions & 1 deletion drivers/net/wireless/ath/ath9k/ar5008_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,15 @@ static void ar5008_hw_override_ini(struct ath_hw *ah,
REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT));

if (AR_SREV_9280_20_OR_LATER(ah)) {
val = REG_READ(ah, AR_PCU_MISC_MODE2);
/*
* For AR9280 and above, there is a new feature that allows
* Multicast search based on both MAC Address and Key ID.
* By default, this feature is enabled. But since the driver
* is not using this feature, we switch it off; otherwise
* multicast search based on MAC addr only will fail.
*/
val = REG_READ(ah, AR_PCU_MISC_MODE2) &
(~AR_ADHOC_MCAST_KEYID_ENABLE);

if (!AR_SREV_9271(ah))
val &= ~AR_PCU_MISC_MODE2_HWWAR1;
Expand Down
9 changes: 6 additions & 3 deletions drivers/net/wireless/ath/ath9k/hif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ static void ath9k_hif_usb_firmware_fail(struct hif_device_usb *hif_dev)
struct device *dev = &hif_dev->udev->dev;
struct device *parent = dev->parent;

complete(&hif_dev->fw_done);
complete_all(&hif_dev->fw_done);

if (parent)
device_lock(parent);
Expand Down Expand Up @@ -1131,7 +1131,7 @@ static void ath9k_hif_usb_firmware_cb(const struct firmware *fw, void *context)

release_firmware(fw);
hif_dev->flags |= HIF_USB_READY;
complete(&hif_dev->fw_done);
complete_all(&hif_dev->fw_done);

return;

Expand Down Expand Up @@ -1316,7 +1316,10 @@ static int ath9k_hif_usb_suspend(struct usb_interface *interface,
if (!(hif_dev->flags & HIF_USB_START))
ath9k_htc_suspend(hif_dev->htc_handle);

ath9k_hif_usb_dealloc_urbs(hif_dev);
wait_for_completion(&hif_dev->fw_done);

if (hif_dev->flags & HIF_USB_READY)
ath9k_hif_usb_dealloc_urbs(hif_dev);

return 0;
}
Expand Down
44 changes: 28 additions & 16 deletions drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,28 @@ static void ath_set_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta,
ARRAY_SIZE(bf->rates));
}

static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
struct sk_buff *skb)
{
int q;

q = skb_get_queue_mapping(skb);
if (txq == sc->tx.uapsdq)
txq = sc->tx.txq_map[q];

if (txq != sc->tx.txq_map[q])
return;

if (WARN_ON(--txq->pending_frames < 0))
txq->pending_frames = 0;

if (txq->stopped &&
txq->pending_frames < sc->tx.txq_max_pending[q]) {
ieee80211_wake_queue(sc->hw, q);
txq->stopped = false;
}
}

static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
{
struct ath_txq *txq = tid->ac->txq;
Expand All @@ -167,6 +189,7 @@ static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
if (!bf) {
bf = ath_tx_setup_buffer(sc, txq, tid, skb);
if (!bf) {
ath_txq_skb_done(sc, txq, skb);
ieee80211_free_txskb(sc->hw, skb);
continue;
}
Expand Down Expand Up @@ -811,6 +834,7 @@ ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq,

if (!bf) {
__skb_unlink(skb, &tid->buf_q);
ath_txq_skb_done(sc, txq, skb);
ieee80211_free_txskb(sc->hw, skb);
continue;
}
Expand Down Expand Up @@ -1824,6 +1848,7 @@ static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_txq *txq,

bf = ath_tx_setup_buffer(sc, txq, tid, skb);
if (!bf) {
ath_txq_skb_done(sc, txq, skb);
ieee80211_free_txskb(sc->hw, skb);
return;
}
Expand Down Expand Up @@ -2090,6 +2115,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,

bf = ath_tx_setup_buffer(sc, txq, tid, skb);
if (!bf) {
ath_txq_skb_done(sc, txq, skb);
if (txctl->paprd)
dev_kfree_skb_any(skb);
else
Expand Down Expand Up @@ -2189,7 +2215,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data;
int q, padpos, padsize;
int padpos, padsize;
unsigned long flags;

ath_dbg(common, XMIT, "TX complete: skb: %p\n", skb);
Expand Down Expand Up @@ -2225,21 +2251,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
spin_unlock_irqrestore(&sc->sc_pm_lock, flags);

__skb_queue_tail(&txq->complete_q, skb);

q = skb_get_queue_mapping(skb);
if (txq == sc->tx.uapsdq)
txq = sc->tx.txq_map[q];

if (txq == sc->tx.txq_map[q]) {
if (WARN_ON(--txq->pending_frames < 0))
txq->pending_frames = 0;

if (txq->stopped &&
txq->pending_frames < sc->tx.txq_max_pending[q]) {
ieee80211_wake_queue(sc->hw, q);
txq->stopped = false;
}
}
ath_txq_skb_done(sc, txq, skb);
}

static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
menuconfig RT2X00
tristate "Ralink driver support"
depends on MAC80211
depends on MAC80211 && HAS_DMA
---help---
This will enable the support for the Ralink drivers,
developed in the rt2x00 project <http://rt2x00.serialmonkey.com>.
Expand Down
72 changes: 48 additions & 24 deletions drivers/net/wireless/rtlwifi/Kconfig
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
config RTLWIFI
tristate "Realtek wireless card support"
depends on MAC80211
select FW_LOADER
---help---
This is common code for RTL8192CE/RTL8192CU/RTL8192SE/RTL8723AE
drivers. This module does nothing by itself - the various front-end
drivers need to be enabled to support any desired devices.

If you choose to build as a module, it'll be called rtlwifi.

config RTLWIFI_DEBUG
bool "Debugging output for rtlwifi driver family"
depends on RTLWIFI
menuconfig RTL_CARDS
tristate "Realtek rtlwifi family of devices"
depends on MAC80211 && (PCI || USB)
default y
---help---
To use the module option that sets the dynamic-debugging level for,
the front-end driver, this parameter must be "Y". For memory-limited
systems, choose "N". If in doubt, choose "Y".
This option will enable support for the Realtek mac80211-based
wireless drivers. Drivers rtl8192ce, rtl8192cu, rtl8192se, rtl8192de,
rtl8723eu, and rtl8188eu share some common code.

if RTL_CARDS

config RTL8192CE
tristate "Realtek RTL8192CE/RTL8188CE Wireless Network Adapter"
depends on RTLWIFI && PCI
depends on PCI
select RTL8192C_COMMON
select RTLWIFI
select RTLWIFI_PCI
---help---
This is the driver for Realtek RTL8192CE/RTL8188CE 802.11n PCIe
wireless network adapters.
Expand All @@ -30,7 +23,9 @@ config RTL8192CE

config RTL8192SE
tristate "Realtek RTL8192SE/RTL8191SE PCIe Wireless Network Adapter"
depends on RTLWIFI && PCI
depends on PCI
select RTLWIFI
select RTLWIFI_PCI
---help---
This is the driver for Realtek RTL8192SE/RTL8191SE 802.11n PCIe
wireless network adapters.
Expand All @@ -39,7 +34,9 @@ config RTL8192SE

config RTL8192DE
tristate "Realtek RTL8192DE/RTL8188DE PCIe Wireless Network Adapter"
depends on RTLWIFI && PCI
depends on PCI
select RTLWIFI
select RTLWIFI_PCI
---help---
This is the driver for Realtek RTL8192DE/RTL8188DE 802.11n PCIe
wireless network adapters.
Expand All @@ -48,7 +45,9 @@ config RTL8192DE

config RTL8723AE
tristate "Realtek RTL8723AE PCIe Wireless Network Adapter"
depends on RTLWIFI && PCI
depends on PCI
select RTLWIFI
select RTLWIFI_PCI
---help---
This is the driver for Realtek RTL8723AE 802.11n PCIe
wireless network adapters.
Expand All @@ -57,7 +56,9 @@ config RTL8723AE

config RTL8188EE
tristate "Realtek RTL8188EE Wireless Network Adapter"
depends on RTLWIFI && PCI
depends on PCI
select RTLWIFI
select RTLWIFI_PCI
---help---
This is the driver for Realtek RTL8188EE 802.11n PCIe
wireless network adapters.
Expand All @@ -66,15 +67,38 @@ config RTL8188EE

config RTL8192CU
tristate "Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter"
depends on RTLWIFI && USB
depends on USB
select RTLWIFI
select RTLWIFI_USB
select RTL8192C_COMMON
---help---
This is the driver for Realtek RTL8192CU/RTL8188CU 802.11n USB
wireless network adapters.

If you choose to build it as a module, it will be called rtl8192cu

config RTLWIFI
tristate
select FW_LOADER

config RTLWIFI_PCI
tristate

config RTLWIFI_USB
tristate

config RTLWIFI_DEBUG
bool "Debugging output for rtlwifi driver family"
depends on RTLWIFI
default y
---help---
To use the module option that sets the dynamic-debugging level for,
the front-end driver, this parameter must be "Y". For memory-limited
systems, choose "N". If in doubt, choose "Y".

config RTL8192C_COMMON
tristate
depends on RTL8192CE || RTL8192CU
default m
default y

endif
10 changes: 4 additions & 6 deletions drivers/net/wireless/rtlwifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ rtlwifi-objs := \

rtl8192c_common-objs += \

ifneq ($(CONFIG_PCI),)
rtlwifi-objs += pci.o
endif
obj-$(CONFIG_RTLWIFI_PCI) += rtl_pci.o
rtl_pci-objs := pci.o

ifneq ($(CONFIG_USB),)
rtlwifi-objs += usb.o
endif
obj-$(CONFIG_RTLWIFI_USB) += rtl_usb.o
rtl_usb-objs := usb.o

obj-$(CONFIG_RTL8192C_COMMON) += rtl8192c/
obj-$(CONFIG_RTL8192CE) += rtl8192ce/
Expand Down
Loading

0 comments on commit f5f7ab6

Please sign in to comment.