mac80211: update to wireless-testing 2012-06-14
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32420 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
d787e8414b
commit
75a137d38b
|
@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=2012-05-29
|
||||
PKG_VERSION:=2012-06-14
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
PKG_MD5SUM:=a98eedfcb1690405626217e040deec1a
|
||||
PKG_MD5SUM:=009fd7aa420693e30df9090cee9ea189
|
||||
|
||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -370,8 +370,8 @@ export CONFIG_B43_BCMA_EXTRA=y
|
||||
@@ -371,8 +371,8 @@ export CONFIG_B43_BCMA_EXTRA=y
|
||||
|
||||
export CONFIG_P54_PCI=m
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
ifeq ($(CONFIG_MAC80211),y)
|
||||
$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
|
||||
@@ -675,10 +675,10 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27
|
||||
@@ -683,10 +683,10 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27
|
||||
# We need the backported rfkill module on kernel < 2.6.31.
|
||||
# In more recent kernel versions use the in kernel rfkill module.
|
||||
ifdef CONFIG_COMPAT_KERNEL_2_6_31
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
endif
|
||||
@@ -346,7 +346,8 @@ export CONFIG_IPW2200_QOS=y
|
||||
@@ -347,7 +347,8 @@ export CONFIG_IPW2200_QOS=y
|
||||
# % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
|
||||
endif #CONFIG_WIRELESS_EXT
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
# Sonics Silicon Backplane
|
||||
export CONFIG_SSB_SPROM=y
|
||||
|
||||
@@ -359,7 +360,7 @@ endif #CONFIG_PCMCIA
|
||||
@@ -360,7 +361,7 @@ endif #CONFIG_PCMCIA
|
||||
# export CONFIG_SSB_DEBUG=y
|
||||
export CONFIG_SSB_DRIVER_PCICORE=y
|
||||
export CONFIG_B43_SSB=y
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
export CONFIG_BCMA=m
|
||||
export CONFIG_BCMA_BLOCKIO=y
|
||||
@@ -574,7 +575,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
@@ -577,7 +578,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
|
||||
ifdef CONFIG_MMC
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -362,12 +362,12 @@ export CONFIG_SSB_DRIVER_PCICORE=y
|
||||
@@ -363,12 +363,12 @@ export CONFIG_SSB_DRIVER_PCICORE=y
|
||||
export CONFIG_B43_SSB=y
|
||||
endif #__CONFIG_SSB
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
endif #CONFIG_STAGING
|
||||
|
||||
# mac80211 test driver
|
||||
@@ -399,15 +399,15 @@ endif #CONFIG_CRC_ITU_T
|
||||
@@ -400,15 +400,15 @@ endif #CONFIG_CRC_ITU_T
|
||||
export CONFIG_MWL8K=m
|
||||
|
||||
# Ethernet drivers go here
|
||||
|
@ -32,7 +32,7 @@
|
|||
endif #CONFIG_COMPAT_KERNEL_2_6_28
|
||||
|
||||
ifdef CONFIG_WIRELESS_EXT
|
||||
@@ -468,21 +468,21 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
|
||||
@@ -469,21 +469,21 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
|
||||
# Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER
|
||||
# it also requires new RNDIS_HOST and CDC_ETHER modules which we add
|
||||
ifdef CONFIG_COMPAT_KERNEL_2_6_29
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# export CONFIG_SSB=m
|
||||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
@@ -297,7 +297,7 @@ export CONFIG_B43=m
|
||||
@@ -298,7 +298,7 @@ export CONFIG_B43=m
|
||||
export CONFIG_B43_HWRNG=y
|
||||
export CONFIG_B43_PCI_AUTOSELECT=y
|
||||
ifdef CONFIG_PCMCIA
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -576,7 +576,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
@@ -579,7 +579,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
ifdef CONFIG_MMC
|
||||
|
||||
# export CONFIG_SSB_SDIOHOST=y
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -303,8 +303,8 @@ ifdef CONFIG_MAC80211_LEDS
|
||||
@@ -304,8 +304,8 @@ ifdef CONFIG_MAC80211_LEDS
|
||||
export CONFIG_B43_LEDS=y
|
||||
endif #CONFIG_MAC80211_LEDS
|
||||
export CONFIG_B43_PHY_LP=y
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -378,7 +378,7 @@ export CONFIG_RTL8180=m
|
||||
@@ -379,7 +379,7 @@ export CONFIG_RTL8180=m
|
||||
|
||||
export CONFIG_ADM8211=m
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
export CONFIG_RT2400PCI=m
|
||||
export CONFIG_RT2500PCI=m
|
||||
ifdef CONFIG_CRC_CCITT
|
||||
@@ -524,7 +524,7 @@ export CONFIG_RT2800USB_RT35XX=y
|
||||
@@ -525,7 +525,7 @@ export CONFIG_RT2800USB_RT35XX=y
|
||||
export CONFIG_RT2800USB_RT53XX=y
|
||||
export CONFIG_RT2800USB_UNKNOWN=y
|
||||
endif #CONFIG_CRC_CCITT
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/compat/Makefile
|
||||
+++ b/compat/Makefile
|
||||
@@ -43,8 +43,6 @@ compat-$(CONFIG_COMPAT_KERNEL_3_3) += \
|
||||
@@ -44,8 +44,6 @@ compat-$(CONFIG_COMPAT_KERNEL_3_3) += \
|
||||
flow_dissector.o
|
||||
compat-$(CONFIG_COMPAT_KERNEL_3_4) += compat-3.4.o
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
--- a/include/linux/compat-3.5.h
|
||||
+++ b/include/linux/compat-3.5.h
|
||||
@@ -10,6 +10,8 @@
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <linux/pkt_sched.h>
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
|
||||
|
||||
+#ifndef TCA_CODEL_MAX
|
||||
+
|
||||
/*
|
||||
* This backports:
|
||||
*
|
||||
@@ -107,6 +109,7 @@ struct tc_fq_codel_xstats {
|
||||
};
|
||||
};
|
||||
@@ -106,6 +108,7 @@ struct vga_switcheroo_client_ops {
|
||||
|
||||
#define SIZE_MAX (~(size_t)0)
|
||||
|
||||
+#endif /* TCA_CODEL_MAX */
|
||||
|
||||
/* Backports tty_lock: Localise the lock */
|
||||
#define tty_lock(__tty) tty_lock()
|
||||
#include <linux/pkt_sched.h>
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#endif
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -506,7 +506,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
|
||||
@@ -507,7 +507,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
|
||||
# This activates a threading fix for usb urb.
|
||||
# this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351
|
||||
# This fix will be included in some stable releases.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,7 +8,7 @@
|
|||
#include <asm/unaligned.h>
|
||||
|
||||
#include "hw.h"
|
||||
@@ -531,8 +532,16 @@ static int ath9k_hw_init_macaddr(struct
|
||||
@@ -523,8 +524,16 @@ static int ath9k_hw_init_macaddr(struct
|
||||
common->macaddr[2 * i] = eeval >> 8;
|
||||
common->macaddr[2 * i + 1] = eeval & 0xff;
|
||||
}
|
||||
|
|
|
@ -1,40 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1443,15 +1443,6 @@ static int ath9k_add_interface(struct ie
|
||||
}
|
||||
}
|
||||
|
||||
- if ((ah->opmode == NL80211_IFTYPE_ADHOC) ||
|
||||
- ((vif->type == NL80211_IFTYPE_ADHOC) &&
|
||||
- sc->nvifs > 0)) {
|
||||
- ath_err(common, "Cannot create ADHOC interface when other"
|
||||
- " interfaces already exist.\n");
|
||||
- ret = -EINVAL;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type);
|
||||
|
||||
sc->nvifs++;
|
||||
@@ -1476,15 +1467,6 @@ static int ath9k_change_interface(struct
|
||||
mutex_lock(&sc->mutex);
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
- /* See if new interface type is valid. */
|
||||
- if ((new_type == NL80211_IFTYPE_ADHOC) &&
|
||||
- (sc->nvifs > 1)) {
|
||||
- ath_err(common, "When using ADHOC, it must be the only"
|
||||
- " interface.\n");
|
||||
- ret = -EINVAL;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
if (ath9k_uses_beacons(new_type) &&
|
||||
!ath9k_uses_beacons(vif->type)) {
|
||||
if (sc->nbcnvifs >= ATH_BCBUF) {
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -656,6 +656,7 @@ static const struct ieee80211_iface_limi
|
||||
@@ -666,6 +666,7 @@ static const struct ieee80211_iface_limi
|
||||
#ifdef CONFIG_MAC80211_MESH
|
||||
BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -771,17 +771,11 @@ int ieee80211_register_hw(struct ieee802
|
||||
@@ -776,17 +776,11 @@ int ieee80211_register_hw(struct ieee802
|
||||
*/
|
||||
for (i = 0; i < hw->wiphy->n_iface_combinations; i++) {
|
||||
const struct ieee80211_iface_combination *c;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1532,6 +1532,53 @@ static const struct file_operations fops
|
||||
@@ -1533,6 +1533,53 @@ static const struct file_operations fops
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
|||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1595,5 +1642,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1596,5 +1643,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR,
|
||||
sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);
|
||||
|
||||
|
|
|
@ -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
|
||||
@@ -535,6 +535,8 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -536,6 +536,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;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -905,23 +905,23 @@ static int __init ath9k_init(void)
|
||||
@@ -907,23 +907,23 @@ static int __init ath9k_init(void)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1939,8 +1939,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
REG_WRITE(ah, AR_OBS, 8);
|
||||
@@ -1928,8 +1928,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
REG_WRITE(ah, AR_OBS, 8);
|
||||
|
||||
if (ah->config.rx_intr_mitigation) {
|
||||
- REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -621,6 +621,7 @@ struct ath_softc {
|
||||
@@ -641,6 +641,7 @@ struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
struct survey_info *cur_survey;
|
||||
struct survey_info survey[ATH9K_NUM_CHANNELS];
|
||||
|
||||
@@ -688,6 +689,7 @@ struct ath_softc {
|
||||
@@ -709,6 +710,7 @@ struct ath_softc {
|
||||
struct dfs_pattern_detector *dfs_detector;
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1579,6 +1579,50 @@ static const struct file_operations fops
|
||||
@@ -1580,6 +1580,50 @@ static const struct file_operations fops
|
||||
.owner = THIS_MODULE
|
||||
};
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
|||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1645,5 +1689,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1646,5 +1690,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
&fops_eeprom);
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
|||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1551,7 +1551,7 @@ static void ath9k_disable_ps(struct ath_
|
||||
@@ -1122,7 +1122,7 @@ static void ath9k_disable_ps(struct ath_
|
||||
ath_dbg(common, PS, "PowerSave disabled\n");
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@
|
|||
{
|
||||
struct ath_softc *sc = hw->priv;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
@@ -1602,9 +1602,11 @@ static int ath9k_config(struct ieee80211
|
||||
@@ -1173,9 +1173,11 @@ static int ath9k_config(struct ieee80211
|
||||
|
||||
if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {
|
||||
struct ieee80211_channel *curchan = hw->conf.channel;
|
||||
|
@ -101,7 +101,7 @@
|
|||
|
||||
if (ah->curchan)
|
||||
old_pos = ah->curchan - &ah->channels[0];
|
||||
@@ -1652,7 +1654,23 @@ static int ath9k_config(struct ieee80211
|
||||
@@ -1218,7 +1220,23 @@ static int ath9k_config(struct ieee80211
|
||||
memset(&sc->survey[pos], 0, sizeof(struct survey_info));
|
||||
}
|
||||
|
||||
|
@ -125,4 +125,4 @@
|
|||
+ if (ath_set_channel(sc, hw, hchan) < 0) {
|
||||
ath_err(common, "Unable to set channel\n");
|
||||
mutex_unlock(&sc->mutex);
|
||||
return -EINVAL;
|
||||
ath9k_ps_restore(sc);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -817,6 +817,7 @@ static const struct net_device_ops ieee8
|
||||
@@ -814,6 +814,7 @@ static const struct net_device_ops ieee8
|
||||
static void ieee80211_if_setup(struct net_device *dev)
|
||||
{
|
||||
ether_setup(dev);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
u16 listen_interval;
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1936,7 +1936,7 @@ static int ieee80211_get_tx_power(struct
|
||||
@@ -1940,7 +1940,7 @@ static int ieee80211_get_tx_power(struct
|
||||
{
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1676,6 +1676,8 @@ int ath9k_config(struct ieee80211_hw *hw
|
||||
@@ -1243,6 +1243,8 @@ int ath9k_config(struct ieee80211_hw *hw
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
/*
|
||||
* The most recent snapshot of channel->noisefloor for the old
|
||||
* channel is only available after the hardware reset. Copy it to
|
||||
@@ -1690,6 +1692,7 @@ int ath9k_config(struct ieee80211_hw *hw
|
||||
@@ -1257,6 +1259,7 @@ int ath9k_config(struct ieee80211_hw *hw
|
||||
sc->config.txpowlimit = 2 * conf->power_level;
|
||||
ath9k_cmn_update_txpow(ah, sc->curtxpow,
|
||||
sc->config.txpowlimit, &sc->curtxpow);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
int antenna;
|
||||
--- a/net/mac80211/sta_info.h
|
||||
+++ b/net/mac80211/sta_info.h
|
||||
@@ -320,6 +320,11 @@ struct sta_info {
|
||||
@@ -325,6 +325,11 @@ struct sta_info {
|
||||
unsigned long rx_dropped;
|
||||
int last_signal;
|
||||
struct ewma avg_signal;
|
||||
|
@ -78,7 +78,7 @@
|
|||
kfree(sta);
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -522,6 +522,8 @@ struct station_parameters {
|
||||
@@ -527,6 +527,8 @@ struct station_parameters {
|
||||
* @STATION_INFO_STA_FLAGS: @sta_flags filled
|
||||
* @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled
|
||||
* @STATION_INFO_T_OFFSET: @t_offset filled
|
||||
|
@ -87,7 +87,7 @@
|
|||
*/
|
||||
enum station_info_flags {
|
||||
STATION_INFO_INACTIVE_TIME = 1<<0,
|
||||
@@ -545,6 +547,8 @@ enum station_info_flags {
|
||||
@@ -550,6 +552,8 @@ enum station_info_flags {
|
||||
STATION_INFO_STA_FLAGS = 1<<18,
|
||||
STATION_INFO_BEACON_LOSS_COUNT = 1<<19,
|
||||
STATION_INFO_T_OFFSET = 1<<20,
|
||||
|
@ -96,7 +96,7 @@
|
|||
};
|
||||
|
||||
/**
|
||||
@@ -626,6 +630,9 @@ struct sta_bss_parameters {
|
||||
@@ -631,6 +635,9 @@ struct sta_bss_parameters {
|
||||
NOTE: For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
|
||||
* @signal_avg: avg signal strength, type depends on the wiphy's signal_type
|
||||
NOTE: For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
|
||||
|
@ -106,7 +106,7 @@
|
|||
* @txrate: current unicast bitrate from this station
|
||||
* @rxrate: current unicast bitrate to this station
|
||||
* @rx_packets: packets received from this station
|
||||
@@ -658,6 +665,11 @@ struct station_info {
|
||||
@@ -663,6 +670,11 @@ struct station_info {
|
||||
u8 plink_state;
|
||||
s8 signal;
|
||||
s8 signal_avg;
|
||||
|
@ -137,7 +137,7 @@
|
|||
u8 rs_num_delims;
|
||||
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
||||
@@ -988,6 +988,7 @@ static int ath9k_rx_skb_preprocess(struc
|
||||
@@ -951,6 +951,7 @@ static int ath9k_rx_skb_preprocess(struc
|
||||
bool *decrypt_error)
|
||||
{
|
||||
struct ath_hw *ah = common->ah;
|
||||
|
@ -145,7 +145,7 @@
|
|||
|
||||
/*
|
||||
* everything but the rate is checked here, the rate check is done
|
||||
@@ -1013,6 +1014,20 @@ static int ath9k_rx_skb_preprocess(struc
|
||||
@@ -976,6 +977,20 @@ static int ath9k_rx_skb_preprocess(struc
|
||||
if (rx_stats->rs_moreaggr)
|
||||
rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
|
||||
|
||||
|
@ -166,28 +166,9 @@
|
|||
return 0;
|
||||
}
|
||||
|
||||
@@ -1543,14 +1558,14 @@ static void ath_ant_comb_scan(struct ath
|
||||
struct ath_ant_comb *antcomb = &sc->ant_comb;
|
||||
int alt_ratio = 0, alt_rssi_avg = 0, main_rssi_avg = 0, curr_alt_set;
|
||||
int curr_main_set;
|
||||
- int main_rssi = rs->rs_rssi_ctl0;
|
||||
- int alt_rssi = rs->rs_rssi_ctl1;
|
||||
+ int main_rssi = rs->rs_rssi_ctl[0];
|
||||
+ int alt_rssi = rs->rs_rssi_ctl[1];
|
||||
int rx_ant_conf, main_ant_conf;
|
||||
bool short_scan = false;
|
||||
|
||||
- rx_ant_conf = (rs->rs_rssi_ctl2 >> ATH_ANT_RX_CURRENT_SHIFT) &
|
||||
+ rx_ant_conf = (rs->rs_rssi_ctl[2] >> ATH_ANT_RX_CURRENT_SHIFT) &
|
||||
ATH_ANT_RX_MASK;
|
||||
- main_ant_conf = (rs->rs_rssi_ctl2 >> ATH_ANT_RX_MAIN_SHIFT) &
|
||||
+ main_ant_conf = (rs->rs_rssi_ctl[2] >> ATH_ANT_RX_MAIN_SHIFT) &
|
||||
ATH_ANT_RX_MASK;
|
||||
|
||||
/* Record packet only when both main_rssi and alt_rssi is positive */
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
@@ -455,12 +455,12 @@ int ath9k_hw_process_rxdesc_edma(struct
|
||||
@@ -458,12 +458,12 @@ int ath9k_hw_process_rxdesc_edma(struct
|
||||
|
||||
/* XXX: Keycache */
|
||||
rxs->rs_rssi = MS(rxsp->status5, AR_RxRSSICombined);
|
||||
|
@ -248,7 +229,7 @@
|
|||
if (ads.ds_rxstatus8 & AR_RxKeyIdxValid)
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -997,12 +997,12 @@ void ath_debug_stat_rx(struct ath_softc
|
||||
@@ -998,12 +998,12 @@ void ath_debug_stat_rx(struct ath_softc
|
||||
#ifdef CONFIG_ATH9K_MAC_DEBUG
|
||||
spin_lock(&sc->debug.samp_lock);
|
||||
RX_SAMP_DBG(jiffies) = jiffies;
|
||||
|
@ -269,7 +250,7 @@
|
|||
RX_SAMP_DBG(rate) = rs->rs_rate;
|
||||
--- a/include/linux/nl80211.h
|
||||
+++ b/include/linux/nl80211.h
|
||||
@@ -1695,6 +1695,8 @@ enum nl80211_sta_bss_param {
|
||||
@@ -1699,6 +1699,8 @@ enum nl80211_sta_bss_param {
|
||||
* @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
|
||||
* @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
|
||||
* @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
|
||||
|
@ -278,7 +259,7 @@
|
|||
* @__NL80211_STA_INFO_AFTER_LAST: internal
|
||||
* @NL80211_STA_INFO_MAX: highest possible station info attribute
|
||||
*/
|
||||
@@ -1719,6 +1721,8 @@ enum nl80211_sta_info {
|
||||
@@ -1723,6 +1725,8 @@ enum nl80211_sta_info {
|
||||
NL80211_STA_INFO_STA_FLAGS,
|
||||
NL80211_STA_INFO_BEACON_LOSS,
|
||||
NL80211_STA_INFO_T_OFFSET,
|
||||
|
@ -289,7 +270,7 @@
|
|||
__NL80211_STA_INFO_AFTER_LAST,
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -2467,6 +2467,33 @@ nla_put_failure:
|
||||
@@ -2523,6 +2523,33 @@ nla_put_failure:
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -323,7 +304,7 @@
|
|||
static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
|
||||
int flags,
|
||||
struct cfg80211_registered_device *rdev,
|
||||
@@ -2528,6 +2555,18 @@ static int nl80211_send_station(struct s
|
||||
@@ -2584,6 +2611,18 @@ static int nl80211_send_station(struct s
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -370,3 +351,37 @@
|
|||
|
||||
sta_set_rate_info_tx(sta, &sta->last_tx_rate, &sinfo->txrate);
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/dfs.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/dfs.c
|
||||
@@ -164,8 +164,8 @@ void ath9k_dfs_process_phyerr(struct ath
|
||||
return;
|
||||
}
|
||||
|
||||
- ard.rssi = rs->rs_rssi_ctl0;
|
||||
- ard.ext_rssi = rs->rs_rssi_ext0;
|
||||
+ ard.rssi = rs->rs_rssi_ctl[0];
|
||||
+ ard.ext_rssi = rs->rs_rssi_ext[0];
|
||||
|
||||
/*
|
||||
* hardware stores this as 8 bit signed value.
|
||||
--- a/drivers/net/wireless/ath/ath9k/antenna.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/antenna.c
|
||||
@@ -529,14 +529,14 @@ void ath_ant_comb_scan(struct ath_softc
|
||||
struct ath_ant_comb *antcomb = &sc->ant_comb;
|
||||
int alt_ratio = 0, alt_rssi_avg = 0, main_rssi_avg = 0, curr_alt_set;
|
||||
int curr_main_set;
|
||||
- int main_rssi = rs->rs_rssi_ctl0;
|
||||
- int alt_rssi = rs->rs_rssi_ctl1;
|
||||
+ int main_rssi = rs->rs_rssi_ctl[0];
|
||||
+ int alt_rssi = rs->rs_rssi_ctl[1];
|
||||
int rx_ant_conf, main_ant_conf;
|
||||
bool short_scan = false;
|
||||
|
||||
- rx_ant_conf = (rs->rs_rssi_ctl2 >> ATH_ANT_RX_CURRENT_SHIFT) &
|
||||
+ rx_ant_conf = (rs->rs_rssi_ctl[2] >> ATH_ANT_RX_CURRENT_SHIFT) &
|
||||
ATH_ANT_RX_MASK;
|
||||
- main_ant_conf = (rs->rs_rssi_ctl2 >> ATH_ANT_RX_MAIN_SHIFT) &
|
||||
+ main_ant_conf = (rs->rs_rssi_ctl[2] >> ATH_ANT_RX_MAIN_SHIFT) &
|
||||
ATH_ANT_RX_MASK;
|
||||
|
||||
/* Record packet only when both main_rssi and alt_rssi is positive */
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
spinlock_t txbuflock;
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1646,6 +1646,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1647,6 +1647,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
&fops_interrupt);
|
||||
debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
&fops_xmit);
|
||||
|
@ -65,7 +65,7 @@
|
|||
__skb_unlink(skb, &tid->buf_q);
|
||||
list_add_tail(&bf->list, bf_q);
|
||||
if (bf_prev)
|
||||
@@ -1738,6 +1749,8 @@ static void ath_tx_send_ampdu(struct ath
|
||||
@@ -1728,6 +1739,8 @@ static void ath_tx_send_ampdu(struct ath
|
||||
/* Add sub-frame to BAW */
|
||||
ath_tx_addto_baw(sc, tid, bf->bf_state.seqno);
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
|||
/* Queue to h/w without aggregation */
|
||||
TX_STAT_INC(txctl->txq->axq_qnum, a_queued_hw);
|
||||
bf->bf_lastbf = bf;
|
||||
@@ -1879,22 +1892,11 @@ error:
|
||||
@@ -1878,22 +1891,11 @@ error:
|
||||
|
||||
/* FIXME: tx power */
|
||||
static void ath_tx_start_dma(struct ath_softc *sc, struct sk_buff *skb,
|
||||
|
@ -99,7 +99,7 @@
|
|||
|
||||
if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
|
||||
/*
|
||||
@@ -1926,6 +1928,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
@@ -1925,6 +1927,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
struct ieee80211_vif *vif = info->control.vif;
|
||||
struct ath_softc *sc = hw->priv;
|
||||
struct ath_txq *txq = txctl->txq;
|
||||
|
@ -107,7 +107,7 @@
|
|||
int padpos, padsize;
|
||||
int frmlen = skb->len + FCS_LEN;
|
||||
int q;
|
||||
@@ -1968,6 +1971,24 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
@@ -1967,6 +1970,24 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
|
||||
setup_frame_info(hw, skb, frmlen);
|
||||
|
||||
|
@ -132,7 +132,7 @@
|
|||
/*
|
||||
* At this point, the vif, hw_key and sta pointers in the tx control
|
||||
* info are no longer valid (overwritten by the ath_frame_info data.
|
||||
@@ -1982,7 +2003,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
@@ -1981,7 +2002,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
txq->stopped = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -508,6 +508,9 @@ static inline u16 ath9k_btcoex_aggr_limi
|
||||
@@ -523,6 +523,9 @@ static inline u16 ath9k_btcoex_aggr_limi
|
||||
#ifdef CONFIG_MAC80211_LEDS
|
||||
void ath_init_leds(struct ath_softc *sc);
|
||||
void ath_deinit_leds(struct ath_softc *sc);
|
||||
|
@ -10,7 +10,7 @@
|
|||
#else
|
||||
static inline void ath_init_leds(struct ath_softc *sc)
|
||||
{
|
||||
@@ -621,6 +624,13 @@ struct ath9k_vif_iter_data {
|
||||
@@ -641,6 +644,13 @@ struct ath9k_vif_iter_data {
|
||||
int nadhocs; /* number of adhoc vifs */
|
||||
};
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
@@ -662,9 +672,8 @@ struct ath_softc {
|
||||
@@ -682,9 +692,8 @@ struct ath_softc {
|
||||
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
|
||||
|
||||
#ifdef CONFIG_MAC80211_LEDS
|
||||
|
@ -171,7 +171,7 @@
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -782,7 +782,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -792,7 +792,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
|
||||
#ifdef CONFIG_MAC80211_LEDS
|
||||
/* must be initialized before ieee80211_register_hw */
|
||||
|
@ -182,7 +182,7 @@
|
|||
#endif
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1255,6 +1255,61 @@ static const struct file_operations fops
|
||||
@@ -1256,6 +1256,61 @@ static const struct file_operations fops
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
|
@ -244,7 +244,7 @@
|
|||
#ifdef CONFIG_ATH9K_MAC_DEBUG
|
||||
|
||||
void ath9k_debug_samp_bb_mac(struct ath_softc *sc)
|
||||
@@ -1684,6 +1739,11 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1685,6 +1740,11 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
&fops_samps);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -726,6 +726,8 @@ struct ieee80211_sub_if_data {
|
||||
@@ -702,6 +702,8 @@ struct ieee80211_sub_if_data {
|
||||
|
||||
/* bitmap of allowed (non-MCS) rate indexes for rate control */
|
||||
u32 rc_rateidx_mask[IEEE80211_NUM_BANDS];
|
||||
|
@ -11,7 +11,7 @@
|
|||
union {
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2112,9 +2112,20 @@ static int ieee80211_set_bitrate_mask(st
|
||||
@@ -2119,9 +2119,20 @@ static int ieee80211_set_bitrate_mask(st
|
||||
}
|
||||
|
||||
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
|
||||
|
@ -34,7 +34,7 @@
|
|||
return 0;
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -3672,7 +3672,7 @@ void ieee80211_send_bar(struct ieee80211
|
||||
@@ -3676,7 +3676,7 @@ void ieee80211_send_bar(struct ieee80211
|
||||
* (deprecated; this will be removed once drivers get updated to use
|
||||
* rate_idx_mask)
|
||||
* @rate_idx_mask: user-requested (legacy) rate mask
|
||||
|
@ -43,7 +43,7 @@
|
|||
* @bss: whether this frame is sent out in AP or IBSS mode
|
||||
*/
|
||||
struct ieee80211_tx_rate_control {
|
||||
@@ -3684,7 +3684,7 @@ struct ieee80211_tx_rate_control {
|
||||
@@ -3688,7 +3688,7 @@ struct ieee80211_tx_rate_control {
|
||||
bool rts, short_preamble;
|
||||
u8 max_rate_idx;
|
||||
u32 rate_idx_mask;
|
||||
|
@ -54,7 +54,7 @@
|
|||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -642,9 +642,11 @@ ieee80211_tx_h_rate_ctrl(struct ieee8021
|
||||
@@ -637,9 +637,11 @@ ieee80211_tx_h_rate_ctrl(struct ieee8021
|
||||
txrc.max_rate_idx = -1;
|
||||
else
|
||||
txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1;
|
||||
|
@ -69,7 +69,7 @@
|
|||
txrc.bss = (tx->sdata->vif.type == NL80211_IFTYPE_AP ||
|
||||
tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
|
||||
tx->sdata->vif.type == NL80211_IFTYPE_ADHOC);
|
||||
@@ -2480,8 +2482,6 @@ struct sk_buff *ieee80211_beacon_get_tim
|
||||
@@ -2475,8 +2477,6 @@ struct sk_buff *ieee80211_beacon_get_tim
|
||||
txrc.max_rate_idx = -1;
|
||||
else
|
||||
txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
@@ -237,21 +237,19 @@ static bool ar9003_hw_get_isr(struct ath
|
||||
@@ -240,21 +240,19 @@ static bool ar9003_hw_get_isr(struct ath
|
||||
|
||||
*masked = isr & ATH9K_INT_COMMON;
|
||||
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ani.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.h
|
||||
@@ -128,7 +128,6 @@ struct ar5416AniState {
|
||||
u32 listenTime;
|
||||
int32_t rssiThrLow;
|
||||
int32_t rssiThrHigh;
|
||||
- u32 noiseFloor;
|
||||
u32 ofdmPhyErrCount;
|
||||
u32 cckPhyErrCount;
|
||||
int16_t pktRssi[2];
|
||||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -266,11 +266,9 @@ static void ath9k_hw_set_ofdm_nil(struct
|
||||
const struct ani_ofdm_level_entry *entry_ofdm;
|
||||
const struct ani_cck_level_entry *entry_cck;
|
||||
|
||||
- aniState->noiseFloor = BEACON_RSSI(ah);
|
||||
-
|
||||
ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
|
||||
aniState->ofdmNoiseImmunityLevel,
|
||||
- immunityLevel, aniState->noiseFloor,
|
||||
+ immunityLevel, BEACON_RSSI(ah),
|
||||
aniState->rssiThrLow, aniState->rssiThrHigh);
|
||||
|
||||
if (aniState->update_ani)
|
||||
@@ -292,7 +290,7 @@ static void ath9k_hw_set_ofdm_nil(struct
|
||||
ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
entry_ofdm->fir_step_level);
|
||||
|
||||
- if ((aniState->noiseFloor >= aniState->rssiThrHigh) &&
|
||||
+ if (BEACON_RSSI(ah) >= aniState->rssiThrHigh &&
|
||||
(!aniState->ofdmWeakSigDetectOff !=
|
||||
entry_ofdm->ofdm_weak_signal_on)) {
|
||||
ath9k_hw_ani_control(ah,
|
||||
@@ -329,15 +327,14 @@ static void ath9k_hw_set_cck_nil(struct
|
||||
const struct ani_ofdm_level_entry *entry_ofdm;
|
||||
const struct ani_cck_level_entry *entry_cck;
|
||||
|
||||
- aniState->noiseFloor = BEACON_RSSI(ah);
|
||||
ath_dbg(common, ANI, "**** ccklevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
|
||||
aniState->cckNoiseImmunityLevel, immunityLevel,
|
||||
- aniState->noiseFloor, aniState->rssiThrLow,
|
||||
+ BEACON_RSSI(ah), aniState->rssiThrLow,
|
||||
aniState->rssiThrHigh);
|
||||
|
||||
if ((ah->opmode == NL80211_IFTYPE_STATION ||
|
||||
ah->opmode == NL80211_IFTYPE_ADHOC) &&
|
||||
- aniState->noiseFloor <= aniState->rssiThrLow &&
|
||||
+ BEACON_RSSI(ah) <= aniState->rssiThrLow &&
|
||||
immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI)
|
||||
immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -265,6 +265,7 @@ static void ath9k_hw_set_ofdm_nil(struct
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
const struct ani_ofdm_level_entry *entry_ofdm;
|
||||
const struct ani_cck_level_entry *entry_cck;
|
||||
+ bool weak_sig;
|
||||
|
||||
ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
|
||||
aniState->ofdmNoiseImmunityLevel,
|
||||
@@ -290,13 +291,15 @@ static void ath9k_hw_set_ofdm_nil(struct
|
||||
ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
entry_ofdm->fir_step_level);
|
||||
|
||||
- if (BEACON_RSSI(ah) >= aniState->rssiThrHigh &&
|
||||
- (!aniState->ofdmWeakSigDetectOff !=
|
||||
- entry_ofdm->ofdm_weak_signal_on)) {
|
||||
+ weak_sig = entry_ofdm->ofdm_weak_signal_on;
|
||||
+ if (ah->opmode == NL80211_IFTYPE_STATION &&
|
||||
+ BEACON_RSSI(ah) <= aniState->rssiThrHigh)
|
||||
+ weak_sig = true;
|
||||
+
|
||||
+ if (!aniState->ofdmWeakSigDetectOff != weak_sig)
|
||||
ath9k_hw_ani_control(ah,
|
||||
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
entry_ofdm->ofdm_weak_signal_on);
|
||||
- }
|
||||
}
|
||||
|
||||
static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
|
|
@ -1,192 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -185,7 +185,7 @@ static void ath9k_hw_ani_ofdm_err_trigge
|
||||
}
|
||||
rssi = BEACON_RSSI(ah);
|
||||
if (rssi > aniState->rssiThrHigh) {
|
||||
- if (!aniState->ofdmWeakSigDetectOff) {
|
||||
+ if (aniState->ofdmWeakSigDetect) {
|
||||
if (ath9k_hw_ani_control(ah,
|
||||
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
false)) {
|
||||
@@ -200,7 +200,7 @@ static void ath9k_hw_ani_ofdm_err_trigge
|
||||
return;
|
||||
}
|
||||
} else if (rssi > aniState->rssiThrLow) {
|
||||
- if (aniState->ofdmWeakSigDetectOff)
|
||||
+ if (!aniState->ofdmWeakSigDetect)
|
||||
ath9k_hw_ani_control(ah,
|
||||
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
true);
|
||||
@@ -211,7 +211,7 @@ static void ath9k_hw_ani_ofdm_err_trigge
|
||||
} else {
|
||||
if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
|
||||
!conf_is_ht(conf)) {
|
||||
- if (!aniState->ofdmWeakSigDetectOff)
|
||||
+ if (aniState->ofdmWeakSigDetect)
|
||||
ath9k_hw_ani_control(ah,
|
||||
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
false);
|
||||
@@ -296,7 +296,7 @@ static void ath9k_hw_set_ofdm_nil(struct
|
||||
BEACON_RSSI(ah) <= aniState->rssiThrHigh)
|
||||
weak_sig = true;
|
||||
|
||||
- if (!aniState->ofdmWeakSigDetectOff != weak_sig)
|
||||
+ if (aniState->ofdmWeakSigDetect != weak_sig)
|
||||
ath9k_hw_ani_control(ah,
|
||||
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
entry_ofdm->ofdm_weak_signal_on);
|
||||
@@ -401,7 +401,7 @@ static void ath9k_hw_ani_lower_immunity_
|
||||
if (rssi > aniState->rssiThrHigh) {
|
||||
/* XXX: Handle me */
|
||||
} else if (rssi > aniState->rssiThrLow) {
|
||||
- if (aniState->ofdmWeakSigDetectOff) {
|
||||
+ if (!aniState->ofdmWeakSigDetect) {
|
||||
if (ath9k_hw_ani_control(ah,
|
||||
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
true))
|
||||
@@ -509,9 +509,9 @@ static void ath9k_ani_reset_old(struct a
|
||||
if (aniState->spurImmunityLevel != 0)
|
||||
ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL,
|
||||
aniState->spurImmunityLevel);
|
||||
- if (aniState->ofdmWeakSigDetectOff)
|
||||
+ if (!aniState->ofdmWeakSigDetect)
|
||||
ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
- !aniState->ofdmWeakSigDetectOff);
|
||||
+ aniState->ofdmWeakSigDetect);
|
||||
if (aniState->cckWeakSigThreshold)
|
||||
ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR,
|
||||
aniState->cckWeakSigThreshold);
|
||||
@@ -887,8 +887,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah
|
||||
|
||||
ani->rssiThrHigh = ATH9K_ANI_RSSI_THR_HIGH;
|
||||
ani->rssiThrLow = ATH9K_ANI_RSSI_THR_LOW;
|
||||
- ani->ofdmWeakSigDetectOff =
|
||||
- !ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
+ ani->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;
|
||||
ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;
|
||||
ani->update_ani = false;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ani.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.h
|
||||
@@ -122,7 +122,7 @@ struct ar5416AniState {
|
||||
u8 mrcCCKOff;
|
||||
u8 spurImmunityLevel;
|
||||
u8 firstepLevel;
|
||||
- u8 ofdmWeakSigDetectOff;
|
||||
+ u8 ofdmWeakSigDetect;
|
||||
u8 cckWeakSigThreshold;
|
||||
bool update_ani;
|
||||
u32 listenTime;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
@@ -1042,12 +1042,12 @@ static bool ar5008_hw_ani_control_old(st
|
||||
REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
|
||||
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
|
||||
|
||||
- if (!on != aniState->ofdmWeakSigDetectOff) {
|
||||
+ if (on != aniState->ofdmWeakSigDetect) {
|
||||
if (on)
|
||||
ah->stats.ast_ani_ofdmon++;
|
||||
else
|
||||
ah->stats.ast_ani_ofdmoff++;
|
||||
- aniState->ofdmWeakSigDetectOff = !on;
|
||||
+ aniState->ofdmWeakSigDetect = on;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1114,10 +1114,10 @@ static bool ar5008_hw_ani_control_old(st
|
||||
|
||||
ath_dbg(common, ANI, "ANI parameters:\n");
|
||||
ath_dbg(common, ANI,
|
||||
- "noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetectOff=%d\n",
|
||||
+ "noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetect=%d\n",
|
||||
aniState->noiseImmunityLevel,
|
||||
aniState->spurImmunityLevel,
|
||||
- !aniState->ofdmWeakSigDetectOff);
|
||||
+ aniState->ofdmWeakSigDetect);
|
||||
ath_dbg(common, ANI,
|
||||
"cckWeakSigThreshold=%d, firstepLevel=%d, listenTime=%d\n",
|
||||
aniState->cckWeakSigThreshold,
|
||||
@@ -1206,18 +1206,18 @@ static bool ar5008_hw_ani_control_new(st
|
||||
REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
|
||||
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
|
||||
|
||||
- if (!on != aniState->ofdmWeakSigDetectOff) {
|
||||
+ if (on != aniState->ofdmWeakSigDetect) {
|
||||
ath_dbg(common, ANI,
|
||||
"** ch %d: ofdm weak signal: %s=>%s\n",
|
||||
chan->channel,
|
||||
- !aniState->ofdmWeakSigDetectOff ?
|
||||
+ aniState->ofdmWeakSigDetect ?
|
||||
"on" : "off",
|
||||
on ? "on" : "off");
|
||||
if (on)
|
||||
ah->stats.ast_ani_ofdmon++;
|
||||
else
|
||||
ah->stats.ast_ani_ofdmoff++;
|
||||
- aniState->ofdmWeakSigDetectOff = !on;
|
||||
+ aniState->ofdmWeakSigDetect = on;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1367,7 +1367,7 @@ static bool ar5008_hw_ani_control_new(st
|
||||
ath_dbg(common, ANI,
|
||||
"ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n",
|
||||
aniState->spurImmunityLevel,
|
||||
- !aniState->ofdmWeakSigDetectOff ? "on" : "off",
|
||||
+ aniState->ofdmWeakSigDetect ? "on" : "off",
|
||||
aniState->firstepLevel,
|
||||
!aniState->mrcCCKOff ? "on" : "off",
|
||||
aniState->listenTime,
|
||||
@@ -1456,7 +1456,7 @@ static void ar5008_hw_ani_cache_ini_regs
|
||||
/* these levels just got reset to defaults by the INI */
|
||||
aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
|
||||
aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
|
||||
- aniState->ofdmWeakSigDetectOff = !ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
+ aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
aniState->mrcCCKOff = true; /* not available on pre AR9003 */
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -821,18 +821,18 @@ static bool ar9003_hw_ani_control(struct
|
||||
REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
|
||||
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
|
||||
|
||||
- if (!on != aniState->ofdmWeakSigDetectOff) {
|
||||
+ if (on != aniState->ofdmWeakSigDetect) {
|
||||
ath_dbg(common, ANI,
|
||||
"** ch %d: ofdm weak signal: %s=>%s\n",
|
||||
chan->channel,
|
||||
- !aniState->ofdmWeakSigDetectOff ?
|
||||
+ aniState->ofdmWeakSigDetect ?
|
||||
"on" : "off",
|
||||
on ? "on" : "off");
|
||||
if (on)
|
||||
ah->stats.ast_ani_ofdmon++;
|
||||
else
|
||||
ah->stats.ast_ani_ofdmoff++;
|
||||
- aniState->ofdmWeakSigDetectOff = !on;
|
||||
+ aniState->ofdmWeakSigDetect = on;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -998,7 +998,7 @@ static bool ar9003_hw_ani_control(struct
|
||||
ath_dbg(common, ANI,
|
||||
"ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n",
|
||||
aniState->spurImmunityLevel,
|
||||
- !aniState->ofdmWeakSigDetectOff ? "on" : "off",
|
||||
+ aniState->ofdmWeakSigDetect ? "on" : "off",
|
||||
aniState->firstepLevel,
|
||||
!aniState->mrcCCKOff ? "on" : "off",
|
||||
aniState->listenTime,
|
||||
@@ -1109,7 +1109,7 @@ static void ar9003_hw_ani_cache_ini_regs
|
||||
/* these levels just got reset to defaults by the INI */
|
||||
aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
|
||||
aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
|
||||
- aniState->ofdmWeakSigDetectOff = !ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
+ aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
aniState->mrcCCKOff = !ATH9K_ANI_ENABLE_MRC_CCK;
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -176,7 +176,7 @@ static void ath9k_hw_ani_ofdm_err_trigge
|
||||
}
|
||||
}
|
||||
|
||||
- if (ah->opmode == NL80211_IFTYPE_AP) {
|
||||
+ if (ah->opmode != NL80211_IFTYPE_STATION) {
|
||||
if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
|
||||
ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
aniState->firstepLevel + 1);
|
||||
@@ -236,7 +236,7 @@ static void ath9k_hw_ani_cck_err_trigger
|
||||
return;
|
||||
}
|
||||
}
|
||||
- if (ah->opmode == NL80211_IFTYPE_AP) {
|
||||
+ if (ah->opmode != NL80211_IFTYPE_STATION) {
|
||||
if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
|
||||
ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
aniState->firstepLevel + 1);
|
||||
@@ -335,8 +335,7 @@ static void ath9k_hw_set_cck_nil(struct
|
||||
BEACON_RSSI(ah), aniState->rssiThrLow,
|
||||
aniState->rssiThrHigh);
|
||||
|
||||
- if ((ah->opmode == NL80211_IFTYPE_STATION ||
|
||||
- ah->opmode == NL80211_IFTYPE_ADHOC) &&
|
||||
+ if (ah->opmode == NL80211_IFTYPE_STATION &&
|
||||
BEACON_RSSI(ah) <= aniState->rssiThrLow &&
|
||||
immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI)
|
||||
immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;
|
||||
@@ -390,7 +389,7 @@ static void ath9k_hw_ani_lower_immunity_
|
||||
|
||||
aniState = &ah->curchan->ani;
|
||||
|
||||
- if (ah->opmode == NL80211_IFTYPE_AP) {
|
||||
+ if (ah->opmode != NL80211_IFTYPE_STATION) {
|
||||
if (aniState->firstepLevel > 0) {
|
||||
if (ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
aniState->firstepLevel - 1))
|
||||
@@ -474,8 +473,7 @@ static void ath9k_ani_reset_old(struct a
|
||||
|
||||
aniState = &ah->curchan->ani;
|
||||
|
||||
- if (ah->opmode != NL80211_IFTYPE_STATION
|
||||
- && ah->opmode != NL80211_IFTYPE_ADHOC) {
|
||||
+ if (ah->opmode != NL80211_IFTYPE_STATION) {
|
||||
ath_dbg(common, ANI, "Reset ANI state opmode %u\n", ah->opmode);
|
||||
ah->stats.ast_ani_reset++;
|
||||
|
|
@ -1,627 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -104,11 +104,6 @@ static const struct ani_cck_level_entry
|
||||
#define ATH9K_ANI_CCK_DEF_LEVEL \
|
||||
2 /* default level - matches the INI settings */
|
||||
|
||||
-static bool use_new_ani(struct ath_hw *ah)
|
||||
-{
|
||||
- return AR_SREV_9300_20_OR_LATER(ah) || modparam_force_new_ani;
|
||||
-}
|
||||
-
|
||||
static void ath9k_hw_update_mibstats(struct ath_hw *ah,
|
||||
struct ath9k_mib_stats *stats)
|
||||
{
|
||||
@@ -131,11 +126,6 @@ static void ath9k_ani_restart(struct ath
|
||||
aniState = &ah->curchan->ani;
|
||||
aniState->listenTime = 0;
|
||||
|
||||
- if (!use_new_ani(ah)) {
|
||||
- ofdm_base = AR_PHY_COUNTMAX - ah->config.ofdm_trig_high;
|
||||
- cck_base = AR_PHY_COUNTMAX - ah->config.cck_trig_high;
|
||||
- }
|
||||
-
|
||||
ath_dbg(common, ANI, "Writing ofdmbase=%u cckbase=%u\n",
|
||||
ofdm_base, cck_base);
|
||||
|
||||
@@ -154,110 +144,6 @@ static void ath9k_ani_restart(struct ath
|
||||
aniState->cckPhyErrCount = 0;
|
||||
}
|
||||
|
||||
-static void ath9k_hw_ani_ofdm_err_trigger_old(struct ath_hw *ah)
|
||||
-{
|
||||
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
|
||||
- struct ar5416AniState *aniState;
|
||||
- int32_t rssi;
|
||||
-
|
||||
- aniState = &ah->curchan->ani;
|
||||
-
|
||||
- if (aniState->noiseImmunityLevel < HAL_NOISE_IMMUNE_MAX) {
|
||||
- if (ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL,
|
||||
- aniState->noiseImmunityLevel + 1)) {
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (aniState->spurImmunityLevel < HAL_SPUR_IMMUNE_MAX) {
|
||||
- if (ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL,
|
||||
- aniState->spurImmunityLevel + 1)) {
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (ah->opmode != NL80211_IFTYPE_STATION) {
|
||||
- if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
- aniState->firstepLevel + 1);
|
||||
- }
|
||||
- return;
|
||||
- }
|
||||
- rssi = BEACON_RSSI(ah);
|
||||
- if (rssi > aniState->rssiThrHigh) {
|
||||
- if (aniState->ofdmWeakSigDetect) {
|
||||
- if (ath9k_hw_ani_control(ah,
|
||||
- ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
- false)) {
|
||||
- ath9k_hw_ani_control(ah,
|
||||
- ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0);
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
- if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
- aniState->firstepLevel + 1);
|
||||
- return;
|
||||
- }
|
||||
- } else if (rssi > aniState->rssiThrLow) {
|
||||
- if (!aniState->ofdmWeakSigDetect)
|
||||
- ath9k_hw_ani_control(ah,
|
||||
- ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
- true);
|
||||
- if (aniState->firstepLevel < HAL_FIRST_STEP_MAX)
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
- aniState->firstepLevel + 1);
|
||||
- return;
|
||||
- } else {
|
||||
- if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
|
||||
- !conf_is_ht(conf)) {
|
||||
- if (aniState->ofdmWeakSigDetect)
|
||||
- ath9k_hw_ani_control(ah,
|
||||
- ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
- false);
|
||||
- if (aniState->firstepLevel > 0)
|
||||
- ath9k_hw_ani_control(ah,
|
||||
- ATH9K_ANI_FIRSTEP_LEVEL, 0);
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static void ath9k_hw_ani_cck_err_trigger_old(struct ath_hw *ah)
|
||||
-{
|
||||
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
|
||||
- struct ar5416AniState *aniState;
|
||||
- int32_t rssi;
|
||||
-
|
||||
- aniState = &ah->curchan->ani;
|
||||
- if (aniState->noiseImmunityLevel < HAL_NOISE_IMMUNE_MAX) {
|
||||
- if (ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL,
|
||||
- aniState->noiseImmunityLevel + 1)) {
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
- if (ah->opmode != NL80211_IFTYPE_STATION) {
|
||||
- if (aniState->firstepLevel < HAL_FIRST_STEP_MAX) {
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
- aniState->firstepLevel + 1);
|
||||
- }
|
||||
- return;
|
||||
- }
|
||||
- rssi = BEACON_RSSI(ah);
|
||||
- if (rssi > aniState->rssiThrLow) {
|
||||
- if (aniState->firstepLevel < HAL_FIRST_STEP_MAX)
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
- aniState->firstepLevel + 1);
|
||||
- } else {
|
||||
- if ((conf->channel->band == IEEE80211_BAND_2GHZ) &&
|
||||
- !conf_is_ht(conf)) {
|
||||
- if (aniState->firstepLevel > 0)
|
||||
- ath9k_hw_ani_control(ah,
|
||||
- ATH9K_ANI_FIRSTEP_LEVEL, 0);
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/* Adjust the OFDM Noise Immunity Level */
|
||||
static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel)
|
||||
{
|
||||
@@ -309,11 +195,6 @@ static void ath9k_hw_ani_ofdm_err_trigge
|
||||
if (!DO_ANI(ah))
|
||||
return;
|
||||
|
||||
- if (!use_new_ani(ah)) {
|
||||
- ath9k_hw_ani_ofdm_err_trigger_old(ah);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
aniState = &ah->curchan->ani;
|
||||
|
||||
if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL)
|
||||
@@ -371,70 +252,12 @@ static void ath9k_hw_ani_cck_err_trigger
|
||||
if (!DO_ANI(ah))
|
||||
return;
|
||||
|
||||
- if (!use_new_ani(ah)) {
|
||||
- ath9k_hw_ani_cck_err_trigger_old(ah);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
aniState = &ah->curchan->ani;
|
||||
|
||||
if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL)
|
||||
ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1);
|
||||
}
|
||||
|
||||
-static void ath9k_hw_ani_lower_immunity_old(struct ath_hw *ah)
|
||||
-{
|
||||
- struct ar5416AniState *aniState;
|
||||
- int32_t rssi;
|
||||
-
|
||||
- aniState = &ah->curchan->ani;
|
||||
-
|
||||
- if (ah->opmode != NL80211_IFTYPE_STATION) {
|
||||
- if (aniState->firstepLevel > 0) {
|
||||
- if (ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
- aniState->firstepLevel - 1))
|
||||
- return;
|
||||
- }
|
||||
- } else {
|
||||
- rssi = BEACON_RSSI(ah);
|
||||
- if (rssi > aniState->rssiThrHigh) {
|
||||
- /* XXX: Handle me */
|
||||
- } else if (rssi > aniState->rssiThrLow) {
|
||||
- if (!aniState->ofdmWeakSigDetect) {
|
||||
- if (ath9k_hw_ani_control(ah,
|
||||
- ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
- true))
|
||||
- return;
|
||||
- }
|
||||
- if (aniState->firstepLevel > 0) {
|
||||
- if (ath9k_hw_ani_control(ah,
|
||||
- ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
- aniState->firstepLevel - 1))
|
||||
- return;
|
||||
- }
|
||||
- } else {
|
||||
- if (aniState->firstepLevel > 0) {
|
||||
- if (ath9k_hw_ani_control(ah,
|
||||
- ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
- aniState->firstepLevel - 1))
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (aniState->spurImmunityLevel > 0) {
|
||||
- if (ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL,
|
||||
- aniState->spurImmunityLevel - 1))
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (aniState->noiseImmunityLevel > 0) {
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL,
|
||||
- aniState->noiseImmunityLevel - 1);
|
||||
- return;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/*
|
||||
* only lower either OFDM or CCK errors per turn
|
||||
* we lower the other one next time
|
||||
@@ -445,11 +268,6 @@ static void ath9k_hw_ani_lower_immunity(
|
||||
|
||||
aniState = &ah->curchan->ani;
|
||||
|
||||
- if (!use_new_ani(ah)) {
|
||||
- ath9k_hw_ani_lower_immunity_old(ah);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
/* lower OFDM noise immunity */
|
||||
if (aniState->ofdmNoiseImmunityLevel > 0 &&
|
||||
(aniState->ofdmsTurn || aniState->cckNoiseImmunityLevel == 0)) {
|
||||
@@ -462,71 +280,6 @@ static void ath9k_hw_ani_lower_immunity(
|
||||
ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel - 1);
|
||||
}
|
||||
|
||||
-static void ath9k_ani_reset_old(struct ath_hw *ah, bool is_scanning)
|
||||
-{
|
||||
- struct ar5416AniState *aniState;
|
||||
- struct ath9k_channel *chan = ah->curchan;
|
||||
- struct ath_common *common = ath9k_hw_common(ah);
|
||||
-
|
||||
- if (!DO_ANI(ah))
|
||||
- return;
|
||||
-
|
||||
- aniState = &ah->curchan->ani;
|
||||
-
|
||||
- if (ah->opmode != NL80211_IFTYPE_STATION) {
|
||||
- ath_dbg(common, ANI, "Reset ANI state opmode %u\n", ah->opmode);
|
||||
- ah->stats.ast_ani_reset++;
|
||||
-
|
||||
- if (ah->opmode == NL80211_IFTYPE_AP) {
|
||||
- /*
|
||||
- * ath9k_hw_ani_control() will only process items set on
|
||||
- * ah->ani_function
|
||||
- */
|
||||
- if (IS_CHAN_2GHZ(chan))
|
||||
- ah->ani_function = (ATH9K_ANI_SPUR_IMMUNITY_LEVEL |
|
||||
- ATH9K_ANI_FIRSTEP_LEVEL);
|
||||
- else
|
||||
- ah->ani_function = 0;
|
||||
- }
|
||||
-
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL, 0);
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0);
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0);
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
- !ATH9K_ANI_USE_OFDM_WEAK_SIG);
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR,
|
||||
- ATH9K_ANI_CCK_WEAK_SIG_THR);
|
||||
-
|
||||
- ath9k_ani_restart(ah);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (aniState->noiseImmunityLevel != 0)
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL,
|
||||
- aniState->noiseImmunityLevel);
|
||||
- if (aniState->spurImmunityLevel != 0)
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL,
|
||||
- aniState->spurImmunityLevel);
|
||||
- if (!aniState->ofdmWeakSigDetect)
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
- aniState->ofdmWeakSigDetect);
|
||||
- if (aniState->cckWeakSigThreshold)
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR,
|
||||
- aniState->cckWeakSigThreshold);
|
||||
- if (aniState->firstepLevel != 0)
|
||||
- ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
- aniState->firstepLevel);
|
||||
-
|
||||
- ath9k_ani_restart(ah);
|
||||
-
|
||||
- ENABLE_REGWRITE_BUFFER(ah);
|
||||
-
|
||||
- REG_WRITE(ah, AR_PHY_ERR_MASK_1, AR_PHY_ERR_OFDM_TIMING);
|
||||
- REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING);
|
||||
-
|
||||
- REGWRITE_BUFFER_FLUSH(ah);
|
||||
-}
|
||||
-
|
||||
/*
|
||||
* Restore the ANI parameters in the HAL and reset the statistics.
|
||||
* This routine should be called for every hardware reset and for
|
||||
@@ -541,9 +294,6 @@ void ath9k_ani_reset(struct ath_hw *ah,
|
||||
if (!DO_ANI(ah))
|
||||
return;
|
||||
|
||||
- if (!use_new_ani(ah))
|
||||
- return ath9k_ani_reset_old(ah, is_scanning);
|
||||
-
|
||||
BUG_ON(aniState == NULL);
|
||||
ah->stats.ast_ani_reset++;
|
||||
|
||||
@@ -640,11 +390,6 @@ static bool ath9k_hw_ani_read_counters(s
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (!use_new_ani(ah)) {
|
||||
- ofdm_base = AR_PHY_COUNTMAX - ah->config.ofdm_trig_high;
|
||||
- cck_base = AR_PHY_COUNTMAX - ah->config.cck_trig_high;
|
||||
- }
|
||||
-
|
||||
aniState->listenTime += listenTime;
|
||||
|
||||
ath9k_hw_update_mibstats(ah, &ah->ah_mibStats);
|
||||
@@ -652,26 +397,6 @@ static bool ath9k_hw_ani_read_counters(s
|
||||
phyCnt1 = REG_READ(ah, AR_PHY_ERR_1);
|
||||
phyCnt2 = REG_READ(ah, AR_PHY_ERR_2);
|
||||
|
||||
- if (!use_new_ani(ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) {
|
||||
- if (phyCnt1 < ofdm_base) {
|
||||
- ath_dbg(common, ANI,
|
||||
- "phyCnt1 0x%x, resetting counter value to 0x%x\n",
|
||||
- phyCnt1, ofdm_base);
|
||||
- REG_WRITE(ah, AR_PHY_ERR_1, ofdm_base);
|
||||
- REG_WRITE(ah, AR_PHY_ERR_MASK_1,
|
||||
- AR_PHY_ERR_OFDM_TIMING);
|
||||
- }
|
||||
- if (phyCnt2 < cck_base) {
|
||||
- ath_dbg(common, ANI,
|
||||
- "phyCnt2 0x%x, resetting counter value to 0x%x\n",
|
||||
- phyCnt2, cck_base);
|
||||
- REG_WRITE(ah, AR_PHY_ERR_2, cck_base);
|
||||
- REG_WRITE(ah, AR_PHY_ERR_MASK_2,
|
||||
- AR_PHY_ERR_CCK_TIMING);
|
||||
- }
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
ofdmPhyErrCnt = phyCnt1 - ofdm_base;
|
||||
ah->stats.ast_ani_ofdmerrs +=
|
||||
ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
|
||||
@@ -810,9 +535,6 @@ void ath9k_hw_proc_mib_event(struct ath_
|
||||
if (((phyCnt1 & AR_MIBCNT_INTRMASK) == AR_MIBCNT_INTRMASK) ||
|
||||
((phyCnt2 & AR_MIBCNT_INTRMASK) == AR_MIBCNT_INTRMASK)) {
|
||||
|
||||
- if (!use_new_ani(ah))
|
||||
- ath9k_hw_ani_read_counters(ah);
|
||||
-
|
||||
/* NB: always restart to insure the h/w counters are reset */
|
||||
ath9k_ani_restart(ah);
|
||||
}
|
||||
@@ -843,45 +565,28 @@ void ath9k_hw_ani_init(struct ath_hw *ah
|
||||
|
||||
ath_dbg(common, ANI, "Initialize ANI\n");
|
||||
|
||||
- if (use_new_ani(ah)) {
|
||||
- ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_NEW;
|
||||
- ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_NEW;
|
||||
+ ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_NEW;
|
||||
+ ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_NEW;
|
||||
|
||||
- ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH_NEW;
|
||||
- ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW_NEW;
|
||||
- } else {
|
||||
- ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_OLD;
|
||||
- ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_OLD;
|
||||
-
|
||||
- ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH_OLD;
|
||||
- ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW_OLD;
|
||||
- }
|
||||
+ ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH_NEW;
|
||||
+ ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW_NEW;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ah->channels); i++) {
|
||||
struct ath9k_channel *chan = &ah->channels[i];
|
||||
struct ar5416AniState *ani = &chan->ani;
|
||||
|
||||
- if (use_new_ani(ah)) {
|
||||
- ani->spurImmunityLevel =
|
||||
- ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
|
||||
+ ani->spurImmunityLevel =
|
||||
+ ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
|
||||
|
||||
- ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
|
||||
+ ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
|
||||
|
||||
- if (AR_SREV_9300_20_OR_LATER(ah))
|
||||
- ani->mrcCCKOff =
|
||||
- !ATH9K_ANI_ENABLE_MRC_CCK;
|
||||
- else
|
||||
- ani->mrcCCKOff = true;
|
||||
-
|
||||
- ani->ofdmsTurn = true;
|
||||
- } else {
|
||||
- ani->spurImmunityLevel =
|
||||
- ATH9K_ANI_SPUR_IMMUNE_LVL_OLD;
|
||||
- ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_OLD;
|
||||
+ if (AR_SREV_9300_20_OR_LATER(ah))
|
||||
+ ani->mrcCCKOff =
|
||||
+ !ATH9K_ANI_ENABLE_MRC_CCK;
|
||||
+ else
|
||||
+ ani->mrcCCKOff = true;
|
||||
|
||||
- ani->cckWeakSigThreshold =
|
||||
- ATH9K_ANI_CCK_WEAK_SIG_THR;
|
||||
- }
|
||||
+ ani->ofdmsTurn = true;
|
||||
|
||||
ani->rssiThrHigh = ATH9K_ANI_RSSI_THR_HIGH;
|
||||
ani->rssiThrLow = ATH9K_ANI_RSSI_THR_LOW;
|
||||
@@ -895,13 +600,8 @@ void ath9k_hw_ani_init(struct ath_hw *ah
|
||||
* since we expect some ongoing maintenance on the tables, let's sanity
|
||||
* check here default level should not modify INI setting.
|
||||
*/
|
||||
- if (use_new_ani(ah)) {
|
||||
- ah->aniperiod = ATH9K_ANI_PERIOD_NEW;
|
||||
- ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_NEW;
|
||||
- } else {
|
||||
- ah->aniperiod = ATH9K_ANI_PERIOD_OLD;
|
||||
- ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_OLD;
|
||||
- }
|
||||
+ ah->aniperiod = ATH9K_ANI_PERIOD_NEW;
|
||||
+ ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_NEW;
|
||||
|
||||
if (ah->config.enable_ani)
|
||||
ah->proc_phyerr |= HAL_PROCESS_ANI;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
@@ -995,141 +995,6 @@ static u32 ar5008_hw_compute_pll_control
|
||||
return pll;
|
||||
}
|
||||
|
||||
-static bool ar5008_hw_ani_control_old(struct ath_hw *ah,
|
||||
- enum ath9k_ani_cmd cmd,
|
||||
- int param)
|
||||
-{
|
||||
- struct ar5416AniState *aniState = &ah->curchan->ani;
|
||||
- struct ath_common *common = ath9k_hw_common(ah);
|
||||
-
|
||||
- switch (cmd & ah->ani_function) {
|
||||
- case ATH9K_ANI_NOISE_IMMUNITY_LEVEL:{
|
||||
- u32 level = param;
|
||||
-
|
||||
- if (level >= ARRAY_SIZE(ah->totalSizeDesired)) {
|
||||
- ath_dbg(common, ANI, "level out of range (%u > %zu)\n",
|
||||
- level, ARRAY_SIZE(ah->totalSizeDesired));
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- REG_RMW_FIELD(ah, AR_PHY_DESIRED_SZ,
|
||||
- AR_PHY_DESIRED_SZ_TOT_DES,
|
||||
- ah->totalSizeDesired[level]);
|
||||
- REG_RMW_FIELD(ah, AR_PHY_AGC_CTL1,
|
||||
- AR_PHY_AGC_CTL1_COARSE_LOW,
|
||||
- ah->coarse_low[level]);
|
||||
- REG_RMW_FIELD(ah, AR_PHY_AGC_CTL1,
|
||||
- AR_PHY_AGC_CTL1_COARSE_HIGH,
|
||||
- ah->coarse_high[level]);
|
||||
- REG_RMW_FIELD(ah, AR_PHY_FIND_SIG,
|
||||
- AR_PHY_FIND_SIG_FIRPWR,
|
||||
- ah->firpwr[level]);
|
||||
-
|
||||
- if (level > aniState->noiseImmunityLevel)
|
||||
- ah->stats.ast_ani_niup++;
|
||||
- else if (level < aniState->noiseImmunityLevel)
|
||||
- ah->stats.ast_ani_nidown++;
|
||||
- aniState->noiseImmunityLevel = level;
|
||||
- break;
|
||||
- }
|
||||
- case ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION:{
|
||||
- u32 on = param ? 1 : 0;
|
||||
-
|
||||
- if (on)
|
||||
- REG_SET_BIT(ah, AR_PHY_SFCORR_LOW,
|
||||
- AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
|
||||
- else
|
||||
- REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
|
||||
- AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
|
||||
-
|
||||
- if (on != aniState->ofdmWeakSigDetect) {
|
||||
- if (on)
|
||||
- ah->stats.ast_ani_ofdmon++;
|
||||
- else
|
||||
- ah->stats.ast_ani_ofdmoff++;
|
||||
- aniState->ofdmWeakSigDetect = on;
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- case ATH9K_ANI_CCK_WEAK_SIGNAL_THR:{
|
||||
- static const int weakSigThrCck[] = { 8, 6 };
|
||||
- u32 high = param ? 1 : 0;
|
||||
-
|
||||
- REG_RMW_FIELD(ah, AR_PHY_CCK_DETECT,
|
||||
- AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK,
|
||||
- weakSigThrCck[high]);
|
||||
- if (high != aniState->cckWeakSigThreshold) {
|
||||
- if (high)
|
||||
- ah->stats.ast_ani_cckhigh++;
|
||||
- else
|
||||
- ah->stats.ast_ani_ccklow++;
|
||||
- aniState->cckWeakSigThreshold = high;
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- case ATH9K_ANI_FIRSTEP_LEVEL:{
|
||||
- static const int firstep[] = { 0, 4, 8 };
|
||||
- u32 level = param;
|
||||
-
|
||||
- if (level >= ARRAY_SIZE(firstep)) {
|
||||
- ath_dbg(common, ANI, "level out of range (%u > %zu)\n",
|
||||
- level, ARRAY_SIZE(firstep));
|
||||
- return false;
|
||||
- }
|
||||
- REG_RMW_FIELD(ah, AR_PHY_FIND_SIG,
|
||||
- AR_PHY_FIND_SIG_FIRSTEP,
|
||||
- firstep[level]);
|
||||
- if (level > aniState->firstepLevel)
|
||||
- ah->stats.ast_ani_stepup++;
|
||||
- else if (level < aniState->firstepLevel)
|
||||
- ah->stats.ast_ani_stepdown++;
|
||||
- aniState->firstepLevel = level;
|
||||
- break;
|
||||
- }
|
||||
- case ATH9K_ANI_SPUR_IMMUNITY_LEVEL:{
|
||||
- static const int cycpwrThr1[] = { 2, 4, 6, 8, 10, 12, 14, 16 };
|
||||
- u32 level = param;
|
||||
-
|
||||
- if (level >= ARRAY_SIZE(cycpwrThr1)) {
|
||||
- ath_dbg(common, ANI, "level out of range (%u > %zu)\n",
|
||||
- level, ARRAY_SIZE(cycpwrThr1));
|
||||
- return false;
|
||||
- }
|
||||
- REG_RMW_FIELD(ah, AR_PHY_TIMING5,
|
||||
- AR_PHY_TIMING5_CYCPWR_THR1,
|
||||
- cycpwrThr1[level]);
|
||||
- if (level > aniState->spurImmunityLevel)
|
||||
- ah->stats.ast_ani_spurup++;
|
||||
- else if (level < aniState->spurImmunityLevel)
|
||||
- ah->stats.ast_ani_spurdown++;
|
||||
- aniState->spurImmunityLevel = level;
|
||||
- break;
|
||||
- }
|
||||
- case ATH9K_ANI_PRESENT:
|
||||
- break;
|
||||
- default:
|
||||
- ath_dbg(common, ANI, "invalid cmd %u\n", cmd);
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- ath_dbg(common, ANI, "ANI parameters:\n");
|
||||
- ath_dbg(common, ANI,
|
||||
- "noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetect=%d\n",
|
||||
- aniState->noiseImmunityLevel,
|
||||
- aniState->spurImmunityLevel,
|
||||
- aniState->ofdmWeakSigDetect);
|
||||
- ath_dbg(common, ANI,
|
||||
- "cckWeakSigThreshold=%d, firstepLevel=%d, listenTime=%d\n",
|
||||
- aniState->cckWeakSigThreshold,
|
||||
- aniState->firstepLevel,
|
||||
- aniState->listenTime);
|
||||
- ath_dbg(common, ANI, "ofdmPhyErrCount=%d, cckPhyErrCount=%d\n\n",
|
||||
- aniState->ofdmPhyErrCount,
|
||||
- aniState->cckPhyErrCount);
|
||||
-
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
|
||||
enum ath9k_ani_cmd cmd,
|
||||
int param)
|
||||
@@ -1545,11 +1410,8 @@ void ar5008_hw_attach_phy_ops(struct ath
|
||||
priv_ops->do_getnf = ar5008_hw_do_getnf;
|
||||
priv_ops->set_radar_params = ar5008_hw_set_radar_params;
|
||||
|
||||
- if (modparam_force_new_ani) {
|
||||
- priv_ops->ani_control = ar5008_hw_ani_control_new;
|
||||
- priv_ops->ani_cache_ini_regs = ar5008_hw_ani_cache_ini_regs;
|
||||
- } else
|
||||
- priv_ops->ani_control = ar5008_hw_ani_control_old;
|
||||
+ priv_ops->ani_control = ar5008_hw_ani_control_new;
|
||||
+ priv_ops->ani_cache_ini_regs = ar5008_hw_ani_cache_ini_regs;
|
||||
|
||||
if (AR_SREV_9100(ah) || AR_SREV_9160_10_OR_LATER(ah))
|
||||
priv_ops->compute_pll_control = ar9160_hw_compute_pll_control;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
|
||||
@@ -21,10 +21,6 @@
|
||||
#include "ar9002_initvals.h"
|
||||
#include "ar9002_phy.h"
|
||||
|
||||
-int modparam_force_new_ani;
|
||||
-module_param_named(force_new_ani, modparam_force_new_ani, int, 0444);
|
||||
-MODULE_PARM_DESC(force_new_ani, "Force new ANI for AR5008, AR9001, AR9002");
|
||||
-
|
||||
/* General hardware code for the A5008/AR9001/AR9002 hadware families */
|
||||
|
||||
static void ar9002_hw_init_mode_regs(struct ath_hw *ah)
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -1021,14 +1021,7 @@ void ar9002_hw_attach_ops(struct ath_hw
|
||||
void ar9003_hw_attach_ops(struct ath_hw *ah);
|
||||
|
||||
void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
-/*
|
||||
- * ANI work can be shared between all families but a next
|
||||
- * generation implementation of ANI will be used only for AR9003 only
|
||||
- * for now as the other families still need to be tested with the same
|
||||
- * next generation ANI. Feel free to start testing it though for the
|
||||
- * older families (AR5008, AR9001, AR9002) by using modparam_force_new_ani.
|
||||
- */
|
||||
-extern int modparam_force_new_ani;
|
||||
+
|
||||
void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning);
|
||||
void ath9k_hw_proc_mib_event(struct ath_hw *ah);
|
||||
void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan);
|
|
@ -1,320 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -117,8 +117,6 @@ static void ath9k_hw_update_mibstats(str
|
||||
static void ath9k_ani_restart(struct ath_hw *ah)
|
||||
{
|
||||
struct ar5416AniState *aniState;
|
||||
- struct ath_common *common = ath9k_hw_common(ah);
|
||||
- u32 ofdm_base = 0, cck_base = 0;
|
||||
|
||||
if (!DO_ANI(ah))
|
||||
return;
|
||||
@@ -126,13 +124,10 @@ static void ath9k_ani_restart(struct ath
|
||||
aniState = &ah->curchan->ani;
|
||||
aniState->listenTime = 0;
|
||||
|
||||
- ath_dbg(common, ANI, "Writing ofdmbase=%u cckbase=%u\n",
|
||||
- ofdm_base, cck_base);
|
||||
-
|
||||
ENABLE_REGWRITE_BUFFER(ah);
|
||||
|
||||
- REG_WRITE(ah, AR_PHY_ERR_1, ofdm_base);
|
||||
- REG_WRITE(ah, AR_PHY_ERR_2, cck_base);
|
||||
+ REG_WRITE(ah, AR_PHY_ERR_1, 0);
|
||||
+ REG_WRITE(ah, AR_PHY_ERR_2, 0);
|
||||
REG_WRITE(ah, AR_PHY_ERR_MASK_1, AR_PHY_ERR_OFDM_TIMING);
|
||||
REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING);
|
||||
|
||||
@@ -375,9 +370,6 @@ static bool ath9k_hw_ani_read_counters(s
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ar5416AniState *aniState = &ah->curchan->ani;
|
||||
- u32 ofdm_base = 0;
|
||||
- u32 cck_base = 0;
|
||||
- u32 ofdmPhyErrCnt, cckPhyErrCnt;
|
||||
u32 phyCnt1, phyCnt2;
|
||||
int32_t listenTime;
|
||||
|
||||
@@ -397,15 +389,12 @@ static bool ath9k_hw_ani_read_counters(s
|
||||
phyCnt1 = REG_READ(ah, AR_PHY_ERR_1);
|
||||
phyCnt2 = REG_READ(ah, AR_PHY_ERR_2);
|
||||
|
||||
- ofdmPhyErrCnt = phyCnt1 - ofdm_base;
|
||||
- ah->stats.ast_ani_ofdmerrs +=
|
||||
- ofdmPhyErrCnt - aniState->ofdmPhyErrCount;
|
||||
- aniState->ofdmPhyErrCount = ofdmPhyErrCnt;
|
||||
-
|
||||
- cckPhyErrCnt = phyCnt2 - cck_base;
|
||||
- ah->stats.ast_ani_cckerrs +=
|
||||
- cckPhyErrCnt - aniState->cckPhyErrCount;
|
||||
- aniState->cckPhyErrCount = cckPhyErrCnt;
|
||||
+ ah->stats.ast_ani_ofdmerrs += phyCnt1 - aniState->ofdmPhyErrCount;
|
||||
+ aniState->ofdmPhyErrCount = phyCnt1;
|
||||
+
|
||||
+ ah->stats.ast_ani_cckerrs += phyCnt2 - aniState->cckPhyErrCount;
|
||||
+ aniState->cckPhyErrCount = phyCnt2;
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -565,20 +554,19 @@ void ath9k_hw_ani_init(struct ath_hw *ah
|
||||
|
||||
ath_dbg(common, ANI, "Initialize ANI\n");
|
||||
|
||||
- ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_NEW;
|
||||
- ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_NEW;
|
||||
+ ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;
|
||||
+ ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW;
|
||||
|
||||
- ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH_NEW;
|
||||
- ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW_NEW;
|
||||
+ ah->config.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH;
|
||||
+ ah->config.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ah->channels); i++) {
|
||||
struct ath9k_channel *chan = &ah->channels[i];
|
||||
struct ar5416AniState *ani = &chan->ani;
|
||||
|
||||
- ani->spurImmunityLevel =
|
||||
- ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
|
||||
+ ani->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL;
|
||||
|
||||
- ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
|
||||
+ ani->firstepLevel = ATH9K_ANI_FIRSTEP_LVL;
|
||||
|
||||
if (AR_SREV_9300_20_OR_LATER(ah))
|
||||
ani->mrcCCKOff =
|
||||
@@ -600,8 +588,8 @@ void ath9k_hw_ani_init(struct ath_hw *ah
|
||||
* since we expect some ongoing maintenance on the tables, let's sanity
|
||||
* check here default level should not modify INI setting.
|
||||
*/
|
||||
- ah->aniperiod = ATH9K_ANI_PERIOD_NEW;
|
||||
- ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_NEW;
|
||||
+ ah->aniperiod = ATH9K_ANI_PERIOD;
|
||||
+ ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL;
|
||||
|
||||
if (ah->config.enable_ani)
|
||||
ah->proc_phyerr |= HAL_PROCESS_ANI;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ani.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.h
|
||||
@@ -24,42 +24,34 @@
|
||||
#define BEACON_RSSI(ahp) (ahp->stats.avgbrssi)
|
||||
|
||||
/* units are errors per second */
|
||||
-#define ATH9K_ANI_OFDM_TRIG_HIGH_OLD 500
|
||||
-#define ATH9K_ANI_OFDM_TRIG_HIGH_NEW 3500
|
||||
+#define ATH9K_ANI_OFDM_TRIG_HIGH 3500
|
||||
#define ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI 1000
|
||||
|
||||
/* units are errors per second */
|
||||
-#define ATH9K_ANI_OFDM_TRIG_LOW_OLD 200
|
||||
-#define ATH9K_ANI_OFDM_TRIG_LOW_NEW 400
|
||||
+#define ATH9K_ANI_OFDM_TRIG_LOW 400
|
||||
#define ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI 900
|
||||
|
||||
/* units are errors per second */
|
||||
-#define ATH9K_ANI_CCK_TRIG_HIGH_OLD 200
|
||||
-#define ATH9K_ANI_CCK_TRIG_HIGH_NEW 600
|
||||
+#define ATH9K_ANI_CCK_TRIG_HIGH 600
|
||||
|
||||
/* units are errors per second */
|
||||
-#define ATH9K_ANI_CCK_TRIG_LOW_OLD 100
|
||||
-#define ATH9K_ANI_CCK_TRIG_LOW_NEW 300
|
||||
+#define ATH9K_ANI_CCK_TRIG_LOW 300
|
||||
|
||||
#define ATH9K_ANI_NOISE_IMMUNE_LVL 4
|
||||
#define ATH9K_ANI_USE_OFDM_WEAK_SIG true
|
||||
#define ATH9K_ANI_CCK_WEAK_SIG_THR false
|
||||
|
||||
-#define ATH9K_ANI_SPUR_IMMUNE_LVL_OLD 7
|
||||
-#define ATH9K_ANI_SPUR_IMMUNE_LVL_NEW 3
|
||||
+#define ATH9K_ANI_SPUR_IMMUNE_LVL 3
|
||||
|
||||
-#define ATH9K_ANI_FIRSTEP_LVL_OLD 0
|
||||
-#define ATH9K_ANI_FIRSTEP_LVL_NEW 2
|
||||
+#define ATH9K_ANI_FIRSTEP_LVL 2
|
||||
|
||||
#define ATH9K_ANI_RSSI_THR_HIGH 40
|
||||
#define ATH9K_ANI_RSSI_THR_LOW 7
|
||||
|
||||
-#define ATH9K_ANI_PERIOD_OLD 100
|
||||
-#define ATH9K_ANI_PERIOD_NEW 300
|
||||
+#define ATH9K_ANI_PERIOD 300
|
||||
|
||||
/* in ms */
|
||||
-#define ATH9K_ANI_POLLINTERVAL_OLD 100
|
||||
-#define ATH9K_ANI_POLLINTERVAL_NEW 1000
|
||||
+#define ATH9K_ANI_POLLINTERVAL 1000
|
||||
|
||||
#define HAL_NOISE_IMMUNE_MAX 4
|
||||
#define HAL_SPUR_IMMUNE_MAX 7
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
@@ -1101,7 +1101,7 @@ static bool ar5008_hw_ani_control_new(st
|
||||
* from INI file & cap value
|
||||
*/
|
||||
value = firstep_table[level] -
|
||||
- firstep_table[ATH9K_ANI_FIRSTEP_LVL_NEW] +
|
||||
+ firstep_table[ATH9K_ANI_FIRSTEP_LVL] +
|
||||
aniState->iniDef.firstep;
|
||||
if (value < ATH9K_SIG_FIRSTEP_SETTING_MIN)
|
||||
value = ATH9K_SIG_FIRSTEP_SETTING_MIN;
|
||||
@@ -1116,7 +1116,7 @@ static bool ar5008_hw_ani_control_new(st
|
||||
* from INI file & cap value
|
||||
*/
|
||||
value2 = firstep_table[level] -
|
||||
- firstep_table[ATH9K_ANI_FIRSTEP_LVL_NEW] +
|
||||
+ firstep_table[ATH9K_ANI_FIRSTEP_LVL] +
|
||||
aniState->iniDef.firstepLow;
|
||||
if (value2 < ATH9K_SIG_FIRSTEP_SETTING_MIN)
|
||||
value2 = ATH9K_SIG_FIRSTEP_SETTING_MIN;
|
||||
@@ -1132,7 +1132,7 @@ static bool ar5008_hw_ani_control_new(st
|
||||
chan->channel,
|
||||
aniState->firstepLevel,
|
||||
level,
|
||||
- ATH9K_ANI_FIRSTEP_LVL_NEW,
|
||||
+ ATH9K_ANI_FIRSTEP_LVL,
|
||||
value,
|
||||
aniState->iniDef.firstep);
|
||||
ath_dbg(common, ANI,
|
||||
@@ -1140,7 +1140,7 @@ static bool ar5008_hw_ani_control_new(st
|
||||
chan->channel,
|
||||
aniState->firstepLevel,
|
||||
level,
|
||||
- ATH9K_ANI_FIRSTEP_LVL_NEW,
|
||||
+ ATH9K_ANI_FIRSTEP_LVL,
|
||||
value2,
|
||||
aniState->iniDef.firstepLow);
|
||||
if (level > aniState->firstepLevel)
|
||||
@@ -1165,7 +1165,7 @@ static bool ar5008_hw_ani_control_new(st
|
||||
* from INI file & cap value
|
||||
*/
|
||||
value = cycpwrThr1_table[level] -
|
||||
- cycpwrThr1_table[ATH9K_ANI_SPUR_IMMUNE_LVL_NEW] +
|
||||
+ cycpwrThr1_table[ATH9K_ANI_SPUR_IMMUNE_LVL] +
|
||||
aniState->iniDef.cycpwrThr1;
|
||||
if (value < ATH9K_SIG_SPUR_IMM_SETTING_MIN)
|
||||
value = ATH9K_SIG_SPUR_IMM_SETTING_MIN;
|
||||
@@ -1181,7 +1181,7 @@ static bool ar5008_hw_ani_control_new(st
|
||||
* from INI file & cap value
|
||||
*/
|
||||
value2 = cycpwrThr1_table[level] -
|
||||
- cycpwrThr1_table[ATH9K_ANI_SPUR_IMMUNE_LVL_NEW] +
|
||||
+ cycpwrThr1_table[ATH9K_ANI_SPUR_IMMUNE_LVL] +
|
||||
aniState->iniDef.cycpwrThr1Ext;
|
||||
if (value2 < ATH9K_SIG_SPUR_IMM_SETTING_MIN)
|
||||
value2 = ATH9K_SIG_SPUR_IMM_SETTING_MIN;
|
||||
@@ -1196,7 +1196,7 @@ static bool ar5008_hw_ani_control_new(st
|
||||
chan->channel,
|
||||
aniState->spurImmunityLevel,
|
||||
level,
|
||||
- ATH9K_ANI_SPUR_IMMUNE_LVL_NEW,
|
||||
+ ATH9K_ANI_SPUR_IMMUNE_LVL,
|
||||
value,
|
||||
aniState->iniDef.cycpwrThr1);
|
||||
ath_dbg(common, ANI,
|
||||
@@ -1204,7 +1204,7 @@ static bool ar5008_hw_ani_control_new(st
|
||||
chan->channel,
|
||||
aniState->spurImmunityLevel,
|
||||
level,
|
||||
- ATH9K_ANI_SPUR_IMMUNE_LVL_NEW,
|
||||
+ ATH9K_ANI_SPUR_IMMUNE_LVL,
|
||||
value2,
|
||||
aniState->iniDef.cycpwrThr1Ext);
|
||||
if (level > aniState->spurImmunityLevel)
|
||||
@@ -1319,8 +1319,8 @@ static void ar5008_hw_ani_cache_ini_regs
|
||||
AR_PHY_EXT_TIMING5_CYCPWR_THR1);
|
||||
|
||||
/* these levels just got reset to defaults by the INI */
|
||||
- aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
|
||||
- aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
|
||||
+ aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL;
|
||||
+ aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL;
|
||||
aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
aniState->mrcCCKOff = true; /* not available on pre AR9003 */
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -851,7 +851,7 @@ static bool ar9003_hw_ani_control(struct
|
||||
* from INI file & cap value
|
||||
*/
|
||||
value = firstep_table[level] -
|
||||
- firstep_table[ATH9K_ANI_FIRSTEP_LVL_NEW] +
|
||||
+ firstep_table[ATH9K_ANI_FIRSTEP_LVL] +
|
||||
aniState->iniDef.firstep;
|
||||
if (value < ATH9K_SIG_FIRSTEP_SETTING_MIN)
|
||||
value = ATH9K_SIG_FIRSTEP_SETTING_MIN;
|
||||
@@ -866,7 +866,7 @@ static bool ar9003_hw_ani_control(struct
|
||||
* from INI file & cap value
|
||||
*/
|
||||
value2 = firstep_table[level] -
|
||||
- firstep_table[ATH9K_ANI_FIRSTEP_LVL_NEW] +
|
||||
+ firstep_table[ATH9K_ANI_FIRSTEP_LVL] +
|
||||
aniState->iniDef.firstepLow;
|
||||
if (value2 < ATH9K_SIG_FIRSTEP_SETTING_MIN)
|
||||
value2 = ATH9K_SIG_FIRSTEP_SETTING_MIN;
|
||||
@@ -882,7 +882,7 @@ static bool ar9003_hw_ani_control(struct
|
||||
chan->channel,
|
||||
aniState->firstepLevel,
|
||||
level,
|
||||
- ATH9K_ANI_FIRSTEP_LVL_NEW,
|
||||
+ ATH9K_ANI_FIRSTEP_LVL,
|
||||
value,
|
||||
aniState->iniDef.firstep);
|
||||
ath_dbg(common, ANI,
|
||||
@@ -890,7 +890,7 @@ static bool ar9003_hw_ani_control(struct
|
||||
chan->channel,
|
||||
aniState->firstepLevel,
|
||||
level,
|
||||
- ATH9K_ANI_FIRSTEP_LVL_NEW,
|
||||
+ ATH9K_ANI_FIRSTEP_LVL,
|
||||
value2,
|
||||
aniState->iniDef.firstepLow);
|
||||
if (level > aniState->firstepLevel)
|
||||
@@ -915,7 +915,7 @@ static bool ar9003_hw_ani_control(struct
|
||||
* from INI file & cap value
|
||||
*/
|
||||
value = cycpwrThr1_table[level] -
|
||||
- cycpwrThr1_table[ATH9K_ANI_SPUR_IMMUNE_LVL_NEW] +
|
||||
+ cycpwrThr1_table[ATH9K_ANI_SPUR_IMMUNE_LVL] +
|
||||
aniState->iniDef.cycpwrThr1;
|
||||
if (value < ATH9K_SIG_SPUR_IMM_SETTING_MIN)
|
||||
value = ATH9K_SIG_SPUR_IMM_SETTING_MIN;
|
||||
@@ -931,7 +931,7 @@ static bool ar9003_hw_ani_control(struct
|
||||
* from INI file & cap value
|
||||
*/
|
||||
value2 = cycpwrThr1_table[level] -
|
||||
- cycpwrThr1_table[ATH9K_ANI_SPUR_IMMUNE_LVL_NEW] +
|
||||
+ cycpwrThr1_table[ATH9K_ANI_SPUR_IMMUNE_LVL] +
|
||||
aniState->iniDef.cycpwrThr1Ext;
|
||||
if (value2 < ATH9K_SIG_SPUR_IMM_SETTING_MIN)
|
||||
value2 = ATH9K_SIG_SPUR_IMM_SETTING_MIN;
|
||||
@@ -946,7 +946,7 @@ static bool ar9003_hw_ani_control(struct
|
||||
chan->channel,
|
||||
aniState->spurImmunityLevel,
|
||||
level,
|
||||
- ATH9K_ANI_SPUR_IMMUNE_LVL_NEW,
|
||||
+ ATH9K_ANI_SPUR_IMMUNE_LVL,
|
||||
value,
|
||||
aniState->iniDef.cycpwrThr1);
|
||||
ath_dbg(common, ANI,
|
||||
@@ -954,7 +954,7 @@ static bool ar9003_hw_ani_control(struct
|
||||
chan->channel,
|
||||
aniState->spurImmunityLevel,
|
||||
level,
|
||||
- ATH9K_ANI_SPUR_IMMUNE_LVL_NEW,
|
||||
+ ATH9K_ANI_SPUR_IMMUNE_LVL,
|
||||
value2,
|
||||
aniState->iniDef.cycpwrThr1Ext);
|
||||
if (level > aniState->spurImmunityLevel)
|
||||
@@ -1107,8 +1107,8 @@ static void ar9003_hw_ani_cache_ini_regs
|
||||
AR_PHY_EXT_CYCPWR_THR1);
|
||||
|
||||
/* these levels just got reset to defaults by the INI */
|
||||
- aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
|
||||
- aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
|
||||
+ aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL;
|
||||
+ aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL;
|
||||
aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
aniState->mrcCCKOff = !ATH9K_ANI_ENABLE_MRC_CCK;
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -490,46 +490,6 @@ void ath9k_hw_disable_mib_counters(struc
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_disable_mib_counters);
|
||||
|
||||
-/*
|
||||
- * Process a MIB interrupt. We may potentially be invoked because
|
||||
- * any of the MIB counters overflow/trigger so don't assume we're
|
||||
- * here because a PHY error counter triggered.
|
||||
- */
|
||||
-void ath9k_hw_proc_mib_event(struct ath_hw *ah)
|
||||
-{
|
||||
- u32 phyCnt1, phyCnt2;
|
||||
-
|
||||
- /* Reset these counters regardless */
|
||||
- REG_WRITE(ah, AR_FILT_OFDM, 0);
|
||||
- REG_WRITE(ah, AR_FILT_CCK, 0);
|
||||
- if (!(REG_READ(ah, AR_SLP_MIB_CTRL) & AR_SLP_MIB_PENDING))
|
||||
- REG_WRITE(ah, AR_SLP_MIB_CTRL, AR_SLP_MIB_CLEAR);
|
||||
-
|
||||
- /* Clear the mib counters and save them in the stats */
|
||||
- ath9k_hw_update_mibstats(ah, &ah->ah_mibStats);
|
||||
-
|
||||
- if (!DO_ANI(ah)) {
|
||||
- /*
|
||||
- * We must always clear the interrupt cause by
|
||||
- * resetting the phy error regs.
|
||||
- */
|
||||
- REG_WRITE(ah, AR_PHY_ERR_1, 0);
|
||||
- REG_WRITE(ah, AR_PHY_ERR_2, 0);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- /* NB: these are not reset-on-read */
|
||||
- phyCnt1 = REG_READ(ah, AR_PHY_ERR_1);
|
||||
- phyCnt2 = REG_READ(ah, AR_PHY_ERR_2);
|
||||
- if (((phyCnt1 & AR_MIBCNT_INTRMASK) == AR_MIBCNT_INTRMASK) ||
|
||||
- ((phyCnt2 & AR_MIBCNT_INTRMASK) == AR_MIBCNT_INTRMASK)) {
|
||||
-
|
||||
- /* NB: always restart to insure the h/w counters are reset */
|
||||
- ath9k_ani_restart(ah);
|
||||
- }
|
||||
-}
|
||||
-EXPORT_SYMBOL(ath9k_hw_proc_mib_event);
|
||||
-
|
||||
void ath9k_hw_ani_setup(struct ath_hw *ah)
|
||||
{
|
||||
int i;
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -1023,7 +1023,6 @@ void ar9003_hw_attach_ops(struct ath_hw
|
||||
void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
|
||||
void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning);
|
||||
-void ath9k_hw_proc_mib_event(struct ath_hw *ah);
|
||||
void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
|
||||
#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -827,24 +827,6 @@ irqreturn_t ath_isr(int irq, void *dev)
|
||||
ath9k_hw_set_interrupts(ah);
|
||||
}
|
||||
|
||||
- if (status & ATH9K_INT_MIB) {
|
||||
- /*
|
||||
- * Disable interrupts until we service the MIB
|
||||
- * interrupt; otherwise it will continue to
|
||||
- * fire.
|
||||
- */
|
||||
- ath9k_hw_disable_interrupts(ah);
|
||||
- /*
|
||||
- * Let the hal handle the event. We assume
|
||||
- * it will clear whatever condition caused
|
||||
- * the interrupt.
|
||||
- */
|
||||
- spin_lock(&common->cc_lock);
|
||||
- ath9k_hw_proc_mib_event(ah);
|
||||
- spin_unlock(&common->cc_lock);
|
||||
- ath9k_hw_enable_interrupts(ah);
|
||||
- }
|
||||
-
|
||||
if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
|
||||
if (status & ATH9K_INT_TIM_TIMER) {
|
||||
if (ATH_DBG_WARN_ON_ONCE(sc->ps_idle))
|
||||
@@ -1347,14 +1329,10 @@ static void ath9k_calculate_summary_stat
|
||||
/*
|
||||
* Enable MIB interrupts when there are hardware phy counters.
|
||||
*/
|
||||
- if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) {
|
||||
- if (ah->config.enable_ani)
|
||||
- ah->imask |= ATH9K_INT_MIB;
|
||||
+ if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0)
|
||||
ah->imask |= ATH9K_INT_TSFOOR;
|
||||
- } else {
|
||||
- ah->imask &= ~ATH9K_INT_MIB;
|
||||
+ else
|
||||
ah->imask &= ~ATH9K_INT_TSFOOR;
|
||||
- }
|
||||
|
||||
ath9k_hw_set_interrupts(ah);
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -348,8 +348,6 @@ void ath_debug_stat_interrupt(struct ath
|
||||
sc->debug.stats.istats.txok++;
|
||||
if (status & ATH9K_INT_TXURN)
|
||||
sc->debug.stats.istats.txurn++;
|
||||
- if (status & ATH9K_INT_MIB)
|
||||
- sc->debug.stats.istats.mib++;
|
||||
if (status & ATH9K_INT_RXPHY)
|
||||
sc->debug.stats.istats.rxphyerr++;
|
||||
if (status & ATH9K_INT_RXKCM)
|
|
@ -1,69 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -154,9 +154,7 @@ static void ath9k_hw_set_ofdm_nil(struct
|
||||
aniState->rssiThrLow, aniState->rssiThrHigh);
|
||||
|
||||
if (aniState->update_ani)
|
||||
- aniState->ofdmNoiseImmunityLevel =
|
||||
- (immunityLevel > ATH9K_ANI_OFDM_DEF_LEVEL) ?
|
||||
- immunityLevel : ATH9K_ANI_OFDM_DEF_LEVEL;
|
||||
+ aniState->ofdmNoiseImmunityLevel = immunityLevel;
|
||||
|
||||
entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
|
||||
entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel];
|
||||
@@ -217,9 +215,7 @@ static void ath9k_hw_set_cck_nil(struct
|
||||
immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;
|
||||
|
||||
if (aniState->update_ani)
|
||||
- aniState->cckNoiseImmunityLevel =
|
||||
- (immunityLevel > ATH9K_ANI_CCK_DEF_LEVEL) ?
|
||||
- immunityLevel : ATH9K_ANI_CCK_DEF_LEVEL;
|
||||
+ aniState->cckNoiseImmunityLevel = immunityLevel;
|
||||
|
||||
entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
|
||||
entry_cck = &cck_level_table[aniState->cckNoiseImmunityLevel];
|
||||
@@ -285,6 +281,7 @@ void ath9k_ani_reset(struct ath_hw *ah,
|
||||
struct ar5416AniState *aniState = &ah->curchan->ani;
|
||||
struct ath9k_channel *chan = ah->curchan;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ int ofdm_nil, cck_nil;
|
||||
|
||||
if (!DO_ANI(ah))
|
||||
return;
|
||||
@@ -306,6 +303,11 @@ void ath9k_ani_reset(struct ath_hw *ah,
|
||||
/* always allow mode (on/off) to be controlled */
|
||||
ah->ani_function |= ATH9K_ANI_MODE;
|
||||
|
||||
+ ofdm_nil = max_t(int, ATH9K_ANI_OFDM_DEF_LEVEL,
|
||||
+ aniState->ofdmNoiseImmunityLevel);
|
||||
+ cck_nil = max_t(int, ATH9K_ANI_CCK_DEF_LEVEL,
|
||||
+ aniState->cckNoiseImmunityLevel);
|
||||
+
|
||||
if (is_scanning ||
|
||||
(ah->opmode != NL80211_IFTYPE_STATION &&
|
||||
ah->opmode != NL80211_IFTYPE_ADHOC)) {
|
||||
@@ -329,8 +331,8 @@ void ath9k_ani_reset(struct ath_hw *ah,
|
||||
aniState->cckNoiseImmunityLevel);
|
||||
|
||||
aniState->update_ani = false;
|
||||
- ath9k_hw_set_ofdm_nil(ah, ATH9K_ANI_OFDM_DEF_LEVEL);
|
||||
- ath9k_hw_set_cck_nil(ah, ATH9K_ANI_CCK_DEF_LEVEL);
|
||||
+ ofdm_nil = ATH9K_ANI_OFDM_DEF_LEVEL;
|
||||
+ cck_nil = ATH9K_ANI_CCK_DEF_LEVEL;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
@@ -346,11 +348,9 @@ void ath9k_ani_reset(struct ath_hw *ah,
|
||||
aniState->cckNoiseImmunityLevel);
|
||||
|
||||
aniState->update_ani = true;
|
||||
- ath9k_hw_set_ofdm_nil(ah,
|
||||
- aniState->ofdmNoiseImmunityLevel);
|
||||
- ath9k_hw_set_cck_nil(ah,
|
||||
- aniState->cckNoiseImmunityLevel);
|
||||
}
|
||||
+ ath9k_hw_set_ofdm_nil(ah, ofdm_nil);
|
||||
+ ath9k_hw_set_cck_nil(ah, cck_nil);
|
||||
|
||||
/*
|
||||
* enable phy counters if hw supports or if not, enable phy
|
|
@ -1,41 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||
@@ -179,6 +179,14 @@ static void ath9k_hw_set_ofdm_nil(struct
|
||||
ath9k_hw_ani_control(ah,
|
||||
ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
|
||||
entry_ofdm->ofdm_weak_signal_on);
|
||||
+
|
||||
+ if (aniState->ofdmNoiseImmunityLevel >= ATH9K_ANI_OFDM_DEF_LEVEL) {
|
||||
+ ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;
|
||||
+ ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI;
|
||||
+ } else {
|
||||
+ ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI;
|
||||
+ ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW;
|
||||
+ }
|
||||
}
|
||||
|
||||
static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
|
||||
@@ -428,21 +436,10 @@ void ath9k_hw_ani_monitor(struct ath_hw
|
||||
|
||||
if (aniState->listenTime > ah->aniperiod) {
|
||||
if (cckPhyErrRate < ah->config.cck_trig_low &&
|
||||
- ((ofdmPhyErrRate < ah->config.ofdm_trig_low &&
|
||||
- aniState->ofdmNoiseImmunityLevel <
|
||||
- ATH9K_ANI_OFDM_DEF_LEVEL) ||
|
||||
- (ofdmPhyErrRate < ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI &&
|
||||
- aniState->ofdmNoiseImmunityLevel >=
|
||||
- ATH9K_ANI_OFDM_DEF_LEVEL))) {
|
||||
+ ofdmPhyErrRate < ah->config.ofdm_trig_low) {
|
||||
ath9k_hw_ani_lower_immunity(ah);
|
||||
aniState->ofdmsTurn = !aniState->ofdmsTurn;
|
||||
- } else if ((ofdmPhyErrRate > ah->config.ofdm_trig_high &&
|
||||
- aniState->ofdmNoiseImmunityLevel >=
|
||||
- ATH9K_ANI_OFDM_DEF_LEVEL) ||
|
||||
- (ofdmPhyErrRate >
|
||||
- ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI &&
|
||||
- aniState->ofdmNoiseImmunityLevel <
|
||||
- ATH9K_ANI_OFDM_DEF_LEVEL)) {
|
||||
+ } else if (ofdmPhyErrRate > ah->config.ofdm_trig_high) {
|
||||
ath9k_hw_ani_ofdm_err_trigger(ah);
|
||||
aniState->ofdmsTurn = false;
|
||||
} else if (cckPhyErrRate > ah->config.cck_trig_high) {
|
|
@ -101,7 +101,7 @@
|
|||
+}
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00.h
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
|
||||
@@ -560,6 +560,7 @@ struct rt2x00lib_ops {
|
||||
@@ -559,6 +559,7 @@ struct rt2x00lib_ops {
|
||||
const u8 *data, const size_t len);
|
||||
int (*load_firmware) (struct rt2x00_dev *rt2x00dev,
|
||||
const u8 *data, const size_t len);
|
||||
|
@ -109,7 +109,7 @@
|
|||
|
||||
/*
|
||||
* Device initialization/deinitialization handlers.
|
||||
@@ -721,6 +722,7 @@ enum rt2x00_capability_flags {
|
||||
@@ -720,6 +721,7 @@ enum rt2x00_capability_flags {
|
||||
REQUIRE_SW_SEQNO,
|
||||
REQUIRE_HT_TX_DESC,
|
||||
REQUIRE_PS_AUTOWAKE,
|
||||
|
@ -117,7 +117,7 @@
|
|||
|
||||
/*
|
||||
* Capabilities
|
||||
@@ -976,6 +978,11 @@ struct rt2x00_dev {
|
||||
@@ -975,6 +977,11 @@ struct rt2x00_dev {
|
||||
const struct firmware *fw;
|
||||
|
||||
/*
|
||||
|
@ -239,9 +239,9 @@
|
|||
.get_entry_state = rt2800pci_get_entry_state,
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
|
||||
@@ -1161,6 +1161,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
|
||||
BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||
BIT(NL80211_IFTYPE_WDS);
|
||||
@@ -1163,6 +1163,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
|
||||
|
||||
rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
|
||||
|
||||
+ retval = rt2x00lib_load_eeprom_file(rt2x00dev);
|
||||
+ if (retval)
|
||||
|
@ -250,7 +250,7 @@
|
|||
/*
|
||||
* Initialize work.
|
||||
*/
|
||||
@@ -1285,6 +1289,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
|
||||
@@ -1287,6 +1291,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
|
||||
*/
|
||||
if (rt2x00dev->drv_data)
|
||||
kfree(rt2x00dev->drv_data);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -614,6 +614,7 @@ export CONFIG_RT2X00=y
|
||||
@@ -619,6 +619,7 @@ export CONFIG_RT2X00=y
|
||||
export CONFIG_RT2X00_LIB=m
|
||||
export CONFIG_RT2800_LIB=m
|
||||
export CONFIG_RT2X00_LIB_FIRMWARE=y
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
num_rates += 4;
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00.h
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
|
||||
@@ -425,6 +425,7 @@ struct hw_mode_spec {
|
||||
@@ -424,6 +424,7 @@ struct hw_mode_spec {
|
||||
unsigned int supported_bands;
|
||||
#define SUPPORT_BAND_2GHZ 0x00000001
|
||||
#define SUPPORT_BAND_5GHZ 0x00000002
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
{
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00.h
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
|
||||
@@ -1280,6 +1280,7 @@ static inline void rt2x00debug_dump_fram
|
||||
@@ -1279,6 +1279,7 @@ static inline void rt2x00debug_dump_fram
|
||||
*/
|
||||
u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
|
||||
struct ieee80211_vif *vif);
|
||||
|
|
|
@ -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,
|
||||
@@ -2689,10 +2694,10 @@ static int b43_gpio_init(struct b43_wlde
|
||||
@@ -2690,10 +2695,10 @@ static int b43_gpio_init(struct b43_wlde
|
||||
u32 mask, set;
|
||||
|
||||
b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);
|
||||
|
|
|
@ -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. */
|
||||
@@ -3045,8 +3045,8 @@ static int b43_chip_init(struct b43_wlde
|
||||
@@ -3046,8 +3046,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);
|
||||
@@ -3789,7 +3789,6 @@ static int b43_op_config(struct ieee8021
|
||||
@@ -3790,7 +3790,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;
|
||||
|
||||
@@ -3843,11 +3842,9 @@ static int b43_op_config(struct ieee8021
|
||||
@@ -3844,11 +3843,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) {
|
||||
@@ -4940,6 +4937,47 @@ static int b43_op_get_survey(struct ieee
|
||||
@@ -4941,6 +4938,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,
|
||||
@@ -4961,6 +4999,8 @@ static const struct ieee80211_ops b43_hw
|
||||
@@ -4962,6 +5000,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.
|
||||
@@ -5207,6 +5247,8 @@ static int b43_one_core_attach(struct b4
|
||||
@@ -5208,6 +5248,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;
|
||||
@@ -5297,6 +5339,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
@@ -5298,6 +5340,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
|
||||
hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
|
||||
|
||||
|
@ -117,7 +117,7 @@
|
|||
+
|
||||
hw->queues = modparam_qos ? B43_QOS_QUEUE_NUM : 1;
|
||||
wl->mac80211_initially_registered_queues = hw->queues;
|
||||
hw->max_rates = 2;
|
||||
wl->hw_registred = false;
|
||||
--- a/drivers/net/wireless/b43/b43.h
|
||||
+++ b/drivers/net/wireless/b43/b43.h
|
||||
@@ -804,6 +804,8 @@ struct b43_wldev {
|
||||
|
|
|
@ -19,7 +19,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||
|
||||
--- a/drivers/net/wireless/b43/b43.h
|
||||
+++ b/drivers/net/wireless/b43/b43.h
|
||||
@@ -1047,6 +1047,32 @@ static inline bool b43_using_pio_transfe
|
||||
@@ -1051,6 +1051,32 @@ static inline bool b43_using_pio_transfe
|
||||
return dev->__using_pio_transfers;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifdef DEBUG
|
||||
#define SI_MSG(fmt, ...) pr_debug(fmt, ##__VA_ARGS__)
|
||||
@@ -777,7 +775,7 @@ void ai_pci_up(struct si_pub *sih)
|
||||
@@ -776,7 +774,7 @@ void ai_pci_up(struct si_pub *sih)
|
||||
bcma_core_set_clockmode(cc, BCMA_CLKMODE_FAST);
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci, true);
|
||||
}
|
||||
|
||||
@@ -795,7 +793,7 @@ void ai_pci_down(struct si_pub *sih)
|
||||
@@ -794,7 +792,7 @@ void ai_pci_down(struct si_pub *sih)
|
||||
bcma_core_set_clockmode(cc, BCMA_CLKMODE_DYNAMIC);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#ifdef DEBUG
|
||||
#define SI_MSG(fmt, ...) pr_debug(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
@@ -755,9 +753,6 @@ bool ai_clkctl_cc(struct si_pub *sih, en
|
||||
@@ -754,9 +752,6 @@ bool ai_clkctl_cc(struct si_pub *sih, en
|
||||
|
||||
sii = (struct si_info *)sih;
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
cc = ai_findcore(&sii->pub, BCMA_CORE_CHIPCOMMON, 0);
|
||||
bcma_core_set_clockmode(cc, mode);
|
||||
return mode == BCMA_CLKMODE_FAST;
|
||||
@@ -766,15 +761,9 @@ bool ai_clkctl_cc(struct si_pub *sih, en
|
||||
@@ -765,15 +760,9 @@ bool ai_clkctl_cc(struct si_pub *sih, en
|
||||
void ai_pci_up(struct si_pub *sih)
|
||||
{
|
||||
struct si_info *sii;
|
||||
|
@ -35,7 +35,7 @@
|
|||
if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
|
||||
bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci, true);
|
||||
}
|
||||
@@ -783,16 +772,9 @@ void ai_pci_up(struct si_pub *sih)
|
||||
@@ -782,16 +771,9 @@ void ai_pci_up(struct si_pub *sih)
|
||||
void ai_pci_down(struct si_pub *sih)
|
||||
{
|
||||
struct si_info *sii;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -807,15 +804,3 @@ bool ai_deviceremoved(struct si_pub *sih
|
||||
@@ -806,15 +803,3 @@ bool ai_deviceremoved(struct si_pub *sih
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
found = 0;
|
||||
|
||||
@@ -622,7 +622,7 @@ uint ai_cc_reg(struct si_pub *sih, uint
|
||||
@@ -622,7 +622,7 @@ uint ai_cc_reg(struct si_pub *sih, uint
|
||||
u32 w;
|
||||
struct si_info *sii;
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
cc = sii->icbus->drv_cc.core;
|
||||
|
||||
/* mask and set */
|
||||
@@ -716,7 +716,7 @@ u16 ai_clkctl_fast_pwrup_delay(struct si
|
||||
@@ -715,7 +715,7 @@ u16 ai_clkctl_fast_pwrup_delay(struct si
|
||||
uint slowminfreq;
|
||||
u16 fpdelay;
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
if (ai_get_cccaps(sih) & CC_CAP_PMU) {
|
||||
fpdelay = si_pmu_fast_pwrup_delay(sih);
|
||||
return fpdelay;
|
||||
@@ -748,7 +748,7 @@ bool ai_clkctl_cc(struct si_pub *sih, en
|
||||
@@ -747,7 +747,7 @@ bool ai_clkctl_cc(struct si_pub *sih, en
|
||||
struct si_info *sii;
|
||||
struct bcma_device *cc;
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
cc = ai_findcore(&sii->pub, BCMA_CORE_CHIPCOMMON, 0);
|
||||
bcma_core_set_clockmode(cc, mode);
|
||||
@@ -759,7 +759,7 @@ void ai_pci_up(struct si_pub *sih)
|
||||
@@ -758,7 +758,7 @@ void ai_pci_up(struct si_pub *sih)
|
||||
{
|
||||
struct si_info *sii;
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
|||
|
||||
if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
|
||||
bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci, true);
|
||||
@@ -770,7 +770,7 @@ void ai_pci_down(struct si_pub *sih)
|
||||
@@ -769,7 +769,7 @@ void ai_pci_down(struct si_pub *sih)
|
||||
{
|
||||
struct si_info *sii;
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
|
||||
bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci, false);
|
||||
@@ -793,7 +793,7 @@ bool ai_deviceremoved(struct si_pub *sih
|
||||
@@ -792,7 +792,7 @@ bool ai_deviceremoved(struct si_pub *sih
|
||||
u32 w;
|
||||
struct si_info *sii;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
/*
|
||||
* read/modify chipcommon core register.
|
||||
*/
|
||||
@@ -689,12 +668,13 @@ ai_clkctl_setdelay(struct si_pub *sih, s
|
||||
@@ -688,12 +667,13 @@ ai_clkctl_setdelay(struct si_pub *sih, s
|
||||
/* initialize power control delay registers */
|
||||
void ai_clkctl_init(struct si_pub *sih)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@
|
|||
if (cc == NULL)
|
||||
return;
|
||||
|
||||
@@ -726,7 +706,7 @@ u16 ai_clkctl_fast_pwrup_delay(struct si
|
||||
@@ -725,7 +705,7 @@ u16 ai_clkctl_fast_pwrup_delay(struct si
|
||||
return 0;
|
||||
|
||||
fpdelay = 0;
|
||||
|
@ -52,7 +52,7 @@
|
|||
if (cc) {
|
||||
slowminfreq = ai_slowclk_freq(sih, false, cc);
|
||||
fpdelay = (((bcma_read32(cc, CHIPCREGOFFS(pll_on_delay)) + 2)
|
||||
@@ -750,7 +730,7 @@ bool ai_clkctl_cc(struct si_pub *sih, en
|
||||
@@ -749,7 +729,7 @@ bool ai_clkctl_cc(struct si_pub *sih, en
|
||||
|
||||
sii = container_of(sih, struct si_info, pub);
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
|||
bcma_core_set_clockmode(cc, mode);
|
||||
return mode == BCMA_CLKMODE_FAST;
|
||||
}
|
||||
@@ -779,9 +759,10 @@ void ai_pci_down(struct si_pub *sih)
|
||||
@@ -778,9 +758,10 @@ void ai_pci_down(struct si_pub *sih)
|
||||
/* Enable BT-COEX & Ex-PA for 4313 */
|
||||
void ai_epa_4313war(struct si_pub *sih)
|
||||
{
|
||||
|
@ -134,7 +134,7 @@
|
|||
struct bcma_device *core;
|
||||
u32 alp_khz;
|
||||
|
||||
@@ -335,7 +339,7 @@ u32 si_pmu_measure_alpclk(struct si_pub
|
||||
@@ -335,7 +339,7 @@ u32 si_pmu_measure_alpclk(struct si_pub
|
||||
return 0;
|
||||
|
||||
/* Remember original core before switch to chipc */
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
} else if (NREV_IS(pi->pubpi.phy_rev, 5)) {
|
||||
tx_pwrctrl_tbl = nphy_tpc_txgain_ipa_rev5;
|
||||
} else {
|
||||
@@ -19256,8 +19259,14 @@ static void wlc_phy_spurwar_nphy(struct
|
||||
@@ -19256,8 +19259,14 @@ static void wlc_phy_spurwar_nphy(struct
|
||||
case 38:
|
||||
case 102:
|
||||
case 118:
|
||||
|
@ -49,7 +49,7 @@
|
|||
break;
|
||||
case 134:
|
||||
nphy_adj_tone_id_buf[0] = 32;
|
||||
@@ -20697,12 +20706,22 @@ wlc_phy_chanspec_radio2056_setup(struct
|
||||
@@ -20697,12 +20706,22 @@ wlc_phy_chanspec_radio2056_setup(struct
|
||||
write_radio_reg(pi, RADIO_2056_SYN_PLL_LOOPFILTER2 |
|
||||
RADIO_2056_SYN, 0x1f);
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -20749,24 +20768,33 @@ wlc_phy_chanspec_radio2056_setup(struct
|
||||
@@ -20749,24 +20768,33 @@ wlc_phy_chanspec_radio2056_setup(struct
|
||||
WRITE_RADIO_REG2(pi, RADIO_2056, TX, core,
|
||||
PADG_IDAC, 0xcc);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
BCMA_CORETABLE_END
|
||||
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
|
||||
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
|
||||
@@ -751,7 +751,7 @@ static void brcms_c_ucode_bsinit(struct
|
||||
@@ -751,7 +751,7 @@ static void brcms_c_ucode_bsinit(struct
|
||||
brcms_c_write_mhf(wlc_hw, wlc_hw->band->mhfs);
|
||||
|
||||
/* do band-specific ucode IHR, SHM, and SCR inits */
|
||||
|
@ -19,7 +19,7 @@
|
|||
if (BRCMS_ISNPHY(wlc_hw->band))
|
||||
brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16);
|
||||
else
|
||||
@@ -2276,7 +2276,7 @@ static void brcms_ucode_download(struct
|
||||
@@ -2276,7 +2276,7 @@ static void brcms_ucode_download(struct
|
||||
if (wlc_hw->ucode_loaded)
|
||||
return;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
MODULE_DEVICE_TABLE(bcma, brcms_coreid_table);
|
||||
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
|
||||
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
|
||||
@@ -751,7 +751,7 @@ static void brcms_c_ucode_bsinit(struct
|
||||
@@ -751,7 +751,7 @@ static void brcms_c_ucode_bsinit(struct
|
||||
brcms_c_write_mhf(wlc_hw, wlc_hw->band->mhfs);
|
||||
|
||||
/* do band-specific ucode IHR, SHM, and SCR inits */
|
||||
|
@ -19,7 +19,7 @@
|
|||
if (BRCMS_ISNPHY(wlc_hw->band))
|
||||
brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16);
|
||||
else
|
||||
@@ -2276,7 +2276,7 @@ static void brcms_ucode_download(struct
|
||||
@@ -2276,7 +2276,7 @@ static void brcms_ucode_download(struct
|
||||
if (wlc_hw->ucode_loaded)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue