mac80211: update to wireless-testing 2014-01-23

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39427
This commit is contained in:
Felix Fietkau 2014-01-30 13:21:36 +00:00
parent 2725913d2a
commit eb7a1ba94b
56 changed files with 1453 additions and 15559 deletions

View file

@ -10,11 +10,11 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=2013-11-05
PKG_RELEASE:=5
PKG_VERSION:=2014-01-23
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_BACKPORT_VERSION:=
PKG_MD5SUM:=5ef839d02d19c341629555a529beebee
PKG_MD5SUM:=5921cc325d9fdf81532e14e47dff0094
PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.bz2
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)

View file

@ -6,11 +6,11 @@
+#ifdef CONFIG_COMPAT_BLUETOOTH
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
#ifdef CONFIG_TTY
/*
* Termios Helper Methods
@@ -112,4 +113,4 @@ int tty_set_termios(struct tty_struct *t
}
@@ -114,4 +115,4 @@ int tty_set_termios(struct tty_struct *t
EXPORT_SYMBOL_GPL(tty_set_termios);
#endif /* CONFIG_TTY */
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) */
-
+#endif

View file

@ -1,6 +1,6 @@
--- a/.local-symbols
+++ b/.local-symbols
@@ -382,42 +382,6 @@ USB_CDC_PHONET=
@@ -381,42 +381,6 @@ USB_CDC_PHONET=
USB_IPHETH=
USB_SIERRA_NET=
USB_VL600=
@ -40,9 +40,9 @@
-BCMA_DRIVER_GMAC_CMN=
-BCMA_DRIVER_GPIO=
-BCMA_DEBUG=
DRM=
DRM_USB=
DRM_KMS_HELPER=
NFC=
NFC_DIGITAL=
NFC_NCI=
--- a/Kconfig
+++ b/Kconfig
@@ -33,9 +33,6 @@ source drivers/net/wireless/Kconfig
@ -52,12 +52,12 @@
-source drivers/ssb/Kconfig
-source drivers/bcma/Kconfig
-
source drivers/gpu/drm/Kconfig
source net/nfc/Kconfig
source drivers/regulator/Kconfig
--- a/Makefile.kernel
+++ b/Makefile.kernel
@@ -26,8 +26,6 @@ obj-$(CPTCFG_MAC80211) += net/mac80211/
@@ -25,8 +25,6 @@ obj-$(CPTCFG_MAC80211) += net/mac80211/
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
obj-$(CPTCFG_BT) += net/bluetooth/
obj-$(CPTCFG_BT) += drivers/bluetooth/
@ -65,10 +65,10 @@
-obj-$(CPTCFG_BCMA) += drivers/bcma/
obj-$(CPTCFG_ETHERNET) += drivers/net/ethernet/
obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/
obj-$(CPTCFG_DRM) += drivers/gpu/drm/
obj-$(CPTCFG_NFC) += net/nfc/
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2729,7 +2729,7 @@ static struct ssb_device *b43_ssb_gpio_d
@@ -2734,7 +2734,7 @@ static struct ssb_device *b43_ssb_gpio_d
{
struct ssb_bus *bus = dev->dev->sdev->bus;
@ -77,7 +77,7 @@
return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
#else
return bus->chipco.dev;
@@ -4736,7 +4736,7 @@ static int b43_wireless_core_init(struct
@@ -4738,7 +4738,7 @@ static int b43_wireless_core_init(struct
}
if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */

View file

@ -1,65 +0,0 @@
backports: use old led api on old kernel versions.
Usage of a new led api was introduced in mac80211, this patch make
backports use the old api on older kernel versions. This could cause a
problem with the led, the transmit led could stay on if nothing is
transfered.
This backports the following upstream commit:
commit e47f2509e5f182f4df144406de6f2bc78179d57e
Author: Fabio Baltieri <fabio.baltieri@gmail.com>
Date: Thu Jul 25 12:00:26 2013 +0200
mac80211: use oneshot blink API for LED triggers
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1122,6 +1122,9 @@ struct ieee80211_local {
u32 dot11TransmittedFrameCount;
#ifdef CPTCFG_MAC80211_LEDS
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)
+ int tx_led_counter, rx_led_counter;
+#endif
struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led;
struct tpt_led_trigger *tpt_led_trigger;
char tx_led_name[32], rx_led_name[32],
--- a/net/mac80211/led.c
+++ b/net/mac80211/led.c
@@ -16,18 +16,36 @@
void ieee80211_led_rx(struct ieee80211_local *local)
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
unsigned long led_delay = MAC80211_BLINK_DELAY;
+#endif
if (unlikely(!local->rx_led))
return;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
led_trigger_blink_oneshot(local->rx_led, &led_delay, &led_delay, 0);
+#else
+ if (local->rx_led_counter++ % 2 == 0)
+ led_trigger_event(local->rx_led, LED_OFF);
+ else
+ led_trigger_event(local->rx_led, LED_FULL);
+#endif
}
void ieee80211_led_tx(struct ieee80211_local *local)
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
unsigned long led_delay = MAC80211_BLINK_DELAY;
+#endif
if (unlikely(!local->tx_led))
return;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
led_trigger_blink_oneshot(local->tx_led, &led_delay, &led_delay, 0);
+#else
+ if (local->tx_led_counter++ % 2 == 0)
+ led_trigger_event(local->tx_led, LED_OFF);
+ else
+ led_trigger_event(local->tx_led, LED_FULL);
+#endif
}
void ieee80211_led_assoc(struct ieee80211_local *local, bool associated)

View file

@ -235,7 +235,7 @@
#endif /* AES_CCM_H */
--- a/net/mac80211/key.h
+++ b/net/mac80211/key.h
@@ -83,7 +83,7 @@ struct ieee80211_key {
@@ -84,7 +84,7 @@ struct ieee80211_key {
* Management frames.
*/
u8 rx_pn[IEEE80211_NUM_TIDS + 1][IEEE80211_CCMP_PN_LEN];

View file

@ -1,6 +1,6 @@
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -291,7 +291,7 @@ void ieee80211_restart_hw(struct ieee802
@@ -283,7 +283,7 @@ void ieee80211_restart_hw(struct ieee802
}
EXPORT_SYMBOL(ieee80211_restart_hw);
@ -9,7 +9,7 @@
static int ieee80211_ifa_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
@@ -350,7 +350,7 @@ static int ieee80211_ifa_changed(struct
@@ -342,7 +342,7 @@ static int ieee80211_ifa_changed(struct
}
#endif
@ -18,7 +18,7 @@
static int ieee80211_ifa6_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
@@ -978,14 +978,14 @@ int ieee80211_register_hw(struct ieee802
@@ -1025,14 +1025,14 @@ int ieee80211_register_hw(struct ieee802
goto fail_pm_qos;
}
@ -35,7 +35,7 @@
local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
result = register_inet6addr_notifier(&local->ifa6_notifier);
if (result)
@@ -994,13 +994,13 @@ int ieee80211_register_hw(struct ieee802
@@ -1041,13 +1041,13 @@ int ieee80211_register_hw(struct ieee802
return 0;
@ -52,7 +52,7 @@
fail_ifa:
pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
&local->network_latency_notifier);
@@ -1033,10 +1033,10 @@ void ieee80211_unregister_hw(struct ieee
@@ -1080,10 +1080,10 @@ void ieee80211_unregister_hw(struct ieee
pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
&local->network_latency_notifier);

View file

@ -0,0 +1,49 @@
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1044,9 +1044,14 @@ static void ieee80211_uninit(struct net_
ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
static u16 ieee80211_netdev_select_queue(struct net_device *dev,
struct sk_buff *skb,
void *accel_priv)
+#else
+static u16 ieee80211_netdev_select_queue(struct net_device *dev,
+ struct sk_buff *skb)
+#endif
{
return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
}
@@ -1062,9 +1067,14 @@ static const struct net_device_ops ieee8
.ndo_select_queue = ieee80211_netdev_select_queue,
};
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
static u16 ieee80211_monitor_select_queue(struct net_device *dev,
struct sk_buff *skb,
void *accel_priv)
+#else
+static u16 ieee80211_monitor_select_queue(struct net_device *dev,
+ struct sk_buff *skb)
+#endif
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -746,9 +746,14 @@ static struct net_device_stats *mwifiex_
return &priv->stats;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
static u16
mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb,
void *accel_priv)
+#else
+static u16
+mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb)
+#endif
{
skb->priority = cfg80211_classify8021d(skb, NULL);
return mwifiex_1d_to_wmm_queue[skb->priority];

View file

@ -17,7 +17,7 @@
{ AR5K_RXNOFRM, 8 },
--- a/drivers/net/wireless/ath/ath5k/dma.c
+++ b/drivers/net/wireless/ath/ath5k/dma.c
@@ -860,10 +860,18 @@ ath5k_hw_dma_init(struct ath5k_hw *ah)
@@ -869,10 +869,18 @@ ath5k_hw_dma_init(struct ath5k_hw *ah)
* guess we can tweak it and see how it goes ;-)
*/
if (ah->ah_version != AR5K_AR5210) {

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2117,7 +2117,7 @@ static int ieee80211_scan(struct wiphy *
@@ -2142,7 +2142,7 @@ static int ieee80211_scan(struct wiphy *
* the frames sent while scanning on other channel will be
* lost)
*/

View file

@ -12,7 +12,7 @@
ccflags-y += -D__CHECK_ENDIAN__
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -280,13 +280,6 @@ void _ath_dbg(struct ath_common *common,
@@ -282,13 +282,6 @@ void _ath_dbg(struct ath_common *common,
#endif /* CPTCFG_ATH_DEBUG */
/** Returns string describing opmode, or NULL if unknown mode. */

View file

@ -8,7 +8,7 @@
#include <asm/unaligned.h>
#include "hw.h"
@@ -462,8 +463,16 @@ static int ath9k_hw_init_macaddr(struct
@@ -449,8 +450,16 @@ static int ath9k_hw_init_macaddr(struct
common->macaddr[2 * i] = eeval >> 8;
common->macaddr[2 * i + 1] = eeval & 0xff;
}

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -196,6 +196,10 @@ ath_reg_apply_beaconing_flags(struct wip
@@ -341,6 +341,10 @@ ath_reg_apply_beaconing_flags(struct wip
struct ieee80211_channel *ch;
unsigned int i;
@ -9,11 +9,11 @@
+#endif
+
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
if (!wiphy->bands[band])
@@ -249,6 +253,10 @@ ath_reg_apply_active_scan_flags(struct w
struct ieee80211_channel *ch;
const struct ieee80211_reg_rule *reg_rule;
continue;
@@ -374,6 +378,10 @@ ath_reg_apply_ir_flags(struct wiphy *wip
{
struct ieee80211_supported_band *sband;
+#ifdef CPTCFG_ATH_USER_REGD
+ return;
@ -22,7 +22,7 @@
sband = wiphy->bands[IEEE80211_BAND_2GHZ];
if (!sband)
return;
@@ -298,6 +306,10 @@ static void ath_reg_apply_radar_flags(st
@@ -402,6 +410,10 @@ static void ath_reg_apply_radar_flags(st
struct ieee80211_channel *ch;
unsigned int i;
@ -33,7 +33,7 @@
if (!wiphy->bands[IEEE80211_BAND_5GHZ])
return;
@@ -606,6 +618,10 @@ ath_regd_init_wiphy(struct ath_regulator
@@ -631,6 +643,10 @@ ath_regd_init_wiphy(struct ath_regulator
{
const struct ieee80211_regdomain *regd;
@ -42,8 +42,8 @@
+#endif
+
wiphy->reg_notifier = reg_notifier;
wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
wiphy->regulatory_flags |= REGULATORY_STRICT_REG |
REGULATORY_CUSTOM_REG;
--- a/drivers/net/wireless/ath/Kconfig
+++ b/drivers/net/wireless/ath/Kconfig
@@ -21,6 +21,9 @@ menuconfig ATH_CARDS
@ -58,7 +58,7 @@
---help---
--- a/.local-symbols
+++ b/.local-symbols
@@ -126,6 +126,7 @@ RTL8187_LEDS=
@@ -121,6 +121,7 @@ RTL8187_LEDS=
ATH_COMMON=
ATH_CARDS=
ATH_DEBUG=

View file

@ -1,7 +1,7 @@
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -42,7 +42,8 @@ static int __ath_regd_init(struct ath_re
NL80211_RRF_NO_IR | NL80211_RRF_NO_OFDM)
@@ -43,7 +43,8 @@ static int __ath_regd_init(struct ath_re
NL80211_RRF_NO_OFDM)
/* We allow IBSS on these on a case by case basis by regulatory domain */
-#define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 80, 0, 30,\
@ -10,7 +10,7 @@
NL80211_RRF_NO_IR)
#define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 80, 0, 30,\
NL80211_RRF_NO_IR)
@@ -60,57 +61,56 @@ static int __ath_regd_init(struct ath_re
@@ -61,57 +62,56 @@ static int __ath_regd_init(struct ath_re
#define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
ATH9K_5GHZ_5725_5850
@ -81,4 +81,4 @@
+ )
};
static inline bool is_wwr_sku(u16 regd)
static bool dynamic_country_user_possible(struct ath_regulatory *reg)

View file

@ -1,6 +1,6 @@
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1706,6 +1706,8 @@ void regulatory_hint_country_ie(struct w
@@ -1878,6 +1878,8 @@ void regulatory_hint_country_ie(struct w
enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request = NULL, *lr;
@ -9,7 +9,7 @@
/* IE len must be evenly divisible by 2 */
if (country_ie_len & 0x01)
return;
@@ -1900,6 +1902,7 @@ static void restore_regulatory_settings(
@@ -2072,6 +2074,7 @@ static void restore_regulatory_settings(
void regulatory_hint_disconnect(void)
{

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -865,6 +865,7 @@ static const struct ieee80211_iface_limi
@@ -866,6 +866,7 @@ static const struct ieee80211_iface_limi
#endif
BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_P2P_GO) },

View file

@ -18,7 +18,7 @@
goto end;
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1951,7 +1951,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
@@ -1934,7 +1934,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
}
if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs +
@ -27,7 +27,7 @@
ah->opmode == NL80211_IFTYPE_MESH_POINT) {
u64 tsf = ath5k_hw_get_tsf64(ah);
u32 tsftu = TSF_TO_TU(tsf);
@@ -2037,7 +2037,7 @@ ath5k_beacon_update_timers(struct ath5k_
@@ -2020,7 +2020,7 @@ ath5k_beacon_update_timers(struct ath5k_
intval = ah->bintval & AR5K_BEACON_PERIOD;
if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs
@ -36,7 +36,7 @@
intval /= ATH_BCBUF; /* staggered multi-bss beacons */
if (intval < 15)
ATH5K_WARN(ah, "intval %u is too low, min 15\n",
@@ -2504,6 +2504,7 @@ static const struct ieee80211_iface_limi
@@ -2487,6 +2487,7 @@ static const struct ieee80211_iface_limi
BIT(NL80211_IFTYPE_MESH_POINT) |
#endif
BIT(NL80211_IFTYPE_AP) },

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1528,6 +1528,53 @@ void ath9k_deinit_debug(struct ath_softc
@@ -1477,6 +1477,53 @@ void ath9k_deinit_debug(struct ath_softc
ath9k_spectral_deinit_debug(sc);
}
@ -54,7 +54,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1547,6 +1594,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1496,6 +1543,8 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_tx99_init_debug(sc);
ath9k_spectral_init_debug(sc);

View file

@ -71,7 +71,7 @@
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -707,6 +707,7 @@ enum ath_cal_list {
@@ -724,6 +724,7 @@ enum ath_cal_list {
#define AH_USE_EEPROM 0x1
#define AH_UNPLUGGED 0x2 /* The card has been physically removed. */
#define AH_FASTCC 0x4
@ -81,7 +81,7 @@
struct ath_ops reg_ops;
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -719,6 +719,8 @@ static int ath9k_init_softc(u16 devid, s
@@ -722,6 +722,8 @@ static int ath9k_init_softc(u16 devid, s
ah->is_clk_25mhz = pdata->is_clk_25mhz;
ah->get_mac_revision = pdata->get_mac_revision;
ah->external_reset = pdata->external_reset;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -1108,23 +1108,23 @@ static int __init ath9k_init(void)
@@ -1111,23 +1111,23 @@ static int __init ath9k_init(void)
goto err_out;
}

View file

@ -1,13 +1,18 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1978,8 +1978,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
REG_WRITE(ah, AR_OBS, 8);
@@ -359,13 +359,8 @@ static void ath9k_hw_init_config(struct
if (ah->config.rx_intr_mitigation) {
- REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500);
- REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 2000);
+ REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 250);
+ REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 500);
}
ah->config.rx_intr_mitigation = true;
if (ah->config.tx_intr_mitigation) {
- if (AR_SREV_9300_20_OR_LATER(ah)) {
- ah->config.rimt_last = 500;
- ah->config.rimt_first = 2000;
- } else {
- ah->config.rimt_last = 250;
- ah->config.rimt_first = 700;
- }
+ ah->config.rimt_last = 250;
+ ah->config.rimt_first = 500;
/*
* We need this for PCI devices only (Cardbus, PCI, miniPCI)

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1575,6 +1575,52 @@ static const struct file_operations fops
@@ -1524,6 +1524,52 @@ static const struct file_operations fops
.owner = THIS_MODULE
};
@ -53,7 +53,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1596,6 +1642,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1545,6 +1591,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
&fops_eeprom);
@ -64,7 +64,7 @@
debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -129,6 +129,7 @@ struct ath_common {
@@ -130,6 +130,7 @@ struct ath_common {
struct ieee80211_hw *hw;
int debug_mask;
enum ath_device_state state;

View file

@ -1,26 +1,26 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -682,6 +682,7 @@ int ath9k_hw_init(struct ath_hw *ah)
case AR9300_DEVID_AR9462:
case AR9485_DEVID_AR1111:
case AR9300_DEVID_AR9565:
@@ -518,6 +518,7 @@ static int __ath9k_hw_init(struct ath_hw
ath9k_hw_read_revisions(ah);
switch (ah->hw_version.macVersion) {
+ case AR9300_DEVID_INVALID:
break;
default:
if (common->bus_ops->ath_bus_type == ATH_USB)
case AR_SREV_VERSION_5416_PCI:
case AR_SREV_VERSION_5416_PCIE:
case AR_SREV_VERSION_9160:
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -52,6 +52,7 @@
#define AR9300_DEVID_QCA955X 0x0038
#define AR9485_DEVID_AR1111 0x0037
#define AR9300_DEVID_AR9565 0x0036
@@ -34,6 +34,7 @@
#define ATHEROS_VENDOR_ID 0x168c
+#define AR9300_DEVID_INVALID 0xabcd
#define AR5416_AR9100_DEVID 0x000b
#define AR5416_DEVID_PCI 0x0023
#define AR5416_DEVID_PCIE 0x0024
#define AR9160_DEVID_PCI 0x0027
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -550,6 +550,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_i
@@ -658,6 +658,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_i
{ PCI_VDEVICE(ATHEROS, 0x0036),
.driver_data = ATH9K_PCI_BT_ANT_DIV },

View file

@ -1,6 +1,6 @@
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1663,6 +1663,7 @@ struct ieee80211_hw {
@@ -1711,6 +1711,7 @@ struct ieee80211_hw {
u8 max_tx_aggregation_subframes;
u8 offchannel_tx_hw_queue;
u8 radiotap_mcs_details;
@ -10,7 +10,7 @@
u8 uapsd_queues;
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2298,7 +2298,9 @@ static int ieee80211_get_tx_power(struct
@@ -2323,7 +2323,9 @@ static int ieee80211_get_tx_power(struct
struct ieee80211_local *local = wiphy_priv(wiphy);
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
@ -23,7 +23,7 @@
*dbm = sdata->vif.bss_conf.txpower;
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -158,6 +158,7 @@ static u32 ieee80211_hw_conf_chan(struct
@@ -154,6 +154,7 @@ static u32 ieee80211_hw_conf_chan(struct
if (local->hw.conf.power_level != power) {
changed |= IEEE80211_CONF_CHANGE_POWER;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -313,8 +313,12 @@ static int ath_reset_internal(struct ath
@@ -308,8 +308,12 @@ static int ath_reset_internal(struct ath
(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL))
ath9k_mci_set_txpower(sc, true, false);
@ -14,7 +14,7 @@
out:
spin_unlock_bh(&sc->sc_pcu_lock);
@@ -1347,6 +1351,7 @@ static int ath9k_config(struct ieee80211
@@ -1371,6 +1375,7 @@ static int ath9k_config(struct ieee80211
sc->config.txpowlimit = 2 * conf->power_level;
ath9k_cmn_update_txpow(ah, sc->curtxpow,
sc->config.txpowlimit, &sc->curtxpow);

View file

@ -1,6 +1,6 @@
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2081,6 +2081,7 @@ struct cfg80211_update_ft_ies_params {
@@ -2156,6 +2156,7 @@ struct cfg80211_qos_map {
* (as advertised by the nl80211 feature flag.)
* @get_tx_power: store the current TX power into the dbm variable;
* return 0 if successful
@ -8,7 +8,7 @@
*
* @set_wds_peer: set the WDS peer for a WDS interface
*
@@ -2303,6 +2304,7 @@ struct cfg80211_ops {
@@ -2380,6 +2381,7 @@ struct cfg80211_ops {
enum nl80211_tx_power_setting type, int mbm);
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
int *dbm);
@ -18,7 +18,7 @@
const u8 *addr);
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1029,6 +1029,7 @@ enum ieee80211_smps_mode {
@@ -1033,6 +1033,7 @@ enum ieee80211_smps_mode {
*
* @power_level: requested transmit power (in dBm), backward compatibility
* value only that is set to the minimum of all interfaces
@ -26,7 +26,7 @@
*
* @chandef: the channel definition to tune to
* @radar_enabled: whether radar detection is enabled
@@ -1050,6 +1051,7 @@ struct ieee80211_conf {
@@ -1054,6 +1055,7 @@ struct ieee80211_conf {
u32 flags;
int power_level, dynamic_ps_timeout;
int max_sleep_period;
@ -36,9 +36,9 @@
u8 ps_dtim_period;
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1514,6 +1514,9 @@ enum nl80211_commands {
* @NL80211_ATTR_SUPPORT_10_MHZ: A flag indicating that the device supports
* 10 MHz channel bandwidth.
@@ -1555,6 +1555,9 @@ enum nl80211_commands {
* data is in the format defined for the payload of the QoS Map Set element
* in IEEE Std 802.11-2012, 8.4.2.97.
*
+ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
+ * transmit power to stay within regulatory limits. u32, dBi.
@ -46,9 +46,9 @@
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1833,6 +1836,8 @@ enum nl80211_attrs {
NL80211_ATTR_SUPPORT_5_MHZ,
NL80211_ATTR_SUPPORT_10_MHZ,
@@ -1883,6 +1886,8 @@ enum nl80211_attrs {
NL80211_ATTR_QOS_MAP,
+ NL80211_ATTR_WIPHY_ANTENNA_GAIN,
+
@ -57,7 +57,7 @@
__NL80211_ATTR_AFTER_LAST,
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2308,6 +2308,19 @@ static int ieee80211_get_tx_power(struct
@@ -2333,6 +2333,19 @@ static int ieee80211_get_tx_power(struct
return 0;
}
@ -77,7 +77,7 @@
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
const u8 *addr)
{
@@ -3861,6 +3874,7 @@ struct cfg80211_ops mac80211_config_ops
@@ -3916,6 +3929,7 @@ struct cfg80211_ops mac80211_config_ops
.set_wiphy_params = ieee80211_set_wiphy_params,
.set_tx_power = ieee80211_set_tx_power,
.get_tx_power = ieee80211_get_tx_power,
@ -87,7 +87,7 @@
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1185,6 +1185,7 @@ struct ieee80211_local {
@@ -1216,6 +1216,7 @@ struct ieee80211_local {
int dynamic_ps_forced_timeout;
int user_power_level; /* in dBm, for all interfaces */
@ -97,7 +97,7 @@
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -101,7 +101,7 @@ static u32 ieee80211_hw_conf_chan(struct
@@ -97,7 +97,7 @@ static u32 ieee80211_hw_conf_chan(struct
struct ieee80211_sub_if_data *sdata;
struct cfg80211_chan_def chandef = {};
u32 changed = 0;
@ -106,7 +106,7 @@
u32 offchannel_flag;
offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
@@ -156,8 +156,21 @@ static u32 ieee80211_hw_conf_chan(struct
@@ -152,8 +152,21 @@ static u32 ieee80211_hw_conf_chan(struct
}
rcu_read_unlock();
@ -129,7 +129,7 @@
local->hw.cur_power_level = power;
local->hw.conf.power_level = power;
}
@@ -588,6 +601,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(
@@ -580,6 +593,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(
IEEE80211_RADIOTAP_MCS_HAVE_BW;
local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI |
IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH;
@ -139,15 +139,15 @@
local->user_power_level = IEEE80211_UNSET_POWER_LEVEL;
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -357,6 +357,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_STA_SUPPORTED_CHANNELS] = { .type = NLA_BINARY },
[NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES] = { .type = NLA_BINARY },
[NL80211_ATTR_HANDLE_DFS] = { .type = NLA_FLAG },
@@ -384,6 +384,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_VENDOR_DATA] = { .type = NLA_BINARY },
[NL80211_ATTR_QOS_MAP] = { .type = NLA_BINARY,
.len = IEEE80211_QOS_MAP_LEN_MAX },
+ [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 },
};
/* policy for the key attributes */
@@ -2039,6 +2040,22 @@ static int nl80211_set_wiphy(struct sk_b
@@ -2105,6 +2106,22 @@ static int nl80211_set_wiphy(struct sk_b
goto bad_res;
}

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -73,6 +73,7 @@ struct ath_regulatory {
@@ -74,6 +74,7 @@ struct ath_regulatory {
u16 max_power_level;
u16 current_rd;
int16_t power_limit;
@ -10,7 +10,7 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2809,7 +2809,7 @@ void ath9k_hw_apply_txpower(struct ath_h
@@ -2716,7 +2716,7 @@ void ath9k_hw_apply_txpower(struct ath_h
channel = chan->chan;
chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
new_pwr = min_t(int, chan_pwr, reg->power_limit);
@ -21,7 +21,7 @@
if (ant_gain > max_gain)
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1347,7 +1347,10 @@ static int ath9k_config(struct ieee80211
@@ -1371,7 +1371,10 @@ static int ath9k_config(struct ieee80211
}
if (changed & IEEE80211_CONF_CHANGE_POWER) {

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -559,6 +559,9 @@ static inline int ath9k_dump_btcoex(stru
@@ -563,6 +563,9 @@ static inline int ath9k_dump_btcoex(stru
void ath_init_leds(struct ath_softc *sc);
void ath_deinit_leds(struct ath_softc *sc);
void ath_fill_led_pin(struct ath_softc *sc);
@ -10,7 +10,7 @@
#else
static inline void ath_init_leds(struct ath_softc *sc)
{
@@ -704,6 +707,13 @@ enum sc_op_flags {
@@ -710,6 +713,13 @@ enum sc_op_flags {
#define PS_BEACON_SYNC BIT(4)
#define PS_WAIT_FOR_ANI BIT(5)
@ -24,7 +24,7 @@
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
@@ -746,9 +756,8 @@ struct ath_softc {
@@ -751,9 +761,8 @@ struct ath_softc {
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
#ifdef CPTCFG_MAC80211_LEDS
@ -162,7 +162,7 @@
void ath_fill_led_pin(struct ath_softc *sc)
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -1014,7 +1014,7 @@ int ath9k_init_device(u16 devid, struct
@@ -1017,7 +1017,7 @@ int ath9k_init_device(u16 devid, struct
#ifdef CPTCFG_MAC80211_LEDS
/* must be initialized before ieee80211_register_hw */
@ -173,7 +173,7 @@
#endif
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1620,6 +1620,61 @@ static const struct file_operations fops
@@ -1569,6 +1569,61 @@ static const struct file_operations fops
.llseek = default_llseek,
};
@ -235,7 +235,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
@@ -1644,6 +1699,10 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1593,6 +1648,10 @@ int ath9k_init_debug(struct ath_hw *ah)
&fops_eeprom);
debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
sc, &fops_chanbw);

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1676,6 +1676,50 @@ static const struct file_operations fops
@@ -1625,6 +1625,50 @@ static const struct file_operations fops
#endif
@ -51,7 +51,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1703,6 +1747,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1652,6 +1696,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("gpio_led", S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_gpio_led);
#endif
@ -62,7 +62,7 @@
debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -469,6 +469,12 @@ enum {
@@ -482,6 +482,12 @@ enum {
ATH9K_RESET_COLD,
};
@ -75,7 +75,7 @@
struct ath9k_hw_version {
u32 magic;
u16 devid;
@@ -745,6 +751,8 @@ struct ath_hw {
@@ -762,6 +768,8 @@ struct ath_hw {
u32 rfkill_polarity;
u32 ah_flags;
@ -84,7 +84,7 @@
bool reset_power_on;
bool htc_reset_init;
@@ -996,6 +1004,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
@@ -1013,6 +1021,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
bool ath9k_hw_check_alive(struct ath_hw *ah);
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
@ -94,7 +94,7 @@
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1822,6 +1822,20 @@ fail:
@@ -1730,6 +1730,20 @@ fail:
return -EINVAL;
}
@ -115,8 +115,8 @@
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
struct ath9k_hw_cal_data *caldata, bool fastcc)
{
@@ -2024,6 +2038,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
}
@@ -1935,6 +1949,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ar9003_hw_disable_phy_restart(ah);
ath9k_hw_apply_gpio_override(ah);
+ ath9k_hw_update_diag(ah);
@ -125,7 +125,7 @@
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -576,6 +576,11 @@ irqreturn_t ath_isr(int irq, void *dev)
@@ -602,6 +602,11 @@ irqreturn_t ath_isr(int irq, void *dev)
ath9k_debug_sync_cause(sc, sync_cause);
status &= ah->imask; /* discard unasked-for bits */

View file

@ -11,7 +11,7 @@
int (*external_reset)(void);
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2409,17 +2409,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
@@ -2323,17 +2323,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
}
eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
@ -47,7 +47,7 @@
AR_SREV_9285(ah) ||
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -915,6 +915,8 @@ struct ath_hw {
@@ -932,6 +932,8 @@ struct ath_hw {
bool is_clk_25mhz;
int (*get_mac_revision)(void);
int (*external_reset)(void);
@ -58,7 +58,7 @@
};
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -719,6 +719,8 @@ static int ath9k_init_softc(u16 devid, s
@@ -722,6 +722,8 @@ static int ath9k_init_softc(u16 devid, s
ah->is_clk_25mhz = pdata->is_clk_25mhz;
ah->get_mac_revision = pdata->get_mac_revision;
ah->external_reset = pdata->external_reset;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -661,6 +661,7 @@ struct ath_spec_scan {
@@ -678,6 +678,7 @@ struct ath_spec_scan {
* @config_pci_powersave:
* @calibrate: periodic calibration for NF, ANI, IQ, ADC gain, ADC-DC
*
@ -8,7 +8,7 @@
* @spectral_scan_config: set parameters for spectral scan and enable/disable it
* @spectral_scan_trigger: trigger a spectral scan run
* @spectral_scan_wait: wait for a spectral scan run to finish
@@ -684,6 +685,7 @@ struct ath_hw_ops {
@@ -701,6 +702,7 @@ struct ath_hw_ops {
struct ath_hw_antcomb_conf *antconf);
void (*antdiv_comb_conf_set)(struct ath_hw *ah,
struct ath_hw_antcomb_conf *antconf);
@ -18,7 +18,7 @@
void (*spectral_scan_trigger)(struct ath_hw *ah);
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -1766,6 +1766,26 @@ static void ar9003_hw_tx99_set_txpower(s
@@ -1768,6 +1768,26 @@ static void ar9003_hw_tx99_set_txpower(s
ATH9K_POW_SM(p_pwr_array[ALL_TARGET_HT40_14], 0));
}
@ -45,7 +45,7 @@
void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
{
struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
@@ -1796,6 +1816,7 @@ void ar9003_hw_attach_phy_ops(struct ath
@@ -1798,6 +1818,7 @@ void ar9003_hw_attach_phy_ops(struct ath
priv_ops->set_radar_params = ar9003_hw_set_radar_params;
priv_ops->fast_chan_change = ar9003_hw_fast_chan_change;
@ -55,7 +55,7 @@
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -845,7 +845,8 @@ static void ath9k_init_txpower_limits(st
@@ -846,7 +846,8 @@ static void ath9k_init_txpower_limits(st
if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
ath9k_init_band_txpower(sc, IEEE80211_BAND_5GHZ);
@ -65,7 +65,7 @@
}
void ath9k_reload_chainmask_settings(struct ath_softc *sc)
@@ -976,6 +977,18 @@ static void ath9k_set_hw_capab(struct at
@@ -979,6 +980,18 @@ static void ath9k_set_hw_capab(struct at
SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
}
@ -84,7 +84,7 @@
int ath9k_init_device(u16 devid, struct ath_softc *sc,
const struct ath_bus_ops *bus_ops)
{
@@ -1021,6 +1034,8 @@ int ath9k_init_device(u16 devid, struct
@@ -1024,6 +1037,8 @@ int ath9k_init_device(u16 devid, struct
ARRAY_SIZE(ath9k_tpt_blink));
#endif
@ -110,7 +110,7 @@
static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
--- a/drivers/net/wireless/ath/ath9k/link.c
+++ b/drivers/net/wireless/ath/ath9k/link.c
@@ -354,6 +354,11 @@ void ath_ani_calibrate(unsigned long dat
@@ -307,6 +307,11 @@ void ath_ani_calibrate(unsigned long dat
unsigned int timestamp = jiffies_to_msecs(jiffies);
u32 cal_interval, short_cal_interval, long_cal_interval;
unsigned long flags;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -269,6 +269,19 @@ void ath9k_hw_get_channel_centers(struct
@@ -217,6 +217,19 @@ void ath9k_hw_get_channel_centers(struct
centers->synth_center + (extoff * HT40_CHANNEL_CENTER_SHIFT);
}
@ -20,7 +20,7 @@
/******************/
/* Chip Revisions */
/******************/
@@ -1357,6 +1370,9 @@ static bool ath9k_hw_set_reset(struct at
@@ -1337,6 +1350,9 @@ static bool ath9k_hw_set_reset(struct at
if (AR_SREV_9100(ah))
udelay(50);
@ -30,9 +30,9 @@
return true;
}
@@ -1457,6 +1473,9 @@ static bool ath9k_hw_chip_reset(struct a
@@ -1436,6 +1452,9 @@ static bool ath9k_hw_chip_reset(struct a
ar9003_hw_internal_regulator_apply(ah);
ath9k_hw_init_pll(ah, chan);
ath9k_hw_set_rfmode(ah, chan);
+ if (AR_SREV_9330(ah) || AR_SREV_9340(ah))
+ ath9k_hw_disable_pll_lock_detect(ah);
@ -40,7 +40,7 @@
return true;
}
@@ -1817,8 +1836,14 @@ static int ath9k_hw_do_fastcc(struct ath
@@ -1725,8 +1744,14 @@ static int ath9k_hw_do_fastcc(struct ath
if (AR_SREV_9271(ah))
ar9002_hw_load_ani_reg(ah, chan);
@ -55,7 +55,7 @@
return -EINVAL;
}
@@ -2043,6 +2068,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
@@ -1954,6 +1979,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
if (AR_SREV_9565(ah) && common->bt_ant_diversity)
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -96,8 +96,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
@@ -94,8 +94,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
pci_set_master(pci_dev);

View file

@ -22,7 +22,7 @@
+#endif /* _RT2X00_PLATFORM_H */
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -40,6 +40,7 @@
@@ -38,6 +38,7 @@
#include <linux/kfifo.h>
#include <linux/hrtimer.h>
#include <linux/average.h>

View file

@ -1,6 +1,6 @@
--- a/.local-symbols
+++ b/.local-symbols
@@ -283,6 +283,7 @@ RT2X00_LIB_FIRMWARE=
@@ -281,6 +281,7 @@ RT2X00_LIB_FIRMWARE=
RT2X00_LIB_CRYPTO=
RT2X00_LIB_LEDS=
RT2X00_LIB_DEBUGFS=
@ -48,7 +48,7 @@
obj-$(CPTCFG_RT2X00_LIB_MMIO) += rt2x00mmio.o
--- a/drivers/net/wireless/rt2x00/rt2800lib.h
+++ b/drivers/net/wireless/rt2x00/rt2800lib.h
@@ -22,6 +22,8 @@
@@ -20,6 +20,8 @@
#ifndef RT2800LIB_H
#define RT2800LIB_H
@ -57,7 +57,7 @@
struct rt2800_ops {
void (*register_read)(struct rt2x00_dev *rt2x00dev,
const unsigned int offset, u32 *value);
@@ -121,6 +123,15 @@ static inline int rt2800_read_eeprom(str
@@ -119,6 +121,15 @@ static inline int rt2800_read_eeprom(str
{
const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv;
@ -75,7 +75,7 @@
--- a/drivers/net/wireless/rt2x00/rt2800soc.c
+++ b/drivers/net/wireless/rt2x00/rt2800soc.c
@@ -97,19 +97,6 @@ static int rt2800soc_set_device_state(st
@@ -95,19 +95,6 @@ static int rt2800soc_set_device_state(st
return retval;
}
@ -95,7 +95,7 @@
/* Firmware functions */
static char *rt2800soc_get_firmware_name(struct rt2x00_dev *rt2x00dev)
{
@@ -173,7 +160,6 @@ static const struct rt2800_ops rt2800soc
@@ -171,7 +158,6 @@ static const struct rt2800_ops rt2800soc
.register_multiread = rt2x00mmio_register_multiread,
.register_multiwrite = rt2x00mmio_register_multiwrite,
.regbusy_read = rt2x00mmio_regbusy_read,
@ -105,7 +105,7 @@
.drv_init_registers = rt2800mmio_init_registers,
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -696,6 +696,7 @@ enum rt2x00_capability_flags {
@@ -694,6 +694,7 @@ enum rt2x00_capability_flags {
REQUIRE_SW_SEQNO,
REQUIRE_HT_TX_DESC,
REQUIRE_PS_AUTOWAKE,
@ -113,7 +113,7 @@
/*
* Capabilities
@@ -965,6 +966,11 @@ struct rt2x00_dev {
@@ -963,6 +964,11 @@ struct rt2x00_dev {
const struct firmware *fw;
/*
@ -127,7 +127,7 @@
DECLARE_KFIFO_PTR(txstatus_fifo, u32);
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1326,6 +1326,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
@@ -1324,6 +1324,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
@ -138,7 +138,7 @@
/*
* Let the driver probe the device to detect the capabilities.
*/
@@ -1456,6 +1460,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
@@ -1454,6 +1458,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
*/
if (rt2x00dev->drv_data)
kfree(rt2x00dev->drv_data);
@ -199,7 +199,7 @@
+static int rt2x00lib_request_eeprom_file(struct rt2x00_dev *rt2x00dev)
+{
+ const struct firmware *ee;
+ char *ee_name;
+ const char *ee_name;
+ int retval;
+
+ ee_name = rt2x00lib_get_eeprom_file_name(rt2x00dev);
@ -266,7 +266,7 @@
+}
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -322,6 +322,22 @@ static inline void rt2x00lib_free_firmwa
@@ -320,6 +320,22 @@ static inline void rt2x00lib_free_firmwa
#endif /* CPTCFG_RT2X00_LIB_FIRMWARE */
/*
@ -291,7 +291,7 @@
#ifdef CPTCFG_RT2X00_LIB_DEBUGFS
--- a/drivers/net/wireless/rt2x00/rt2x00soc.c
+++ b/drivers/net/wireless/rt2x00/rt2x00soc.c
@@ -94,6 +94,7 @@ int rt2x00soc_probe(struct platform_devi
@@ -92,6 +92,7 @@ int rt2x00soc_probe(struct platform_devi
rt2x00dev->hw = hw;
rt2x00dev->irq = platform_get_irq(pdev, 0);
rt2x00dev->name = pdev->dev.driver->name;

View file

@ -8,12 +8,14 @@
#include "rt2x00.h"
#include "rt2x00lib.h"
@@ -34,11 +35,19 @@ static const char *
@@ -34,11 +35,21 @@ static const char *
rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
{
struct rt2x00_platform_data *pdata = rt2x00dev->dev->platform_data;
+#ifdef CONFIG_OF
+ struct device_node *np;
+ char *eep;
+ const char *eep;
+#endif
if (pdata && pdata->eeprom_file_name)
return pdata->eeprom_file_name;

View file

@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
Supported chips: RT2880, RT3050, RT3052, RT3350, RT3352.
--- a/drivers/net/wireless/rt2x00/rt2x00eeprom.c
+++ b/drivers/net/wireless/rt2x00/rt2x00eeprom.c
@@ -26,17 +26,72 @@
@@ -26,11 +26,66 @@
#include <linux/kernel.h>
#include <linux/module.h>
@ -89,19 +89,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
static const char *
rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
{
struct rt2x00_platform_data *pdata = rt2x00dev->dev->platform_data;
struct device_node *np;
- char *eep;
+ const char *eep;
if (pdata && pdata->eeprom_file_name)
return pdata->eeprom_file_name;
@@ -53,9 +108,12 @@ rt2x00lib_get_eeprom_file_name(struct rt
static int rt2x00lib_request_eeprom_file(struct rt2x00_dev *rt2x00dev)
{
const struct firmware *ee;
- char *ee_name;
+ const char *ee_name;
@@ -58,6 +113,9 @@ static int rt2x00lib_request_eeprom_file
const char *ee_name;
int retval;
+ if (!rt2800lib_read_eeprom_mtd(rt2x00dev))

View file

@ -24,7 +24,7 @@ Helmut
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -163,36 +163,14 @@ void rt2x00queue_align_frame(struct sk_b
@@ -161,36 +161,14 @@ void rt2x00queue_align_frame(struct sk_b
void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length)
{
unsigned int payload_length = skb->len - header_length;

View file

@ -12,7 +12,7 @@
#endif /* _RT2X00_PLATFORM_H */
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -939,6 +939,22 @@ static int rt2x00lib_probe_hw_modes(stru
@@ -937,6 +937,22 @@ static int rt2x00lib_probe_hw_modes(stru
unsigned int num_rates;
unsigned int i;
@ -37,7 +37,7 @@
num_rates += 4;
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -405,6 +405,7 @@ struct hw_mode_spec {
@@ -403,6 +403,7 @@ struct hw_mode_spec {
unsigned int supported_bands;
#define SUPPORT_BAND_2GHZ 0x00000001
#define SUPPORT_BAND_5GHZ 0x00000002

View file

@ -10,7 +10,7 @@
int disable_5ghz;
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -930,6 +930,18 @@ static void rt2x00lib_rate(struct ieee80
@@ -928,6 +928,18 @@ static void rt2x00lib_rate(struct ieee80
entry->flags |= IEEE80211_RATE_SHORT_PREAMBLE;
}
@ -31,7 +31,7 @@
{
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1403,6 +1403,7 @@ static inline void rt2x00debug_dump_fram
@@ -1401,6 +1401,7 @@ static inline void rt2x00debug_dump_fram
*/
u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
struct ieee80211_vif *vif);
@ -41,7 +41,7 @@
* Interrupt context handlers.
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2395,6 +2395,7 @@ static int rt61pci_validate_eeprom(struc
@@ -2392,6 +2392,7 @@ static int rt61pci_validate_eeprom(struc
u32 reg;
u16 word;
u8 *mac;
@ -49,7 +49,7 @@
s8 value;
rt2x00mmio_register_read(rt2x00dev, E2PROM_CSR, &reg);
@@ -2415,7 +2416,11 @@ static int rt61pci_validate_eeprom(struc
@@ -2412,7 +2413,11 @@ static int rt61pci_validate_eeprom(struc
/*
* Start validation of the data that has been read.
*/

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -3178,11 +3178,17 @@ static void rt2800_config_channel(struct
@@ -3176,11 +3176,17 @@ static void rt2800_config_channel(struct
/*
* Change BBP settings
*/
@ -18,7 +18,7 @@
} else if (rt2x00_rt(rt2x00dev, RT3593)) {
if (rf->channel > 14) {
/* Disable CCK Packet detection on 5GHz */
@@ -3196,14 +3202,8 @@ static void rt2800_config_channel(struct
@@ -3194,14 +3200,8 @@ static void rt2800_config_channel(struct
else
rt2800_bbp_write(rt2x00dev, 105, 0x34);
@ -33,7 +33,7 @@
rt2800_bbp_write(rt2x00dev, 86, 0);
}
@@ -6127,6 +6127,12 @@ static void rt2800_init_rfcsr_3290(struc
@@ -6125,6 +6125,12 @@ static void rt2800_init_rfcsr_3290(struc
static void rt2800_init_rfcsr_3352(struct rt2x00_dev *rt2x00dev)
{
@ -46,7 +46,7 @@
rt2800_rf_init_calibration(rt2x00dev, 30);
rt2800_rfcsr_write(rt2x00dev, 0, 0xf0);
@@ -6162,15 +6168,30 @@ static void rt2800_init_rfcsr_3352(struc
@@ -6160,15 +6166,30 @@ static void rt2800_init_rfcsr_3352(struc
rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
rt2800_rfcsr_write(rt2x00dev, 32, 0x80);
rt2800_rfcsr_write(rt2x00dev, 33, 0x00);
@ -80,7 +80,7 @@
rt2800_rfcsr_write(rt2x00dev, 43, 0xdb);
rt2800_rfcsr_write(rt2x00dev, 44, 0xdb);
rt2800_rfcsr_write(rt2x00dev, 45, 0xdb);
@@ -6178,15 +6199,20 @@ static void rt2800_init_rfcsr_3352(struc
@@ -6176,15 +6197,20 @@ static void rt2800_init_rfcsr_3352(struc
rt2800_rfcsr_write(rt2x00dev, 47, 0x0d);
rt2800_rfcsr_write(rt2x00dev, 48, 0x14);
rt2800_rfcsr_write(rt2x00dev, 49, 0x00);
@ -110,7 +110,7 @@
rt2800_rfcsr_write(rt2x00dev, 59, 0x00);
rt2800_rfcsr_write(rt2x00dev, 60, 0x00);
rt2800_rfcsr_write(rt2x00dev, 61, 0x00);
@@ -7046,6 +7072,7 @@ static int rt2800_init_eeprom(struct rt2
@@ -7051,6 +7077,7 @@ static int rt2800_init_eeprom(struct rt2
* RT53xx: defined in "EEPROM_CHIP_ID" field
*/
if (rt2x00_rt(rt2x00dev, RT3290) ||
@ -118,7 +118,7 @@
rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392))
rt2800_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf);
@@ -7137,7 +7164,8 @@ static int rt2800_init_eeprom(struct rt2
@@ -7142,7 +7169,8 @@ static int rt2800_init_eeprom(struct rt2
/*
* Detect if this device has Bluetooth co-existence.
*/
@ -128,7 +128,7 @@
__set_bit(CAPABILITY_BT_COEXIST, &rt2x00dev->cap_flags);
/*
@@ -7166,6 +7194,22 @@ static int rt2800_init_eeprom(struct rt2
@@ -7171,6 +7199,22 @@ static int rt2800_init_eeprom(struct rt2
EIRP_MAX_TX_POWER_LIMIT)
__set_bit(CAPABILITY_POWER_LIMIT, &rt2x00dev->cap_flags);
@ -153,7 +153,7 @@
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -2301,6 +2301,12 @@ struct mac_iveiv_entry {
@@ -2299,6 +2299,12 @@ struct mac_iveiv_entry {
#define RFCSR36_RF_BS FIELD8(0x80)
/*
@ -166,7 +166,7 @@
* RFCSR 38:
*/
#define RFCSR38_RX_LO1_EN FIELD8(0x20)
@@ -2312,6 +2318,18 @@ struct mac_iveiv_entry {
@@ -2310,6 +2316,18 @@ struct mac_iveiv_entry {
#define RFCSR39_RX_LO2_EN FIELD8(0x80)
/*
@ -185,7 +185,7 @@
* RFCSR 49:
*/
#define RFCSR49_TX FIELD8(0x3f)
@@ -2324,6 +2342,8 @@ struct mac_iveiv_entry {
@@ -2322,6 +2340,8 @@ struct mac_iveiv_entry {
* RFCSR 50:
*/
#define RFCSR50_TX FIELD8(0x3f)
@ -194,7 +194,7 @@
#define RFCSR50_EP FIELD8(0xc0)
/* bits for RT3593 */
#define RFCSR50_TX_LO1_EN FIELD8(0x20)
@@ -2471,6 +2491,8 @@ enum rt2800_eeprom_word {
@@ -2469,6 +2489,8 @@ enum rt2800_eeprom_word {
* INTERNAL_TX_ALC: 0: disable, 1: enable
* BT_COEXIST: 0: disable, 1: enable
* DAC_TEST: 0: disable, 1: enable
@ -203,7 +203,7 @@
*/
#define EEPROM_NIC_CONF1_HW_RADIO FIELD16(0x0001)
#define EEPROM_NIC_CONF1_EXTERNAL_TX_ALC FIELD16(0x0002)
@@ -2487,6 +2509,8 @@ enum rt2800_eeprom_word {
@@ -2485,6 +2507,8 @@ enum rt2800_eeprom_word {
#define EEPROM_NIC_CONF1_INTERNAL_TX_ALC FIELD16(0x2000)
#define EEPROM_NIC_CONF1_BT_COEXIST FIELD16(0x4000)
#define EEPROM_NIC_CONF1_DAC_TEST FIELD16(0x8000)
@ -214,7 +214,7 @@
* EEPROM frequency
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -716,6 +716,8 @@ enum rt2x00_capability_flags {
@@ -714,6 +714,8 @@ enum rt2x00_capability_flags {
CAPABILITY_DOUBLE_ANTENNA,
CAPABILITY_BT_COEXIST,
CAPABILITY_VCO_RECALIBRATION,

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7486,6 +7486,27 @@ static const struct rf_channel rf_vals_5
@@ -7491,6 +7491,27 @@ static const struct rf_channel rf_vals_5
{196, 83, 0, 12, 1},
};
@ -28,7 +28,7 @@
static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
{
struct hw_mode_spec *spec = &rt2x00dev->spec;
@@ -7574,7 +7595,10 @@ static int rt2800_probe_hw_mode(struct r
@@ -7579,7 +7600,10 @@ static int rt2800_probe_hw_mode(struct r
case RF5390:
case RF5392:
spec->num_channels = 14;
@ -40,7 +40,7 @@
break;
case RF3052:
@@ -7750,6 +7774,19 @@ static int rt2800_probe_rt(struct rt2x00
@@ -7755,6 +7779,19 @@ static int rt2800_probe_rt(struct rt2x00
return 0;
}
@ -60,7 +60,7 @@
int rt2800_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
@@ -7779,6 +7816,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
@@ -7784,6 +7821,15 @@ int rt2800_probe_hw(struct rt2x00_dev *r
rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
/*
@ -78,7 +78,7 @@
retval = rt2800_probe_hw_mode(rt2x00dev);
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -400,6 +400,7 @@ static inline struct rt2x00_intf* vif_to
@@ -398,6 +398,7 @@ static inline struct rt2x00_intf* vif_to
* @channels: Device/chipset specific channel values (See &struct rf_channel).
* @channels_info: Additional information for channels (See &struct channel_info).
* @ht: Driver HT Capabilities (See &ieee80211_sta_ht_cap).
@ -86,7 +86,7 @@
*/
struct hw_mode_spec {
unsigned int supported_bands;
@@ -416,6 +417,7 @@ struct hw_mode_spec {
@@ -414,6 +415,7 @@ struct hw_mode_spec {
const struct channel_info *channels_info;
struct ieee80211_sta_ht_cap ht;

View file

@ -13,7 +13,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/net/wireless/rt2x00/rt2800soc.c
+++ b/drivers/net/wireless/rt2x00/rt2800soc.c
@@ -229,11 +229,18 @@ static int rt2800soc_probe(struct platfo
@@ -227,11 +227,18 @@ static int rt2800soc_probe(struct platfo
return rt2x00soc_probe(pdev, &rt2800soc_ops);
}

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -38,6 +38,7 @@
@@ -36,6 +36,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
@ -8,7 +8,7 @@
#include "rt2x00.h"
#include "rt2800lib.h"
@@ -7776,13 +7777,14 @@ static int rt2800_probe_rt(struct rt2x00
@@ -7781,13 +7782,14 @@ static int rt2800_probe_rt(struct rt2x00
int rt2800_probe_clk(struct rt2x00_dev *rt2x00dev)
{

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -73,6 +73,7 @@
@@ -71,6 +71,7 @@
#define RF5592 0x000f
#define RF3070 0x3070
#define RF3290 0x3290
@ -10,7 +10,7 @@
#define RF5372 0x5372
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -2707,6 +2707,13 @@ static void rt2800_config_channel_rf53xx
@@ -2705,6 +2705,13 @@ static void rt2800_config_channel_rf53xx
rt2800_rfcsr_write(rt2x00dev, 59,
r59_non_bt[idx]);
@ -24,7 +24,7 @@
}
}
}
@@ -3144,6 +3151,7 @@ static void rt2800_config_channel(struct
@@ -3142,6 +3149,7 @@ static void rt2800_config_channel(struct
rt2800_config_channel_rf3322(rt2x00dev, conf, rf, info);
break;
case RF3070:
@ -32,7 +32,7 @@
case RF5360:
case RF5370:
case RF5372:
@@ -3161,6 +3169,7 @@ static void rt2800_config_channel(struct
@@ -3159,6 +3167,7 @@ static void rt2800_config_channel(struct
if (rt2x00_rf(rt2x00dev, RF3070) ||
rt2x00_rf(rt2x00dev, RF3290) ||
rt2x00_rf(rt2x00dev, RF3322) ||
@ -40,7 +40,7 @@
rt2x00_rf(rt2x00dev, RF5360) ||
rt2x00_rf(rt2x00dev, RF5370) ||
rt2x00_rf(rt2x00dev, RF5372) ||
@@ -3401,7 +3410,8 @@ static void rt2800_config_channel(struct
@@ -3399,7 +3408,8 @@ static void rt2800_config_channel(struct
/*
* Clear update flag
*/
@ -50,7 +50,7 @@
rt2800_bbp_read(rt2x00dev, 49, &bbp);
rt2x00_set_field8(&bbp, BBP49_UPDATE_FLAG, 0);
rt2800_bbp_write(rt2x00dev, 49, bbp);
@@ -4275,6 +4285,7 @@ void rt2800_vco_calibration(struct rt2x0
@@ -4273,6 +4283,7 @@ void rt2800_vco_calibration(struct rt2x0
case RF3053:
case RF3070:
case RF3290:
@ -58,7 +58,7 @@
case RF5360:
case RF5370:
case RF5372:
@@ -4671,6 +4682,8 @@ static int rt2800_init_registers(struct
@@ -4669,6 +4680,8 @@ static int rt2800_init_registers(struct
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
@ -67,7 +67,7 @@
} else {
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000000);
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
@@ -5312,9 +5325,13 @@ static void rt2800_init_bbp_3352(struct
@@ -5310,9 +5323,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 82, 0x62);
@ -84,7 +84,7 @@
rt2800_bbp_write(rt2x00dev, 86, 0x38);
@@ -5328,9 +5345,13 @@ static void rt2800_init_bbp_3352(struct
@@ -5326,9 +5343,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 104, 0x92);
@ -101,7 +101,7 @@
rt2800_bbp_write(rt2x00dev, 120, 0x50);
@@ -5355,6 +5376,13 @@ static void rt2800_init_bbp_3352(struct
@@ -5353,6 +5374,13 @@ static void rt2800_init_bbp_3352(struct
rt2800_bbp_write(rt2x00dev, 143, 0xa2);
rt2800_bbp_write(rt2x00dev, 148, 0xc8);
@ -115,7 +115,7 @@
}
static void rt2800_init_bbp_3390(struct rt2x00_dev *rt2x00dev)
@@ -5655,6 +5683,7 @@ static void rt2800_init_bbp(struct rt2x0
@@ -5653,6 +5681,7 @@ static void rt2800_init_bbp(struct rt2x0
rt2800_init_bbp_3290(rt2x00dev);
break;
case RT3352:
@ -123,7 +123,7 @@
rt2800_init_bbp_3352(rt2x00dev);
break;
case RT3390:
@@ -6465,6 +6494,76 @@ static void rt2800_init_rfcsr_3593(struc
@@ -6463,6 +6492,76 @@ static void rt2800_init_rfcsr_3593(struc
/* TODO: enable stream mode support */
}
@ -200,7 +200,7 @@
static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev)
{
rt2800_rf_init_calibration(rt2x00dev, 2);
@@ -6695,6 +6794,9 @@ static void rt2800_init_rfcsr(struct rt2
@@ -6700,6 +6799,9 @@ static void rt2800_init_rfcsr(struct rt2
case RT3593:
rt2800_init_rfcsr_3593(rt2x00dev);
break;
@ -210,7 +210,7 @@
case RT5390:
rt2800_init_rfcsr_5390(rt2x00dev);
break;
@@ -6944,6 +7046,12 @@ static int rt2800_validate_eeprom(struct
@@ -6949,6 +7051,12 @@ static int rt2800_validate_eeprom(struct
rt2x00_set_field16(&word, EEPROM_NIC_CONF0_RF_TYPE, RF2820);
rt2800_eeprom_write(rt2x00dev, EEPROM_NIC_CONF0, word);
rt2x00_eeprom_dbg(rt2x00dev, "Antenna: 0x%04x\n", word);
@ -223,7 +223,7 @@
} else if (rt2x00_rt(rt2x00dev, RT2860) ||
rt2x00_rt(rt2x00dev, RT2872)) {
/*
@@ -7077,6 +7185,8 @@ static int rt2800_init_eeprom(struct rt2
@@ -7082,6 +7190,8 @@ static int rt2800_init_eeprom(struct rt2
rt2x00_rt(rt2x00dev, RT5390) ||
rt2x00_rt(rt2x00dev, RT5392))
rt2800_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &rf);
@ -232,7 +232,7 @@
else
rf = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
@@ -7095,6 +7205,7 @@ static int rt2800_init_eeprom(struct rt2
@@ -7100,6 +7210,7 @@ static int rt2800_init_eeprom(struct rt2
case RF3290:
case RF3320:
case RF3322:
@ -240,7 +240,7 @@
case RF5360:
case RF5370:
case RF5372:
@@ -7590,6 +7701,7 @@ static int rt2800_probe_hw_mode(struct r
@@ -7595,6 +7706,7 @@ static int rt2800_probe_hw_mode(struct r
case RF3290:
case RF3320:
case RF3322:
@ -248,7 +248,7 @@
case RF5360:
case RF5370:
case RF5372:
@@ -7722,6 +7834,7 @@ static int rt2800_probe_hw_mode(struct r
@@ -7727,6 +7839,7 @@ static int rt2800_probe_hw_mode(struct r
case RF3053:
case RF3070:
case RF3290:
@ -256,7 +256,7 @@
case RF5360:
case RF5370:
case RF5372:
@@ -7760,6 +7873,7 @@ static int rt2800_probe_rt(struct rt2x00
@@ -7765,6 +7878,7 @@ static int rt2800_probe_rt(struct rt2x00
case RT3390:
case RT3572:
case RT3593:
@ -266,7 +266,7 @@
case RT5592:
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -171,6 +171,7 @@ struct rt2x00_chip {
@@ -169,6 +169,7 @@ struct rt2x00_chip {
#define RT3572 0x3572
#define RT3593 0x3593
#define RT3883 0x3883 /* WSOC */

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -39,6 +39,7 @@
@@ -37,6 +37,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/clk.h>
@ -8,7 +8,7 @@
#include "rt2x00.h"
#include "rt2800lib.h"
@@ -7294,6 +7295,17 @@ static int rt2800_init_eeprom(struct rt2
@@ -7299,6 +7300,17 @@ static int rt2800_init_eeprom(struct rt2
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
@ -28,7 +28,7 @@
--- a/drivers/net/wireless/rt2x00/rt2x00leds.c
+++ b/drivers/net/wireless/rt2x00/rt2x00leds.c
@@ -111,6 +111,9 @@ static int rt2x00leds_register_led(struc
@@ -109,6 +109,9 @@ static int rt2x00leds_register_led(struc
led->led_dev.name = name;
led->led_dev.brightness = LED_OFF;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1263,7 +1263,7 @@ static inline void rt2x00lib_set_if_comb
@@ -1262,7 +1262,7 @@ static inline void rt2x00lib_set_if_comb
*/
if_limit = &rt2x00dev->if_limits_ap;
if_limit->max = rt2x00dev->ops->max_ap_intf;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -7182,10 +7182,11 @@ static int rt2800_init_eeprom(struct rt2
@@ -7187,10 +7187,11 @@ static int rt2800_init_eeprom(struct rt2
* RT53xx: defined in "EEPROM_CHIP_ID" field
*/
if (rt2x00_rt(rt2x00dev, RT3290) ||

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -5530,6 +5530,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
@@ -5497,6 +5497,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {

View file

@ -22,7 +22,7 @@
static int modparam_bad_frames_preempt;
module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
MODULE_PARM_DESC(bad_frames_preempt,
@@ -2742,10 +2747,10 @@ static int b43_gpio_init(struct b43_wlde
@@ -2747,10 +2752,10 @@ static int b43_gpio_init(struct b43_wlde
u32 mask, set;
b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);

View file

@ -9,7 +9,7 @@
antenna = b43_antenna_to_phyctl(antenna);
ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL);
/* We can't send beacons with short preamble. Would get PHY errors. */
@@ -3100,8 +3100,8 @@ static int b43_chip_init(struct b43_wlde
@@ -3105,8 +3105,8 @@ static int b43_chip_init(struct b43_wlde
/* Select the antennae */
if (phy->ops->set_rx_antenna)
@ -20,7 +20,7 @@
if (phy->type == B43_PHYTYPE_B) {
value16 = b43_read16(dev, 0x005E);
@@ -3845,7 +3845,6 @@ static int b43_op_config(struct ieee8021
@@ -3850,7 +3850,6 @@ static int b43_op_config(struct ieee8021
struct b43_wldev *dev;
struct b43_phy *phy;
struct ieee80211_conf *conf = &hw->conf;
@ -28,7 +28,7 @@
int err = 0;
bool reload_bss = false;
@@ -3899,11 +3898,9 @@ static int b43_op_config(struct ieee8021
@@ -3904,11 +3903,9 @@ static int b43_op_config(struct ieee8021
}
/* Antennas for RX and management frame TX. */
@ -42,7 +42,7 @@
if (wl->radio_enabled != phy->radio_on) {
if (wl->radio_enabled) {
@@ -5029,6 +5026,47 @@ static int b43_op_get_survey(struct ieee
@@ -5028,6 +5025,47 @@ static int b43_op_get_survey(struct ieee
return 0;
}
@ -90,7 +90,7 @@
static const struct ieee80211_ops b43_hw_ops = {
.tx = b43_op_tx,
.conf_tx = b43_op_conf_tx,
@@ -5050,6 +5088,8 @@ static const struct ieee80211_ops b43_hw
@@ -5049,6 +5087,8 @@ static const struct ieee80211_ops b43_hw
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
.get_survey = b43_op_get_survey,
.rfkill_poll = b43_rfkill_poll,
@ -99,7 +99,7 @@
};
/* Hard-reset the chip. Do not call this directly.
@@ -5292,6 +5332,8 @@ static int b43_one_core_attach(struct b4
@@ -5291,6 +5331,8 @@ static int b43_one_core_attach(struct b4
if (!wldev)
goto out;
@ -108,7 +108,7 @@
wldev->use_pio = b43_modparam_pio;
wldev->dev = dev;
wldev->wl = wl;
@@ -5382,6 +5424,9 @@ static struct b43_wl *b43_wireless_init(
@@ -5381,6 +5423,9 @@ static struct b43_wl *b43_wireless_init(
hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;

View file

@ -72,7 +72,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev);
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4419,7 +4419,7 @@ static int b43_phy_versioning(struct b43
@@ -4424,7 +4424,7 @@ static int b43_phy_versioning(struct b43
u16 radio24[3];
for (tmp = 0; tmp < 3; tmp++) {
@ -81,7 +81,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
radio24[tmp] = b43_read16(dev, B43_MMIO_RADIO24_DATA);
}
@@ -4438,10 +4438,10 @@ static int b43_phy_versioning(struct b43
@@ -4443,10 +4443,10 @@ static int b43_phy_versioning(struct b43
else
tmp = 0x5205017F;
} else {

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2759,6 +2759,14 @@ static int b43_gpio_init(struct b43_wlde
@@ -2764,6 +2764,14 @@ static int b43_gpio_init(struct b43_wlde
} else if (dev->dev->chip_id == 0x5354) {
/* Don't allow overtaking buttons GPIOs */
set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
@@ -58,21 +58,12 @@
@@ -58,19 +58,12 @@
(((c) < 149) ? 3 : 4))))
#define BRCM_2GHZ_2412_2462 REG_RULE(2412-10, 2462+10, 40, 0, 19, 0)
@ -11,11 +11,9 @@
-#define BRCM_5GHZ_5180_5240 REG_RULE(5180-10, 5240+10, 40, 0, 21, \
- NL80211_RRF_NO_IR)
-#define BRCM_5GHZ_5260_5320 REG_RULE(5260-10, 5320+10, 40, 0, 21, \
- NL80211_RRF_NO_IR | \
- NL80211_RRF_DFS | \
- NL80211_RRF_NO_IR)
-#define BRCM_5GHZ_5500_5700 REG_RULE(5500-10, 5700+10, 40, 0, 21, \
- NL80211_RRF_NO_IR | \
- NL80211_RRF_DFS | \
- NL80211_RRF_NO_IR)
-#define BRCM_5GHZ_5745_5825 REG_RULE(5745-10, 5825+10, 40, 0, 21, \

View file

@ -45,7 +45,7 @@ Acked-by: Sekhar Nori <nsekhar@ti.com>
loopcount = 1;
wl1271_debug(DEBUG_IRQ, "IRQ work");
@@ -5925,7 +5926,6 @@ struct ieee80211_hw *wlcore_alloc_hw(siz
@@ -5901,7 +5902,6 @@ struct ieee80211_hw *wlcore_alloc_hw(siz
wl->ap_ps_map = 0;
wl->ap_fw_ps_map = 0;
wl->quirks = 0;
@ -53,7 +53,7 @@ Acked-by: Sekhar Nori <nsekhar@ti.com>
wl->system_hlid = WL12XX_SYSTEM_HLID;
wl->active_sta_count = 0;
wl->active_link_count = 0;
@@ -6066,7 +6066,7 @@ static void wlcore_nvs_cb(const struct f
@@ -6042,7 +6042,7 @@ static void wlcore_nvs_cb(const struct f
struct platform_device *pdev = wl->pdev;
struct wlcore_platdev_data *pdev_data = dev_get_platdata(&pdev->dev);
struct wl12xx_platform_data *pdata = pdev_data->pdata;
@ -62,7 +62,7 @@ Acked-by: Sekhar Nori <nsekhar@ti.com>
int ret;
irq_handler_t hardirq_fn = NULL;
@@ -6094,18 +6094,17 @@ static void wlcore_nvs_cb(const struct f
@@ -6070,18 +6070,17 @@ static void wlcore_nvs_cb(const struct f
wlcore_adjust_conf(wl);
wl->irq = platform_get_irq(pdev, 0);

View file

@ -8,7 +8,7 @@ Reviewed-by: Felipe Balbi <balbi@ti.com>
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -6065,7 +6065,6 @@ static void wlcore_nvs_cb(const struct f
@@ -6041,7 +6041,6 @@ static void wlcore_nvs_cb(const struct f
struct wl1271 *wl = context;
struct platform_device *pdev = wl->pdev;
struct wlcore_platdev_data *pdev_data = dev_get_platdata(&pdev->dev);
@ -16,7 +16,7 @@ Reviewed-by: Felipe Balbi <balbi@ti.com>
int ret;
irq_handler_t hardirq_fn = NULL;
@@ -6115,7 +6114,7 @@ static void wlcore_nvs_cb(const struct f
@@ -6091,7 +6090,7 @@ static void wlcore_nvs_cb(const struct f
if (!ret) {
wl->irq_wake_enabled = true;
device_init_wakeup(wl->dev, 1);