mac80211: make it work with 3.18.12+
3.18.12 backported 61ada528dea028331e99e8ceaed87c683ad25de2 ("sched/wait: Provide infrastructure to deal with nested blocking") from 3.19, causing the following error on load: [ 13.588000] compat: exports duplicate symbol woken_wake_function (owned by kernel) Fix this by guarding it with a check for 3.18.11 or earlier instead of 3.19. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 45710
This commit is contained in:
parent
4bb7b2186e
commit
072937888e
30 changed files with 98 additions and 69 deletions
|
@ -0,0 +1,29 @@
|
||||||
|
--- a/backport-include/linux/wait.h
|
||||||
|
+++ b/backport-include/linux/wait.h
|
||||||
|
@@ -23,7 +23,7 @@ backport_wait_on_bit_io(void *word, int
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,12)
|
||||||
|
#define WQ_FLAG_WOKEN 0x02
|
||||||
|
|
||||||
|
#define wait_woken LINUX_BACKPORT(wait_woken)
|
||||||
|
--- a/compat/backport-3.19.c
|
||||||
|
+++ b/compat/backport-3.19.c
|
||||||
|
@@ -15,6 +15,7 @@
|
||||||
|
#include <linux/netdevice.h>
|
||||||
|
#include <linux/debugfs.h>
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,12)
|
||||||
|
static inline bool is_kthread_should_stop(void)
|
||||||
|
{
|
||||||
|
return (current->flags & PF_KTHREAD) && kthread_should_stop();
|
||||||
|
@@ -79,6 +80,7 @@ int woken_wake_function(wait_queue_t *wa
|
||||||
|
return default_wake_function(wait, mode, sync, key);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(woken_wake_function);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#ifdef __BACKPORT_NETDEV_RSS_KEY_FILL
|
||||||
|
u8 netdev_rss_key[NETDEV_RSS_KEY_LEN];
|
|
@ -331,7 +331,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||||
wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n",
|
wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n",
|
||||||
--- a/net/mac80211/sta_info.c
|
--- a/net/mac80211/sta_info.c
|
||||||
+++ b/net/mac80211/sta_info.c
|
+++ b/net/mac80211/sta_info.c
|
||||||
@@ -118,6 +118,16 @@ static void __cleanup_single_sta(struct
|
@@ -118,6 +118,16 @@ static void __cleanup_single_sta(struct
|
||||||
atomic_dec(&ps->num_sta_ps);
|
atomic_dec(&ps->num_sta_ps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||||
@@ -2858,7 +2858,7 @@ ath5k_reset(struct ath5k_hw *ah, struct
|
@@ -2858,7 +2858,7 @@ ath5k_reset(struct ath5k_hw *ah, struct
|
||||||
{
|
{
|
||||||
struct ath_common *common = ath5k_hw_common(ah);
|
struct ath_common *common = ath5k_hw_common(ah);
|
||||||
int ret, ani_mode;
|
int ret, ani_mode;
|
||||||
|
@ -70,7 +70,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||||
|
|
||||||
ATH5K_DBG(ah, ATH5K_DEBUG_RESET, "resetting\n");
|
ATH5K_DBG(ah, ATH5K_DEBUG_RESET, "resetting\n");
|
||||||
|
|
||||||
@@ -2876,11 +2876,29 @@ ath5k_reset(struct ath5k_hw *ah, struct
|
@@ -2876,11 +2876,29 @@ ath5k_reset(struct ath5k_hw *ah, struct
|
||||||
* so we should also free any remaining
|
* so we should also free any remaining
|
||||||
* tx buffers */
|
* tx buffers */
|
||||||
ath5k_drain_tx_buffs(ah);
|
ath5k_drain_tx_buffs(ah);
|
||||||
|
|
|
@ -66,7 +66,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||||
unsigned int fif_filter_flags; /* Current FIF_* filter flags */
|
unsigned int fif_filter_flags; /* Current FIF_* filter flags */
|
||||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||||
@@ -1523,6 +1523,9 @@ ath5k_set_current_imask(struct ath5k_hw
|
@@ -1523,6 +1523,9 @@ ath5k_set_current_imask(struct ath5k_hw
|
||||||
enum ath5k_int imask;
|
enum ath5k_int imask;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||||
spin_lock_irqsave(&ah->irqlock, flags);
|
spin_lock_irqsave(&ah->irqlock, flags);
|
||||||
imask = ah->imask;
|
imask = ah->imask;
|
||||||
if (ah->rx_pending)
|
if (ah->rx_pending)
|
||||||
@@ -2862,6 +2865,8 @@ ath5k_reset(struct ath5k_hw *ah, struct
|
@@ -2862,6 +2865,8 @@ ath5k_reset(struct ath5k_hw *ah, struct
|
||||||
|
|
||||||
ATH5K_DBG(ah, ATH5K_DEBUG_RESET, "resetting\n");
|
ATH5K_DBG(ah, ATH5K_DEBUG_RESET, "resetting\n");
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||||
ath5k_hw_set_imr(ah, 0);
|
ath5k_hw_set_imr(ah, 0);
|
||||||
synchronize_irq(ah->irq);
|
synchronize_irq(ah->irq);
|
||||||
ath5k_stop_tasklets(ah);
|
ath5k_stop_tasklets(ah);
|
||||||
@@ -2952,6 +2957,8 @@ ath5k_reset(struct ath5k_hw *ah, struct
|
@@ -2952,6 +2957,8 @@ ath5k_reset(struct ath5k_hw *ah, struct
|
||||||
*/
|
*/
|
||||||
/* ath5k_chan_change(ah, c); */
|
/* ath5k_chan_change(ah, c); */
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,8 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||||
(key = rcu_dereference(tx->sdata->default_unicast_key)))
|
(key = rcu_dereference(tx->sdata->default_unicast_key)))
|
||||||
tx->key = key;
|
tx->key = key;
|
||||||
- else if (info->flags & IEEE80211_TX_CTL_INJECTED)
|
- else if (info->flags & IEEE80211_TX_CTL_INJECTED)
|
||||||
- tx->key = NULL;
|
+ else
|
||||||
|
tx->key = NULL;
|
||||||
- else if (!tx->sdata->drop_unencrypted)
|
- else if (!tx->sdata->drop_unencrypted)
|
||||||
- tx->key = NULL;
|
- tx->key = NULL;
|
||||||
- else if (tx->skb->protocol == tx->sdata->control_port_protocol)
|
- else if (tx->skb->protocol == tx->sdata->control_port_protocol)
|
||||||
|
@ -119,8 +120,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||||
- tx->key = NULL;
|
- tx->key = NULL;
|
||||||
- else if (ieee80211_is_mgmt(hdr->frame_control) &&
|
- else if (ieee80211_is_mgmt(hdr->frame_control) &&
|
||||||
- !ieee80211_is_robust_mgmt_frame(tx->skb))
|
- !ieee80211_is_robust_mgmt_frame(tx->skb))
|
||||||
+ else
|
- tx->key = NULL;
|
||||||
tx->key = NULL;
|
|
||||||
- else {
|
- else {
|
||||||
- I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted);
|
- I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted);
|
||||||
- return TX_DROP;
|
- return TX_DROP;
|
||||||
|
|
|
@ -257,7 +257,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||||
break;
|
break;
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
}
|
}
|
||||||
@@ -3295,6 +3314,6 @@ void __ieee80211_tx_skb_tid_band(struct
|
@@ -3295,6 +3314,6 @@ void __ieee80211_tx_skb_tid_band(struct
|
||||||
*/
|
*/
|
||||||
local_bh_disable();
|
local_bh_disable();
|
||||||
IEEE80211_SKB_CB(skb)->band = band;
|
IEEE80211_SKB_CB(skb)->band = band;
|
||||||
|
|
|
@ -121,7 +121,11 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
+ }
|
+ }
|
||||||
+ priv->wmi->multi_rmw_idx = 0;
|
+ priv->wmi->multi_rmw_idx = 0;
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
|
- val = ath9k_regread(hw_priv, reg_offset);
|
||||||
|
- val &= ~clr;
|
||||||
|
- val |= set;
|
||||||
|
- ath9k_regwrite(hw_priv, val, reg_offset);
|
||||||
+ mutex_unlock(&priv->wmi->multi_rmw_mutex);
|
+ mutex_unlock(&priv->wmi->multi_rmw_mutex);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
@ -133,11 +137,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
+
|
+
|
||||||
+ if (test_bit(HTC_FWFLAG_NO_RMW, &priv->fw_flags))
|
+ if (test_bit(HTC_FWFLAG_NO_RMW, &priv->fw_flags))
|
||||||
+ return;
|
+ return;
|
||||||
|
+
|
||||||
- val = ath9k_regread(hw_priv, reg_offset);
|
|
||||||
- val &= ~clr;
|
|
||||||
- val |= set;
|
|
||||||
- ath9k_regwrite(hw_priv, val, reg_offset);
|
|
||||||
+ atomic_inc(&priv->wmi->m_rmw_cnt);
|
+ atomic_inc(&priv->wmi->m_rmw_cnt);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
@ -239,7 +239,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
len += scnprintf(buf + len, size - len, "%20s : %10d\n",\
|
len += scnprintf(buf + len, size - len, "%20s : %10d\n",\
|
||||||
--- a/drivers/net/wireless/ath/ath9k/wmi.c
|
--- a/drivers/net/wireless/ath/ath9k/wmi.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
|
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
|
||||||
@@ -61,6 +61,8 @@ static const char *wmi_cmd_to_name(enum
|
@@ -61,6 +61,8 @@ static const char *wmi_cmd_to_name(enum
|
||||||
return "WMI_REG_READ_CMDID";
|
return "WMI_REG_READ_CMDID";
|
||||||
case WMI_REG_WRITE_CMDID:
|
case WMI_REG_WRITE_CMDID:
|
||||||
return "WMI_REG_WRITE_CMDID";
|
return "WMI_REG_WRITE_CMDID";
|
||||||
|
|
|
@ -8,7 +8,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -141,6 +141,16 @@ static unsigned int ath9k_ioread32(void
|
@@ -141,6 +141,16 @@ static unsigned int ath9k_ioread32(void
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -121,6 +121,36 @@ void ath9k_hw_write_array(struct ath_hw
|
@@ -121,6 +121,36 @@ void ath9k_hw_write_array(struct ath_hw
|
||||||
REGWRITE_BUFFER_FLUSH(ah);
|
REGWRITE_BUFFER_FLUSH(ah);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
|
|
||||||
#define AR_GPIO_OUTPUT_MUX_AS_OUTPUT 0
|
#define AR_GPIO_OUTPUT_MUX_AS_OUTPUT 0
|
||||||
#define AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED 1
|
#define AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED 1
|
||||||
@@ -1020,6 +1022,7 @@ void ath9k_hw_synth_delay(struct ath_hw
|
@@ -1020,6 +1022,7 @@ void ath9k_hw_synth_delay(struct ath_hw
|
||||||
bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout);
|
bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout);
|
||||||
void ath9k_hw_write_array(struct ath_hw *ah, const struct ar5416IniArray *array,
|
void ath9k_hw_write_array(struct ath_hw *ah, const struct ar5416IniArray *array,
|
||||||
int column, unsigned int *writecnt);
|
int column, unsigned int *writecnt);
|
||||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
--- a/drivers/net/wireless/ath/ath9k/ani.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
+++ b/drivers/net/wireless/ath/ath9k/ani.c
|
||||||
@@ -107,11 +107,21 @@ static const struct ani_cck_level_entry
|
@@ -107,11 +107,21 @@ static const struct ani_cck_level_entry
|
||||||
static void ath9k_hw_update_mibstats(struct ath_hw *ah,
|
static void ath9k_hw_update_mibstats(struct ath_hw *ah,
|
||||||
struct ath9k_mib_stats *stats)
|
struct ath9k_mib_stats *stats)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
|
--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
|
+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
|
||||||
@@ -772,15 +772,14 @@ static void ath9k_hw_4k_set_gain(struct
|
@@ -772,15 +772,14 @@ static void ath9k_hw_4k_set_gain(struct
|
||||||
struct ar5416_eeprom_4k *eep,
|
struct ar5416_eeprom_4k *eep,
|
||||||
u8 txRxAttenLocal)
|
u8 txRxAttenLocal)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||||
|
|
||||||
if ((eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >=
|
if ((eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >=
|
||||||
AR5416_EEP_MINOR_VER_3) {
|
AR5416_EEP_MINOR_VER_3) {
|
||||||
@@ -819,6 +818,7 @@ static void ath9k_hw_4k_set_gain(struct
|
@@ -819,6 +818,7 @@ static void ath9k_hw_4k_set_gain(struct
|
||||||
AR9280_PHY_RXGAIN_TXRX_ATTEN, txRxAttenLocal);
|
AR9280_PHY_RXGAIN_TXRX_ATTEN, txRxAttenLocal);
|
||||||
REG_RMW_FIELD(ah, AR_PHY_RXGAIN + 0x1000,
|
REG_RMW_FIELD(ah, AR_PHY_RXGAIN + 0x1000,
|
||||||
AR9280_PHY_RXGAIN_TXRX_MARGIN, pModal->rxTxMarginCh[0]);
|
AR9280_PHY_RXGAIN_TXRX_MARGIN, pModal->rxTxMarginCh[0]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/drivers/net/wireless/ath/regd.c
|
--- a/drivers/net/wireless/ath/regd.c
|
||||||
+++ b/drivers/net/wireless/ath/regd.c
|
+++ b/drivers/net/wireless/ath/regd.c
|
||||||
@@ -114,10 +114,22 @@ static const struct ieee80211_regdomain
|
@@ -114,10 +114,22 @@ static const struct ieee80211_regdomain
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||||
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||||
@@ -86,13 +86,8 @@ ath5k_add_interface(struct ieee80211_hw
|
@@ -86,13 +86,8 @@ ath5k_add_interface(struct ieee80211_hw
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
ath5k_pci_eeprom_read(struct ath_common *common, u32 offset, u16 *data)
|
ath5k_pci_eeprom_read(struct ath_common *common, u32 offset, u16 *data)
|
||||||
@@ -80,6 +81,19 @@ ath5k_pci_eeprom_read(struct ath_common
|
@@ -80,6 +81,19 @@ ath5k_pci_eeprom_read(struct ath_common
|
||||||
struct ath5k_hw *ah = (struct ath5k_hw *) common->ah;
|
struct ath5k_hw *ah = (struct ath5k_hw *) common->ah;
|
||||||
u32 status, timeout;
|
u32 status, timeout;
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
/* debugfs: queues etc */
|
/* debugfs: queues etc */
|
||||||
|
|
||||||
@@ -1010,6 +1101,9 @@ ath5k_debug_init_device(struct ath5k_hw
|
@@ -1010,6 +1101,9 @@ ath5k_debug_init_device(struct ath5k_hw
|
||||||
debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah,
|
debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah,
|
||||||
&fops_beacon);
|
&fops_beacon);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -388,13 +388,8 @@ static void ath9k_hw_init_config(struct
|
@@ -388,13 +388,8 @@ static void ath9k_hw_init_config(struct
|
||||||
|
|
||||||
ah->config.rx_intr_mitigation = true;
|
ah->config.rx_intr_mitigation = true;
|
||||||
|
|
||||||
|
|
|
@ -137,10 +137,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
/* policy for the key attributes */
|
/* policy for the key attributes */
|
||||||
@@ -2207,6 +2208,20 @@ static int nl80211_set_wiphy(struct sk_b
|
@@ -2206,6 +2207,20 @@ static int nl80211_set_wiphy(struct sk_b
|
||||||
|
if (result)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
+
|
||||||
+ if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_GAIN]) {
|
+ if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_GAIN]) {
|
||||||
+ int idx, dbi = 0;
|
+ int idx, dbi = 0;
|
||||||
+
|
+
|
||||||
|
@ -154,7 +155,6 @@
|
||||||
+ if (result)
|
+ if (result)
|
||||||
+ return result;
|
+ return result;
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] &&
|
if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] &&
|
||||||
info->attrs[NL80211_ATTR_WIPHY_ANTENNA_RX]) {
|
info->attrs[NL80211_ATTR_WIPHY_ANTENNA_RX]) {
|
||||||
u32 tx_ant, rx_ant;
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#else
|
#else
|
||||||
static inline void ath_init_leds(struct ath_softc *sc)
|
static inline void ath_init_leds(struct ath_softc *sc)
|
||||||
{
|
{
|
||||||
@@ -953,6 +956,13 @@ void ath_ant_comb_scan(struct ath_softc
|
@@ -953,6 +956,13 @@ void ath_ant_comb_scan(struct ath_softc
|
||||||
|
|
||||||
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
|
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
|
||||||
|
|
||||||
|
@ -63,7 +63,8 @@
|
||||||
+ led->cdev.name = gpio->name;
|
+ led->cdev.name = gpio->name;
|
||||||
+ led->cdev.default_trigger = gpio->default_trigger;
|
+ led->cdev.default_trigger = gpio->default_trigger;
|
||||||
+ led->cdev.brightness_set = ath_led_brightness;
|
+ led->cdev.brightness_set = ath_led_brightness;
|
||||||
+
|
|
||||||
|
- ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
|
||||||
+ ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->cdev);
|
+ ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->cdev);
|
||||||
+ if (ret < 0)
|
+ if (ret < 0)
|
||||||
+ return ret;
|
+ return ret;
|
||||||
|
@ -80,8 +81,7 @@
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
|
+
|
||||||
- ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
|
|
||||||
+int ath_create_gpio_led(struct ath_softc *sc, int gpio_num, const char *name,
|
+int ath_create_gpio_led(struct ath_softc *sc, int gpio_num, const char *name,
|
||||||
+ const char *trigger, bool active_low)
|
+ const char *trigger, bool active_low)
|
||||||
+{
|
+{
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
void ath_fill_led_pin(struct ath_softc *sc)
|
void ath_fill_led_pin(struct ath_softc *sc)
|
||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -935,7 +935,7 @@ int ath9k_init_device(u16 devid, struct
|
@@ -935,7 +935,7 @@ int ath9k_init_device(u16 devid, struct
|
||||||
|
|
||||||
#ifdef CPTCFG_MAC80211_LEDS
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
/* must be initialized before ieee80211_register_hw */
|
/* must be initialized before ieee80211_register_hw */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
||||||
@@ -693,7 +693,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
|
@@ -693,7 +693,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
|
||||||
{
|
{
|
||||||
#define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */
|
#define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Enable access to the DMA observation bus */
|
/* Enable access to the DMA observation bus */
|
||||||
@@ -723,6 +723,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
|
@@ -723,6 +723,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
void (*spectral_scan_trigger)(struct ath_hw *ah);
|
void (*spectral_scan_trigger)(struct ath_hw *ah);
|
||||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||||
@@ -1999,6 +1999,26 @@ void ar9003_hw_init_rate_txpower(struct
|
@@ -1999,6 +1999,26 @@ void ar9003_hw_init_rate_txpower(struct
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||||
const struct ath_bus_ops *bus_ops)
|
const struct ath_bus_ops *bus_ops)
|
||||||
{
|
{
|
||||||
@@ -940,6 +953,8 @@ int ath9k_init_device(u16 devid, struct
|
@@ -940,6 +953,8 @@ int ath9k_init_device(u16 devid, struct
|
||||||
ARRAY_SIZE(ath9k_tpt_blink));
|
ARRAY_SIZE(ath9k_tpt_blink));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
|
static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
|
||||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||||
@@ -1316,9 +1316,30 @@ void ar5008_hw_init_rate_txpower(struct
|
@@ -1316,9 +1316,30 @@ void ar5008_hw_init_rate_txpower(struct
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ Changes since v1: ---
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -4908,14 +4941,19 @@ static int rt2800_init_registers(struct
|
@@ -4908,14 +4941,19 @@ static int rt2800_init_registers(struct
|
||||||
/*
|
/*
|
||||||
* ASIC will keep garbage value after boot, clear encryption keys.
|
* ASIC will keep garbage value after boot, clear encryption keys.
|
||||||
*/
|
*/
|
||||||
|
@ -207,7 +207,7 @@ Changes since v1: ---
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -5041,8 +5079,10 @@ static int rt2800_wait_bbp_ready(struct
|
@@ -5041,8 +5079,10 @@ static int rt2800_wait_bbp_ready(struct
|
||||||
* BBP was enabled after firmware was loaded,
|
* BBP was enabled after firmware was loaded,
|
||||||
* but we need to reactivate it now.
|
* but we need to reactivate it now.
|
||||||
*/
|
*/
|
||||||
|
@ -372,7 +372,7 @@ Changes since v1: ---
|
||||||
#endif /* RT2800MMIO_H */
|
#endif /* RT2800MMIO_H */
|
||||||
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
|
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
|
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||||
@@ -69,7 +69,9 @@ static void rt2800pci_mcu_status(struct
|
@@ -69,7 +69,9 @@ static void rt2800pci_mcu_status(struct
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < 200; i++) {
|
for (i = 0; i < 200; i++) {
|
||||||
|
@ -382,7 +382,7 @@ Changes since v1: ---
|
||||||
|
|
||||||
if ((rt2x00_get_field32(reg, H2M_MAILBOX_CID_CMD0) == token) ||
|
if ((rt2x00_get_field32(reg, H2M_MAILBOX_CID_CMD0) == token) ||
|
||||||
(rt2x00_get_field32(reg, H2M_MAILBOX_CID_CMD1) == token) ||
|
(rt2x00_get_field32(reg, H2M_MAILBOX_CID_CMD1) == token) ||
|
||||||
@@ -83,8 +85,10 @@ static void rt2800pci_mcu_status(struct
|
@@ -83,8 +85,10 @@ static void rt2800pci_mcu_status(struct
|
||||||
if (i == 200)
|
if (i == 200)
|
||||||
rt2x00_err(rt2x00dev, "MCU request failed, no response from hardware\n");
|
rt2x00_err(rt2x00dev, "MCU request failed, no response from hardware\n");
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
u32 reg;
|
u32 reg;
|
||||||
u16 eeprom;
|
u16 eeprom;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
@@ -5003,7 +5004,7 @@ static int rt2800_init_registers(struct
|
@@ -5003,7 +5004,7 @@ static int rt2800_init_registers(struct
|
||||||
/*
|
/*
|
||||||
* Clear all beacons
|
* Clear all beacons
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -34,7 +34,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
*/
|
*/
|
||||||
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
@@ -4650,6 +4650,30 @@ static int rt2800_init_registers(struct
|
@@ -4650,6 +4650,30 @@ static int rt2800_init_registers(struct
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
#define RX_FILTER_CFG 0x1400
|
#define RX_FILTER_CFG 0x1400
|
||||||
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
@@ -5005,6 +5005,12 @@ static int rt2800_init_registers(struct
|
@@ -5005,6 +5005,12 @@ static int rt2800_init_registers(struct
|
||||||
rt2800_register_write(rt2x00dev, TX_SW_CFG2,
|
rt2800_register_write(rt2x00dev, TX_SW_CFG2,
|
||||||
0x00000000);
|
0x00000000);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
|
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
|
||||||
rt2x00_rt(rt2x00dev, RT5392) ||
|
rt2x00_rt(rt2x00dev, RT5392) ||
|
||||||
rt2x00_rt(rt2x00dev, RT5592)) {
|
rt2x00_rt(rt2x00dev, RT5592)) {
|
||||||
@@ -5035,9 +5041,11 @@ static int rt2800_init_registers(struct
|
@@ -5035,9 +5041,11 @@ static int rt2800_init_registers(struct
|
||||||
|
|
||||||
rt2800_register_read(rt2x00dev, MAX_LEN_CFG, ®);
|
rt2800_register_read(rt2x00dev, MAX_LEN_CFG, ®);
|
||||||
rt2x00_set_field32(®, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE);
|
rt2x00_set_field32(®, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE);
|
||||||
|
@ -63,7 +63,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 2);
|
rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 2);
|
||||||
else
|
else
|
||||||
rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 1);
|
rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 1);
|
||||||
@@ -5190,6 +5198,11 @@ static int rt2800_init_registers(struct
|
@@ -5190,6 +5198,11 @@ static int rt2800_init_registers(struct
|
||||||
reg = rt2x00_rt(rt2x00dev, RT5592) ? 0x00000082 : 0x00000002;
|
reg = rt2x00_rt(rt2x00dev, RT5592) ? 0x00000082 : 0x00000002;
|
||||||
rt2800_register_write(rt2x00dev, TXOP_HLDR_ET, reg);
|
rt2800_register_write(rt2x00dev, TXOP_HLDR_ET, reg);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
|
|
||||||
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
@@ -5808,6 +5808,47 @@ static void rt2800_init_bbp_3593(struct
|
@@ -5808,6 +5808,47 @@ static void rt2800_init_bbp_3593(struct
|
||||||
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
|
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,10 +110,13 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
rt2800_bbp_write(rt2x00dev, 83, 0x9a);
|
rt2800_bbp_write(rt2x00dev, 83, 0x9a);
|
||||||
|
|
||||||
if (rt2x00_has_cap_external_lna_a(rt2x00dev))
|
if (rt2x00_has_cap_external_lna_a(rt2x00dev))
|
||||||
@@ -3687,6 +3736,23 @@ static void rt2800_config_channel(struct
|
@@ -3684,6 +3733,23 @@ static void rt2800_config_channel(struct
|
||||||
usleep_range(1000, 1500);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
|
||||||
|
|
||||||
|
+ usleep_range(1000, 1500);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ if (rt2x00_rt(rt2x00dev, RT3883)) {
|
+ if (rt2x00_rt(rt2x00dev, RT3883)) {
|
||||||
+ if (!conf_is_ht40(conf))
|
+ if (!conf_is_ht40(conf))
|
||||||
+ rt2800_bbp_write(rt2x00dev, 105, 0x34);
|
+ rt2800_bbp_write(rt2x00dev, 105, 0x34);
|
||||||
|
@ -128,9 +131,6 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
+
|
+
|
||||||
+ rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
|
+ rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
|
||||||
+
|
+
|
||||||
+ usleep_range(1000, 1500);
|
usleep_range(1000, 1500);
|
||||||
+ }
|
}
|
||||||
+
|
|
||||||
if (rt2x00_rt(rt2x00dev, RT5592)) {
|
|
||||||
rt2800_bbp_write(rt2x00dev, 195, 141);
|
|
||||||
rt2800_bbp_write(rt2x00dev, 196, conf_is_ht40(conf) ? 0x10 : 0x1a);
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||||
|
|
||||||
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||||
@@ -4835,7 +4835,8 @@ static u8 rt2800_get_default_vgc(struct
|
@@ -4835,7 +4835,8 @@ static u8 rt2800_get_default_vgc(struct
|
||||||
else
|
else
|
||||||
vgc = 0x2e + rt2x00dev->lna_gain;
|
vgc = 0x2e + rt2x00dev->lna_gain;
|
||||||
} else { /* 5GHZ band */
|
} else { /* 5GHZ band */
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
case RF5360:
|
case RF5360:
|
||||||
case RF5362:
|
case RF5362:
|
||||||
case RF5370:
|
case RF5370:
|
||||||
@@ -5111,6 +5122,8 @@ static int rt2800_init_registers(struct
|
@@ -5111,6 +5122,8 @@ static int rt2800_init_registers(struct
|
||||||
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
|
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
|
||||||
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
|
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
|
||||||
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
|
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
} else {
|
} else {
|
||||||
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000000);
|
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000000);
|
||||||
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
|
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
|
||||||
@@ -5766,9 +5779,13 @@ static void rt2800_init_bbp_3352(struct
|
@@ -5766,9 +5779,13 @@ static void rt2800_init_bbp_3352(struct
|
||||||
|
|
||||||
rt2800_bbp_write(rt2x00dev, 82, 0x62);
|
rt2800_bbp_write(rt2x00dev, 82, 0x62);
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
rt2800_bbp_write(rt2x00dev, 86, 0x38);
|
rt2800_bbp_write(rt2x00dev, 86, 0x38);
|
||||||
|
|
||||||
@@ -5782,9 +5799,13 @@ static void rt2800_init_bbp_3352(struct
|
@@ -5782,9 +5799,13 @@ static void rt2800_init_bbp_3352(struct
|
||||||
|
|
||||||
rt2800_bbp_write(rt2x00dev, 104, 0x92);
|
rt2800_bbp_write(rt2x00dev, 104, 0x92);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
|
|
||||||
rt2800_bbp_write(rt2x00dev, 120, 0x50);
|
rt2800_bbp_write(rt2x00dev, 120, 0x50);
|
||||||
|
|
||||||
@@ -5809,6 +5830,13 @@ static void rt2800_init_bbp_3352(struct
|
@@ -5809,6 +5830,13 @@ static void rt2800_init_bbp_3352(struct
|
||||||
rt2800_bbp_write(rt2x00dev, 143, 0xa2);
|
rt2800_bbp_write(rt2x00dev, 143, 0xa2);
|
||||||
|
|
||||||
rt2800_bbp_write(rt2x00dev, 148, 0xc8);
|
rt2800_bbp_write(rt2x00dev, 148, 0xc8);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/drivers/net/wireless/libertas/cfg.c
|
--- a/drivers/net/wireless/libertas/cfg.c
|
||||||
+++ b/drivers/net/wireless/libertas/cfg.c
|
+++ b/drivers/net/wireless/libertas/cfg.c
|
||||||
@@ -2174,6 +2174,8 @@ int lbs_cfg_register(struct lbs_private
|
@@ -2174,6 +2174,8 @@ int lbs_cfg_register(struct lbs_private
|
||||||
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
|
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
|
||||||
wdev->wiphy->reg_notifier = lbs_reg_notifier;
|
wdev->wiphy->reg_notifier = lbs_reg_notifier;
|
||||||
|
|
||||||
|
|
|
@ -583,7 +583,7 @@
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5125,9 +5516,42 @@ static int rt2800_init_registers(struct
|
@@ -5125,9 +5516,42 @@ static int rt2800_init_registers(struct
|
||||||
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
|
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
|
||||||
rt2x00_rt(rt2x00dev, RT5392) ||
|
rt2x00_rt(rt2x00dev, RT5392) ||
|
||||||
rt2x00_rt(rt2x00dev, RT5592)) {
|
rt2x00_rt(rt2x00dev, RT5592)) {
|
||||||
|
@ -629,7 +629,7 @@
|
||||||
} else if (rt2x00_rt(rt2x00dev, RT5350)) {
|
} else if (rt2x00_rt(rt2x00dev, RT5350)) {
|
||||||
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
|
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
|
||||||
} else {
|
} else {
|
||||||
@@ -6159,6 +6583,225 @@ static void rt2800_init_bbp_5592(struct
|
@@ -6159,6 +6583,225 @@ static void rt2800_init_bbp_5592(struct
|
||||||
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
|
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue