mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
ath9k: merge another round of upstream (or -pending) fixes and cleanups
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39138
This commit is contained in:
parent
5db5354c70
commit
bac83378e7
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include "hw.h"
|
||||
@@ -504,8 +505,16 @@ static int ath9k_hw_init_macaddr(struct
|
||||
@@ -462,8 +463,16 @@ static int ath9k_hw_init_macaddr(struct
|
||||
common->macaddr[2 * i] = eeval >> 8;
|
||||
common->macaddr[2 * i + 1] = eeval & 0xff;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -867,6 +867,7 @@ static const struct ieee80211_iface_limi
|
||||
@@ -865,6 +865,7 @@ static const struct ieee80211_iface_limi
|
||||
#endif
|
||||
BIT(NL80211_IFTYPE_AP) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO) },
|
||||
|
@ -1,7 +1,7 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1782,6 +1782,53 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
}
|
||||
@@ -1528,6 +1528,53 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
ath9k_spectral_deinit_debug(sc);
|
||||
}
|
||||
|
||||
+static ssize_t read_file_eeprom(struct file *file, char __user *user_buf,
|
||||
@ -54,9 +54,9 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1800,6 +1847,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
ath9k_dfs_init_debug(sc);
|
||||
@@ -1547,6 +1594,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
ath9k_tx99_init_debug(sc);
|
||||
ath9k_spectral_init_debug(sc);
|
||||
|
||||
+ debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
+ &fops_eeprom);
|
||||
|
@ -71,7 +71,7 @@
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -706,6 +706,7 @@ enum ath_cal_list {
|
||||
@@ -707,6 +707,7 @@ enum ath_cal_list {
|
||||
#define AH_USE_EEPROM 0x1
|
||||
#define AH_UNPLUGGED 0x2 /* The card has been physically removed. */
|
||||
#define AH_FASTCC 0x4
|
||||
@ -81,7 +81,7 @@
|
||||
struct ath_ops reg_ops;
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -721,6 +721,8 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -719,6 +719,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
|
||||
@@ -1110,23 +1110,23 @@ static int __init ath9k_init(void)
|
||||
@@ -1108,23 +1108,23 @@ static int __init ath9k_init(void)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2010,8 +2010,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -1978,8 +1978,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
REG_WRITE(ah, AR_OBS, 8);
|
||||
|
||||
if (ah->config.rx_intr_mitigation) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -113,7 +113,7 @@ int ath_descdma_setup(struct ath_softc *
|
||||
/* RX / TX */
|
||||
/***********/
|
||||
@@ -90,7 +90,7 @@ int ath_descdma_setup(struct ath_softc *
|
||||
(_l) &= ((_sz) - 1); \
|
||||
} while (0)
|
||||
|
||||
-#define ATH_RXBUF 512
|
||||
+#define ATH_RXBUF 256
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1829,6 +1829,52 @@ static const struct file_operations fops
|
||||
@@ -1575,6 +1575,52 @@ static const struct file_operations fops
|
||||
.owner = THIS_MODULE
|
||||
};
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1849,6 +1895,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1596,6 +1642,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
|
||||
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
&fops_eeprom);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -724,6 +724,7 @@ int ath9k_hw_init(struct ath_hw *ah)
|
||||
@@ -682,6 +682,7 @@ int ath9k_hw_init(struct ath_hw *ah)
|
||||
case AR9300_DEVID_AR9462:
|
||||
case AR9485_DEVID_AR1111:
|
||||
case AR9300_DEVID_AR9565:
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -1659,6 +1659,7 @@ struct ieee80211_hw {
|
||||
@@ -1663,6 +1663,7 @@ struct ieee80211_hw {
|
||||
u8 max_tx_aggregation_subframes;
|
||||
u8 offchannel_tx_hw_queue;
|
||||
u8 radiotap_mcs_details;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
out:
|
||||
spin_unlock_bh(&sc->sc_pcu_lock);
|
||||
@@ -1345,6 +1349,7 @@ static int ath9k_config(struct ieee80211
|
||||
@@ -1347,6 +1351,7 @@ static int ath9k_config(struct ieee80211
|
||||
sc->config.txpowlimit = 2 * conf->power_level;
|
||||
ath9k_cmn_update_txpow(ah, sc->curtxpow,
|
||||
sc->config.txpowlimit, &sc->curtxpow);
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2841,7 +2841,7 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
@@ -2809,7 +2809,7 @@ void ath9k_hw_apply_txpower(struct ath_h
|
||||
channel = chan->chan;
|
||||
chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
|
||||
new_pwr = min_t(int, chan_pwr, reg->power_limit);
|
||||
@ -21,7 +21,7 @@
|
||||
if (ant_gain > max_gain)
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1345,7 +1345,10 @@ static int ath9k_config(struct ieee80211
|
||||
@@ -1347,7 +1347,10 @@ static int ath9k_config(struct ieee80211
|
||||
}
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_POWER) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -557,6 +557,9 @@ struct ath9k_wow_pattern {
|
||||
@@ -559,6 +559,9 @@ static inline int ath9k_dump_btcoex(stru
|
||||
void ath_init_leds(struct ath_softc *sc);
|
||||
void ath_deinit_leds(struct ath_softc *sc);
|
||||
void ath_fill_led_pin(struct ath_softc *sc);
|
||||
@ -10,9 +10,9 @@
|
||||
#else
|
||||
static inline void ath_init_leds(struct ath_softc *sc)
|
||||
{
|
||||
@@ -732,6 +735,13 @@ enum spectral_mode {
|
||||
SPECTRAL_CHANSCAN,
|
||||
};
|
||||
@@ -704,6 +707,13 @@ enum sc_op_flags {
|
||||
#define PS_BEACON_SYNC BIT(4)
|
||||
#define PS_WAIT_FOR_ANI BIT(5)
|
||||
|
||||
+struct ath_led {
|
||||
+ struct list_head list;
|
||||
@ -24,7 +24,7 @@
|
||||
struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
@@ -774,9 +784,8 @@ struct ath_softc {
|
||||
@@ -746,9 +756,8 @@ struct ath_softc {
|
||||
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
@ -162,7 +162,7 @@
|
||||
void ath_fill_led_pin(struct ath_softc *sc)
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -1016,7 +1016,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -1014,7 +1014,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
/* must be initialized before ieee80211_register_hw */
|
||||
@ -173,7 +173,7 @@
|
||||
#endif
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1874,6 +1874,61 @@ static const struct file_operations fops
|
||||
@@ -1620,6 +1620,61 @@ static const struct file_operations fops
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
@ -235,7 +235,7 @@
|
||||
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
@@ -1897,6 +1952,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1644,6 +1699,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
&fops_eeprom);
|
||||
debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
|
||||
sc, &fops_chanbw);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1930,6 +1930,50 @@ static const struct file_operations fops
|
||||
@@ -1676,6 +1676,50 @@ static const struct file_operations fops
|
||||
#endif
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1956,6 +2000,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1703,6 +1747,8 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
debugfs_create_file("gpio_led", S_IWUSR,
|
||||
sc->debug.debugfs_phy, sc, &fops_gpio_led);
|
||||
#endif
|
||||
@ -75,7 +75,7 @@
|
||||
struct ath9k_hw_version {
|
||||
u32 magic;
|
||||
u16 devid;
|
||||
@@ -744,6 +750,8 @@ struct ath_hw {
|
||||
@@ -745,6 +751,8 @@ struct ath_hw {
|
||||
u32 rfkill_polarity;
|
||||
u32 ah_flags;
|
||||
|
||||
@ -84,17 +84,17 @@
|
||||
bool reset_power_on;
|
||||
bool htc_reset_init;
|
||||
|
||||
@@ -995,6 +1003,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
||||
@@ -996,6 +1004,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
|
||||
bool ath9k_hw_check_alive(struct ath_hw *ah);
|
||||
|
||||
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
|
||||
+void ath9k_hw_update_diag(struct ath_hw *ah);
|
||||
|
||||
#ifdef CPTCFG_ATH9K_DEBUGFS
|
||||
void ath9k_debug_sync_cause(struct ath_common *common, u32 sync_cause);
|
||||
/* Generic hw timer primitives */
|
||||
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1854,6 +1854,20 @@ fail:
|
||||
@@ -1822,6 +1822,20 @@ fail:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@
|
||||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
struct ath9k_hw_cal_data *caldata, bool fastcc)
|
||||
{
|
||||
@@ -2056,6 +2070,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -2024,6 +2038,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
}
|
||||
|
||||
ath9k_hw_apply_gpio_override(ah);
|
||||
@ -125,8 +125,8 @@
|
||||
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -574,6 +574,11 @@ irqreturn_t ath_isr(int irq, void *dev)
|
||||
ath9k_hw_getisr(ah, &status); /* NB: clears ISR too */
|
||||
@@ -576,6 +576,11 @@ irqreturn_t ath_isr(int irq, void *dev)
|
||||
ath9k_debug_sync_cause(sc, sync_cause);
|
||||
status &= ah->imask; /* discard unasked-for bits */
|
||||
|
||||
+ if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) {
|
||||
|
@ -11,7 +11,7 @@
|
||||
int (*external_reset)(void);
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2441,17 +2441,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
|
||||
@@ -2409,17 +2409,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
|
||||
}
|
||||
|
||||
eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
|
||||
@ -47,7 +47,7 @@
|
||||
AR_SREV_9285(ah) ||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -914,6 +914,8 @@ struct ath_hw {
|
||||
@@ -915,6 +915,8 @@ struct ath_hw {
|
||||
bool is_clk_25mhz;
|
||||
int (*get_mac_revision)(void);
|
||||
int (*external_reset)(void);
|
||||
@ -58,7 +58,7 @@
|
||||
};
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -721,6 +721,8 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -719,6 +719,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;
|
||||
|
@ -8,7 +8,7 @@
|
||||
* @spectral_scan_config: set parameters for spectral scan and enable/disable it
|
||||
* @spectral_scan_trigger: trigger a spectral scan run
|
||||
* @spectral_scan_wait: wait for a spectral scan run to finish
|
||||
@@ -683,6 +684,7 @@ struct ath_hw_ops {
|
||||
@@ -684,6 +685,7 @@ struct ath_hw_ops {
|
||||
struct ath_hw_antcomb_conf *antconf);
|
||||
void (*antdiv_comb_conf_set)(struct ath_hw *ah,
|
||||
struct ath_hw_antcomb_conf *antconf);
|
||||
@ -55,7 +55,7 @@
|
||||
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -847,7 +847,8 @@ static void ath9k_init_txpower_limits(st
|
||||
@@ -845,7 +845,8 @@ static void ath9k_init_txpower_limits(st
|
||||
if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
|
||||
ath9k_init_band_txpower(sc, IEEE80211_BAND_5GHZ);
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
}
|
||||
|
||||
void ath9k_reload_chainmask_settings(struct ath_softc *sc)
|
||||
@@ -978,6 +979,18 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
@@ -976,6 +977,18 @@ static void ath9k_set_hw_capab(struct at
|
||||
SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -1023,6 +1036,8 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -1021,6 +1034,8 @@ int ath9k_init_device(u16 devid, struct
|
||||
ARRAY_SIZE(ath9k_tpt_blink));
|
||||
#endif
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
if (error)
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw-ops.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
|
||||
@@ -94,6 +94,12 @@ static inline void ath9k_hw_tx99_set_txp
|
||||
@@ -95,6 +95,12 @@ static inline void ath9k_hw_tx99_set_txp
|
||||
ath9k_hw_ops(ah)->tx99_set_txpower(ah, power);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user