mirror of https://github.com/hak5/openwrt-owl.git
parent
29379780a6
commit
b51a9f9248
|
@ -10,12 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=2010-12-09
|
||||
PKG_VERSION:=2010-12-16
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
|
||||
# http://wireless.kernel.org/download/compat-wireless-2.6
|
||||
PKG_MD5SUM:=94b6eaaa2c8245d1b5d6b6f16b75a701
|
||||
PKG_MD5SUM:=39196307aa67c1f19f498b570b994112
|
||||
|
||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
-CONFIG_B43_LEDS=y
|
||||
+# CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
CONFIG_B43_NPHY=y
|
||||
CONFIG_B43_PHY_N=y
|
||||
# CONFIG_B43_FORCE_PIO=y
|
||||
@@ -251,7 +251,7 @@ CONFIG_B43_NPHY=y
|
||||
@@ -251,7 +251,7 @@ CONFIG_B43_PHY_N=y
|
||||
CONFIG_B43LEGACY=m
|
||||
CONFIG_B43LEGACY_HWRNG=y
|
||||
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
endif #CONFIG_PCMCIA
|
||||
# CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
-CONFIG_B43_NPHY=y
|
||||
+# CONFIG_B43_NPHY is not set
|
||||
-CONFIG_B43_PHY_N=y
|
||||
+# CONFIG_B43_PHY_N=y
|
||||
# CONFIG_B43_FORCE_PIO=y
|
||||
# CONFIG_B43_DEBUG=y
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
err:
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -795,6 +795,8 @@ struct ath_hw {
|
||||
@@ -788,6 +788,8 @@ struct ath_hw {
|
||||
int initPDADC;
|
||||
int PDADCdelta;
|
||||
u8 led_pin;
|
||||
|
@ -47,7 +47,7 @@
|
|||
bool ath9k_hw_check_alive(struct ath_hw *ah)
|
||||
{
|
||||
int count = 50;
|
||||
@@ -1457,6 +1471,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -1459,6 +1473,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
if (AR_SREV_9300_20_OR_LATER(ah))
|
||||
ar9003_hw_bb_watchdog_config(ah);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
priv_ops->do_getnf = ar5008_hw_do_getnf;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -748,28 +748,6 @@ static void ar9003_hw_rfbus_done(struct
|
||||
@@ -745,28 +745,6 @@ static void ar9003_hw_rfbus_done(struct
|
||||
REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
|||
static void ar9003_hw_set_diversity(struct ath_hw *ah, bool value)
|
||||
{
|
||||
u32 v = REG_READ(ah, AR_PHY_CCK_DETECT);
|
||||
@@ -1206,7 +1184,6 @@ void ar9003_hw_attach_phy_ops(struct ath
|
||||
@@ -1203,7 +1181,6 @@ void ar9003_hw_attach_phy_ops(struct ath
|
||||
priv_ops->set_delta_slope = ar9003_hw_set_delta_slope;
|
||||
priv_ops->rfbus_req = ar9003_hw_rfbus_req;
|
||||
priv_ops->rfbus_done = ar9003_hw_rfbus_done;
|
||||
|
@ -66,6 +66,16 @@
|
|||
priv_ops->set_diversity = ar9003_hw_set_diversity;
|
||||
priv_ops->ani_control = ar9003_hw_ani_control;
|
||||
priv_ops->do_getnf = ar9003_hw_do_getnf;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -189,6 +189,7 @@ struct ath_txq {
|
||||
struct list_head axq_q;
|
||||
spinlock_t axq_lock;
|
||||
u32 axq_depth;
|
||||
+ u32 axq_ampdu_depth;
|
||||
bool stopped;
|
||||
bool axq_tx_inprogress;
|
||||
struct list_head axq_acq;
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw-ops.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
|
||||
@@ -223,11 +223,6 @@ static inline void ath9k_hw_rfbus_done(s
|
||||
|
@ -82,7 +92,7 @@
|
|||
if (!ath9k_hw_private_ops(ah)->restore_chainmask)
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1406,7 +1406,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -1399,7 +1399,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
ath9k_hw_init_qos(ah);
|
||||
|
||||
if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
|
||||
|
@ -101,3 +111,82 @@
|
|||
void (*restore_chainmask)(struct ath_hw *ah);
|
||||
void (*set_diversity)(struct ath_hw *ah, bool value);
|
||||
u32 (*compute_pll_control)(struct ath_hw *ah,
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -838,7 +838,7 @@ static void ath_tx_sched_aggr(struct ath
|
||||
ath_tx_txqaddbuf(sc, txq, &bf_q);
|
||||
TX_STAT_INC(txq->axq_qnum, a_aggr);
|
||||
|
||||
- } while (txq->axq_depth < ATH_AGGR_MIN_QDEPTH &&
|
||||
+ } while (txq->axq_ampdu_depth < ATH_AGGR_MIN_QDEPTH &&
|
||||
status != ATH_AGGR_BAW_CLOSED);
|
||||
}
|
||||
|
||||
@@ -999,6 +999,7 @@ struct ath_txq *ath_txq_setup(struct ath
|
||||
INIT_LIST_HEAD(&txq->axq_acq);
|
||||
spin_lock_init(&txq->axq_lock);
|
||||
txq->axq_depth = 0;
|
||||
+ txq->axq_ampdu_depth = 0;
|
||||
txq->axq_tx_inprogress = false;
|
||||
sc->tx.txqsetup |= 1<<qnum;
|
||||
|
||||
@@ -1068,6 +1069,12 @@ int ath_cabq_update(struct ath_softc *sc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static bool bf_is_ampdu_not_probing(struct ath_buf *bf)
|
||||
+{
|
||||
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(bf->bf_mpdu);
|
||||
+ return bf_isampdu(bf) && !(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Drain a given TX queue (could be Beacon or Data)
|
||||
*
|
||||
@@ -1126,7 +1133,8 @@ void ath_draintxq(struct ath_softc *sc,
|
||||
}
|
||||
|
||||
txq->axq_depth--;
|
||||
-
|
||||
+ if (bf_is_ampdu_not_probing(bf))
|
||||
+ txq->axq_ampdu_depth--;
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
if (bf_isampdu(bf))
|
||||
@@ -1316,6 +1324,8 @@ static void ath_tx_txqaddbuf(struct ath_
|
||||
ath9k_hw_txstart(ah, txq->axq_qnum);
|
||||
}
|
||||
txq->axq_depth++;
|
||||
+ if (bf_is_ampdu_not_probing(bf))
|
||||
+ txq->axq_ampdu_depth++;
|
||||
}
|
||||
|
||||
static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_atx_tid *tid,
|
||||
@@ -1336,7 +1346,7 @@ static void ath_tx_send_ampdu(struct ath
|
||||
*/
|
||||
if (!list_empty(&tid->buf_q) || tid->paused ||
|
||||
!BAW_WITHIN(tid->seq_start, tid->baw_size, fi->seqno) ||
|
||||
- txctl->txq->axq_depth >= ATH_AGGR_MIN_QDEPTH) {
|
||||
+ txctl->txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH) {
|
||||
/*
|
||||
* Add this frame to software queue for scheduling later
|
||||
* for aggregation.
|
||||
@@ -2040,6 +2050,9 @@ static void ath_tx_processq(struct ath_s
|
||||
txq->axq_tx_inprogress = false;
|
||||
if (bf_held)
|
||||
list_del(&bf_held->list);
|
||||
+
|
||||
+ if (bf_is_ampdu_not_probing(bf))
|
||||
+ txq->axq_ampdu_depth--;
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
if (bf_held)
|
||||
@@ -2168,6 +2181,8 @@ void ath_tx_edma_tasklet(struct ath_soft
|
||||
INCR(txq->txq_tailidx, ATH_TXFIFO_DEPTH);
|
||||
txq->axq_depth--;
|
||||
txq->axq_tx_inprogress = false;
|
||||
+ if (bf_is_ampdu_not_probing(bf))
|
||||
+ txq->axq_ampdu_depth--;
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
txok = !(txs.ts_status & ATH9K_TXERR_MASK);
|
|
@ -1,470 +0,0 @@
|
|||
--- a/net/mac80211/led.c
|
||||
+++ b/net/mac80211/led.c
|
||||
@@ -54,12 +54,22 @@ void ieee80211_led_radio(struct ieee8021
|
||||
led_trigger_event(local->radio_led, LED_OFF);
|
||||
}
|
||||
|
||||
+void ieee80211_led_names(struct ieee80211_local *local)
|
||||
+{
|
||||
+ snprintf(local->rx_led_name, sizeof(local->rx_led_name),
|
||||
+ "%srx", wiphy_name(local->hw.wiphy));
|
||||
+ snprintf(local->tx_led_name, sizeof(local->tx_led_name),
|
||||
+ "%stx", wiphy_name(local->hw.wiphy));
|
||||
+ snprintf(local->assoc_led_name, sizeof(local->assoc_led_name),
|
||||
+ "%sassoc", wiphy_name(local->hw.wiphy));
|
||||
+ snprintf(local->radio_led_name, sizeof(local->radio_led_name),
|
||||
+ "%sradio", wiphy_name(local->hw.wiphy));
|
||||
+}
|
||||
+
|
||||
void ieee80211_led_init(struct ieee80211_local *local)
|
||||
{
|
||||
local->rx_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL);
|
||||
if (local->rx_led) {
|
||||
- snprintf(local->rx_led_name, sizeof(local->rx_led_name),
|
||||
- "%srx", wiphy_name(local->hw.wiphy));
|
||||
local->rx_led->name = local->rx_led_name;
|
||||
if (led_trigger_register(local->rx_led)) {
|
||||
kfree(local->rx_led);
|
||||
@@ -69,8 +79,6 @@ void ieee80211_led_init(struct ieee80211
|
||||
|
||||
local->tx_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL);
|
||||
if (local->tx_led) {
|
||||
- snprintf(local->tx_led_name, sizeof(local->tx_led_name),
|
||||
- "%stx", wiphy_name(local->hw.wiphy));
|
||||
local->tx_led->name = local->tx_led_name;
|
||||
if (led_trigger_register(local->tx_led)) {
|
||||
kfree(local->tx_led);
|
||||
@@ -80,8 +88,6 @@ void ieee80211_led_init(struct ieee80211
|
||||
|
||||
local->assoc_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL);
|
||||
if (local->assoc_led) {
|
||||
- snprintf(local->assoc_led_name, sizeof(local->assoc_led_name),
|
||||
- "%sassoc", wiphy_name(local->hw.wiphy));
|
||||
local->assoc_led->name = local->assoc_led_name;
|
||||
if (led_trigger_register(local->assoc_led)) {
|
||||
kfree(local->assoc_led);
|
||||
@@ -91,14 +97,19 @@ void ieee80211_led_init(struct ieee80211
|
||||
|
||||
local->radio_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL);
|
||||
if (local->radio_led) {
|
||||
- snprintf(local->radio_led_name, sizeof(local->radio_led_name),
|
||||
- "%sradio", wiphy_name(local->hw.wiphy));
|
||||
local->radio_led->name = local->radio_led_name;
|
||||
if (led_trigger_register(local->radio_led)) {
|
||||
kfree(local->radio_led);
|
||||
local->radio_led = NULL;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (local->tpt_led_trigger) {
|
||||
+ if (led_trigger_register(&local->tpt_led_trigger->trig)) {
|
||||
+ kfree(local->tpt_led_trigger);
|
||||
+ local->tpt_led_trigger = NULL;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
void ieee80211_led_exit(struct ieee80211_local *local)
|
||||
@@ -119,15 +130,18 @@ void ieee80211_led_exit(struct ieee80211
|
||||
led_trigger_unregister(local->rx_led);
|
||||
kfree(local->rx_led);
|
||||
}
|
||||
+
|
||||
+ if (local->tpt_led_trigger) {
|
||||
+ led_trigger_unregister(&local->tpt_led_trigger->trig);
|
||||
+ kfree(local->tpt_led_trigger);
|
||||
+ }
|
||||
}
|
||||
|
||||
char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
|
||||
- if (local->radio_led)
|
||||
- return local->radio_led_name;
|
||||
- return NULL;
|
||||
+ return local->radio_led_name;
|
||||
}
|
||||
EXPORT_SYMBOL(__ieee80211_get_radio_led_name);
|
||||
|
||||
@@ -135,9 +149,7 @@ char *__ieee80211_get_assoc_led_name(str
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
|
||||
- if (local->assoc_led)
|
||||
- return local->assoc_led_name;
|
||||
- return NULL;
|
||||
+ return local->assoc_led_name;
|
||||
}
|
||||
EXPORT_SYMBOL(__ieee80211_get_assoc_led_name);
|
||||
|
||||
@@ -145,9 +157,7 @@ char *__ieee80211_get_tx_led_name(struct
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
|
||||
- if (local->tx_led)
|
||||
- return local->tx_led_name;
|
||||
- return NULL;
|
||||
+ return local->tx_led_name;
|
||||
}
|
||||
EXPORT_SYMBOL(__ieee80211_get_tx_led_name);
|
||||
|
||||
@@ -155,8 +165,115 @@ char *__ieee80211_get_rx_led_name(struct
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
|
||||
- if (local->rx_led)
|
||||
- return local->rx_led_name;
|
||||
- return NULL;
|
||||
+ return local->rx_led_name;
|
||||
}
|
||||
EXPORT_SYMBOL(__ieee80211_get_rx_led_name);
|
||||
+
|
||||
+static unsigned long tpt_trig_traffic(struct ieee80211_local *local,
|
||||
+ struct tpt_led_trigger *tpt_trig)
|
||||
+{
|
||||
+ unsigned long traffic, delta;
|
||||
+
|
||||
+ traffic = tpt_trig->tx_bytes + tpt_trig->rx_bytes;
|
||||
+
|
||||
+ delta = traffic - tpt_trig->prev_traffic;
|
||||
+ tpt_trig->prev_traffic = traffic;
|
||||
+ return DIV_ROUND_UP(delta, 1024 / 8);
|
||||
+}
|
||||
+
|
||||
+static void tpt_trig_timer(unsigned long data)
|
||||
+{
|
||||
+ struct ieee80211_local *local = (void *)data;
|
||||
+ struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger;
|
||||
+ struct led_classdev *led_cdev;
|
||||
+ unsigned long on, off, tpt;
|
||||
+ int i;
|
||||
+
|
||||
+ if (!tpt_trig->running)
|
||||
+ return;
|
||||
+
|
||||
+ mod_timer(&tpt_trig->timer, round_jiffies(jiffies + HZ));
|
||||
+
|
||||
+ tpt = tpt_trig_traffic(local, tpt_trig);
|
||||
+
|
||||
+ /* default to just solid on */
|
||||
+ on = 1;
|
||||
+ off = 0;
|
||||
+
|
||||
+ for (i = tpt_trig->blink_table_len - 1; i >= 0; i--) {
|
||||
+ if (tpt_trig->blink_table[i].throughput < 0 ||
|
||||
+ tpt > tpt_trig->blink_table[i].throughput) {
|
||||
+ off = tpt_trig->blink_table[i].blink_time / 2;
|
||||
+ on = tpt_trig->blink_table[i].blink_time - off;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ read_lock(&tpt_trig->trig.leddev_list_lock);
|
||||
+ list_for_each_entry(led_cdev, &tpt_trig->trig.led_cdevs, trig_list)
|
||||
+ led_blink_set(led_cdev, &on, &off);
|
||||
+ read_unlock(&tpt_trig->trig.leddev_list_lock);
|
||||
+}
|
||||
+
|
||||
+extern char *__ieee80211_create_tpt_led_trigger(
|
||||
+ struct ieee80211_hw *hw,
|
||||
+ const struct ieee80211_tpt_blink *blink_table,
|
||||
+ unsigned int blink_table_len)
|
||||
+{
|
||||
+ struct ieee80211_local *local = hw_to_local(hw);
|
||||
+ struct tpt_led_trigger *tpt_trig;
|
||||
+
|
||||
+ if (WARN_ON(local->tpt_led_trigger))
|
||||
+ return NULL;
|
||||
+
|
||||
+ tpt_trig = kzalloc(sizeof(struct tpt_led_trigger), GFP_KERNEL);
|
||||
+ if (!tpt_trig)
|
||||
+ return NULL;
|
||||
+
|
||||
+ snprintf(tpt_trig->name, sizeof(tpt_trig->name),
|
||||
+ "%stpt", wiphy_name(local->hw.wiphy));
|
||||
+
|
||||
+ tpt_trig->trig.name = tpt_trig->name;
|
||||
+
|
||||
+ tpt_trig->blink_table = blink_table;
|
||||
+ tpt_trig->blink_table_len = blink_table_len;
|
||||
+
|
||||
+ setup_timer(&tpt_trig->timer, tpt_trig_timer, (unsigned long)local);
|
||||
+
|
||||
+ local->tpt_led_trigger = tpt_trig;
|
||||
+
|
||||
+ return tpt_trig->name;
|
||||
+}
|
||||
+EXPORT_SYMBOL(__ieee80211_create_tpt_led_trigger);
|
||||
+
|
||||
+void ieee80211_start_tpt_led_trig(struct ieee80211_local *local)
|
||||
+{
|
||||
+ struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger;
|
||||
+
|
||||
+ if (!tpt_trig)
|
||||
+ return;
|
||||
+
|
||||
+ /* reset traffic */
|
||||
+ tpt_trig_traffic(local, tpt_trig);
|
||||
+ tpt_trig->running = true;
|
||||
+
|
||||
+ tpt_trig_timer((unsigned long)local);
|
||||
+ mod_timer(&tpt_trig->timer, round_jiffies(jiffies + HZ));
|
||||
+}
|
||||
+
|
||||
+void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local)
|
||||
+{
|
||||
+ struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger;
|
||||
+ struct led_classdev *led_cdev;
|
||||
+
|
||||
+ if (!tpt_trig)
|
||||
+ return;
|
||||
+
|
||||
+ tpt_trig->running = false;
|
||||
+ del_timer_sync(&tpt_trig->timer);
|
||||
+
|
||||
+ read_lock(&tpt_trig->trig.leddev_list_lock);
|
||||
+ list_for_each_entry(led_cdev, &tpt_trig->trig.led_cdevs, trig_list)
|
||||
+ led_brightness_set(led_cdev, LED_OFF);
|
||||
+ read_unlock(&tpt_trig->trig.leddev_list_lock);
|
||||
+}
|
||||
--- a/net/mac80211/led.h
|
||||
+++ b/net/mac80211/led.h
|
||||
@@ -12,14 +12,17 @@
|
||||
#include "ieee80211_i.h"
|
||||
|
||||
#ifdef CONFIG_MAC80211_LEDS
|
||||
-extern void ieee80211_led_rx(struct ieee80211_local *local);
|
||||
-extern void ieee80211_led_tx(struct ieee80211_local *local, int q);
|
||||
-extern void ieee80211_led_assoc(struct ieee80211_local *local,
|
||||
- bool associated);
|
||||
-extern void ieee80211_led_radio(struct ieee80211_local *local,
|
||||
- bool enabled);
|
||||
-extern void ieee80211_led_init(struct ieee80211_local *local);
|
||||
-extern void ieee80211_led_exit(struct ieee80211_local *local);
|
||||
+void ieee80211_led_rx(struct ieee80211_local *local);
|
||||
+void ieee80211_led_tx(struct ieee80211_local *local, int q);
|
||||
+void ieee80211_led_assoc(struct ieee80211_local *local,
|
||||
+ bool associated);
|
||||
+void ieee80211_led_radio(struct ieee80211_local *local,
|
||||
+ bool enabled);
|
||||
+void ieee80211_led_names(struct ieee80211_local *local);
|
||||
+void ieee80211_led_init(struct ieee80211_local *local);
|
||||
+void ieee80211_led_exit(struct ieee80211_local *local);
|
||||
+void ieee80211_start_tpt_led_trig(struct ieee80211_local *local);
|
||||
+void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local);
|
||||
#else
|
||||
static inline void ieee80211_led_rx(struct ieee80211_local *local)
|
||||
{
|
||||
@@ -35,10 +38,37 @@ static inline void ieee80211_led_radio(s
|
||||
bool enabled)
|
||||
{
|
||||
}
|
||||
+static inline void ieee80211_led_names(struct ieee80211_local *local)
|
||||
+{
|
||||
+}
|
||||
static inline void ieee80211_led_init(struct ieee80211_local *local)
|
||||
{
|
||||
}
|
||||
static inline void ieee80211_led_exit(struct ieee80211_local *local)
|
||||
{
|
||||
}
|
||||
+static inline void ieee80211_start_tpt_led_trig(struct ieee80211_local *local)
|
||||
+{
|
||||
+}
|
||||
+static inline void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local)
|
||||
+{
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static inline void
|
||||
+ieee80211_tpt_led_trig_tx(struct ieee80211_local *local, __le16 fc, int bytes)
|
||||
+{
|
||||
+#ifdef CONFIG_MAC80211_LEDS
|
||||
+ if (local->tpt_led_trigger && ieee80211_is_data(fc))
|
||||
+ local->tpt_led_trigger->tx_bytes += bytes;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static inline void
|
||||
+ieee80211_tpt_led_trig_rx(struct ieee80211_local *local, __le16 fc, int bytes)
|
||||
+{
|
||||
+#ifdef CONFIG_MAC80211_LEDS
|
||||
+ if (local->tpt_led_trigger && ieee80211_is_data(fc))
|
||||
+ local->tpt_led_trigger->rx_bytes += bytes;
|
||||
#endif
|
||||
+}
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -602,6 +602,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(
|
||||
/* init dummy netdev for use w/ NAPI */
|
||||
init_dummy_netdev(&local->napi_dev);
|
||||
|
||||
+ ieee80211_led_names(local);
|
||||
+
|
||||
return local_to_hw(local);
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_alloc_hw);
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -1856,11 +1856,26 @@ struct ieee80211_hw *ieee80211_alloc_hw(
|
||||
*/
|
||||
int ieee80211_register_hw(struct ieee80211_hw *hw);
|
||||
|
||||
+/**
|
||||
+ * struct ieee80211_tpt_blink - throughput blink description
|
||||
+ * @throughput: throughput in Kbit/sec
|
||||
+ * @blink_time: blink time in milliseconds
|
||||
+ * (full cycle, ie. one off + one on period)
|
||||
+ */
|
||||
+struct ieee80211_tpt_blink {
|
||||
+ int throughput;
|
||||
+ int blink_time;
|
||||
+};
|
||||
+
|
||||
#ifdef CONFIG_MAC80211_LEDS
|
||||
extern char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw);
|
||||
extern char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw);
|
||||
extern char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw);
|
||||
extern char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw);
|
||||
+extern char *__ieee80211_create_tpt_led_trigger(
|
||||
+ struct ieee80211_hw *hw,
|
||||
+ const struct ieee80211_tpt_blink *blink_table,
|
||||
+ unsigned int blink_table_len);
|
||||
#endif
|
||||
/**
|
||||
* ieee80211_get_tx_led_name - get name of TX LED
|
||||
@@ -1939,6 +1954,29 @@ static inline char *ieee80211_get_radio_
|
||||
}
|
||||
|
||||
/**
|
||||
+ * ieee80211_create_tpt_led_trigger - create throughput LED trigger
|
||||
+ * @hw: the hardware to create the trigger for
|
||||
+ * @blink_table: the blink table -- needs to be ordered by throughput
|
||||
+ * @blink_table_len: size of the blink table
|
||||
+ *
|
||||
+ * This function returns %NULL (in case of error, or if no LED
|
||||
+ * triggers are configured) or the name of the new trigger.
|
||||
+ * This function must be called before ieee80211_register_hw().
|
||||
+ */
|
||||
+static inline char *
|
||||
+ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw,
|
||||
+ const struct ieee80211_tpt_blink *blink_table,
|
||||
+ unsigned int blink_table_len)
|
||||
+{
|
||||
+#ifdef CONFIG_MAC80211_LEDS
|
||||
+ return __ieee80211_create_tpt_led_trigger(hw, blink_table,
|
||||
+ blink_table_len);
|
||||
+#else
|
||||
+ return NULL;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* ieee80211_unregister_hw - Unregister a hardware device
|
||||
*
|
||||
* This function instructs mac80211 to free allocated resources
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/etherdevice.h>
|
||||
+#include <linux/leds.h>
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/mac80211.h>
|
||||
@@ -629,6 +630,19 @@ enum queue_stop_reason {
|
||||
IEEE80211_QUEUE_STOP_REASON_SKB_ADD,
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_MAC80211_LEDS
|
||||
+struct tpt_led_trigger {
|
||||
+ struct led_trigger trig;
|
||||
+ char name[32];
|
||||
+ const struct ieee80211_tpt_blink *blink_table;
|
||||
+ unsigned int blink_table_len;
|
||||
+ struct timer_list timer;
|
||||
+ bool running;
|
||||
+ unsigned long prev_traffic;
|
||||
+ unsigned long tx_bytes, rx_bytes;
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
/**
|
||||
* mac80211 scan flags - currently active scan mode
|
||||
*
|
||||
@@ -842,6 +856,7 @@ struct ieee80211_local {
|
||||
#ifdef CONFIG_MAC80211_LEDS
|
||||
int tx_led_counter, rx_led_counter;
|
||||
struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led;
|
||||
+ struct tpt_led_trigger *tpt_led_trigger;
|
||||
char tx_led_name[32], rx_led_name[32],
|
||||
assoc_led_name[32], radio_led_name[32];
|
||||
#endif
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -220,6 +220,7 @@ static int ieee80211_do_open(struct net_
|
||||
/* we're brought up, everything changes */
|
||||
hw_reconf_flags = ~0;
|
||||
ieee80211_led_radio(local, true);
|
||||
+ ieee80211_start_tpt_led_trig(local);
|
||||
}
|
||||
|
||||
/*
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2888,6 +2888,9 @@ void ieee80211_rx(struct ieee80211_hw *h
|
||||
return;
|
||||
}
|
||||
|
||||
+ ieee80211_tpt_led_trig_rx(local,
|
||||
+ ((struct ieee80211_hdr *)skb->data)->frame_control,
|
||||
+ skb->len);
|
||||
__ieee80211_rx_handle_packet(hw, skb);
|
||||
|
||||
rcu_read_unlock();
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1293,6 +1293,7 @@ static int __ieee80211_tx(struct ieee802
|
||||
|
||||
while (skb) {
|
||||
int q = skb_get_queue_mapping(skb);
|
||||
+ __le16 fc;
|
||||
|
||||
spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
|
||||
ret = IEEE80211_TX_OK;
|
||||
@@ -1335,6 +1336,7 @@ static int __ieee80211_tx(struct ieee802
|
||||
else
|
||||
info->control.sta = NULL;
|
||||
|
||||
+ fc = ((struct ieee80211_hdr *)skb->data)->frame_control;
|
||||
ret = drv_tx(local, skb);
|
||||
if (WARN_ON(ret != NETDEV_TX_OK && skb->len != len)) {
|
||||
dev_kfree_skb(skb);
|
||||
@@ -1345,6 +1347,7 @@ static int __ieee80211_tx(struct ieee802
|
||||
return IEEE80211_TX_AGAIN;
|
||||
}
|
||||
|
||||
+ ieee80211_tpt_led_trig_tx(local, fc, len);
|
||||
*skbp = skb = next;
|
||||
ieee80211_led_tx(local, 1);
|
||||
fragm = true;
|
||||
--- a/net/mac80211/util.c
|
||||
+++ b/net/mac80211/util.c
|
||||
@@ -1141,6 +1141,7 @@ u32 ieee80211_sta_get_rates(struct ieee8
|
||||
void ieee80211_stop_device(struct ieee80211_local *local)
|
||||
{
|
||||
ieee80211_led_radio(local, false);
|
||||
+ ieee80211_stop_tpt_led_trig(local);
|
||||
|
||||
cancel_work_sync(&local->reconfig_filter);
|
||||
|
||||
@@ -1175,6 +1176,7 @@ int ieee80211_reconfig(struct ieee80211_
|
||||
}
|
||||
|
||||
ieee80211_led_radio(local, true);
|
||||
+ ieee80211_start_tpt_led_trig(local);
|
||||
}
|
||||
|
||||
/* add interfaces */
|
|
@ -1,80 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -1685,17 +1685,20 @@ static void ath_tx_start_dma(struct ath_
|
||||
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
struct list_head bf_head;
|
||||
- struct ath_atx_tid *tid;
|
||||
+ struct ath_atx_tid *tid = NULL;
|
||||
u8 tidno;
|
||||
|
||||
spin_lock_bh(&txctl->txq->axq_lock);
|
||||
|
||||
- if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && txctl->an) {
|
||||
+ if (ieee80211_is_data_qos(hdr->frame_control) && txctl->an) {
|
||||
tidno = ieee80211_get_qos_ctl(hdr)[0] &
|
||||
IEEE80211_QOS_CTL_TID_MASK;
|
||||
tid = ATH_AN_2_TID(txctl->an, tidno);
|
||||
|
||||
WARN_ON(tid->ac->txq != txctl->txq);
|
||||
+ }
|
||||
+
|
||||
+ if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
|
||||
/*
|
||||
* Try aggregation if it's a unicast data frame
|
||||
* and the destination is HT capable.
|
||||
@@ -1712,7 +1715,7 @@ static void ath_tx_start_dma(struct ath_
|
||||
ar9003_hw_set_paprd_txdesc(sc->sc_ah, bf->bf_desc,
|
||||
bf->bf_state.bfs_paprd);
|
||||
|
||||
- ath_tx_send_normal(sc, txctl->txq, NULL, &bf_head);
|
||||
+ ath_tx_send_normal(sc, txctl->txq, tid, &bf_head);
|
||||
}
|
||||
|
||||
spin_unlock_bh(&txctl->txq->axq_lock);
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -284,11 +284,9 @@ static void ath9k_hw_read_revisions(stru
|
||||
|
||||
static void ath9k_hw_disablepcie(struct ath_hw *ah)
|
||||
{
|
||||
- if (AR_SREV_9100(ah))
|
||||
+ if (!AR_SREV_5416(ah))
|
||||
return;
|
||||
|
||||
- ENABLE_REGWRITE_BUFFER(ah);
|
||||
-
|
||||
REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fc00);
|
||||
REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
|
||||
REG_WRITE(ah, AR_PCIE_SERDES, 0x28000029);
|
||||
@@ -300,8 +298,6 @@ static void ath9k_hw_disablepcie(struct
|
||||
REG_WRITE(ah, AR_PCIE_SERDES, 0x000e1007);
|
||||
|
||||
REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
|
||||
-
|
||||
- REGWRITE_BUFFER_FLUSH(ah);
|
||||
}
|
||||
|
||||
/* This should work for all families including legacy */
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1940,7 +1940,9 @@ static u64 ath9k_get_tsf(struct ieee8021
|
||||
struct ath_softc *sc = aphy->sc;
|
||||
|
||||
mutex_lock(&sc->mutex);
|
||||
+ ath9k_ps_wakeup(sc);
|
||||
tsf = ath9k_hw_gettsf64(sc->sc_ah);
|
||||
+ ath9k_ps_restore(sc);
|
||||
mutex_unlock(&sc->mutex);
|
||||
|
||||
return tsf;
|
||||
@@ -1952,7 +1954,9 @@ static void ath9k_set_tsf(struct ieee802
|
||||
struct ath_softc *sc = aphy->sc;
|
||||
|
||||
mutex_lock(&sc->mutex);
|
||||
+ ath9k_ps_wakeup(sc);
|
||||
ath9k_hw_settsf64(sc->sc_ah, tsf);
|
||||
+ ath9k_ps_restore(sc);
|
||||
mutex_unlock(&sc->mutex);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +0,0 @@
|
|||
--- a/net/mac80211/driver-ops.h
|
||||
+++ b/net/mac80211/driver-ops.h
|
||||
@@ -381,7 +381,7 @@ static inline void drv_reset_tsf(struct
|
||||
|
||||
static inline int drv_tx_last_beacon(struct ieee80211_local *local)
|
||||
{
|
||||
- int ret = 1;
|
||||
+ int ret = 0; /* default unsuported op for less congestion */
|
||||
|
||||
might_sleep();
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
if (!wiphy->bands[IEEE80211_BAND_5GHZ])
|
||||
return;
|
||||
|
||||
@@ -449,6 +461,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||
@@ -457,6 +469,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||
{
|
||||
const struct ieee80211_regdomain *regd;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "ath9k.h"
|
||||
|
||||
@@ -522,6 +523,7 @@ static void ath9k_init_misc(struct ath_s
|
||||
@@ -526,6 +527,7 @@ static void ath9k_init_misc(struct ath_s
|
||||
static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
|
@ -26,7 +26,7 @@
|
|||
struct ath_hw *ah = NULL;
|
||||
struct ath_common *common;
|
||||
int ret = 0, i;
|
||||
@@ -535,7 +537,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -539,7 +541,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
ah->hw_version.subsysid = subsysid;
|
||||
sc->sc_ah = ah;
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
|||
ah->ah_flags |= AH_USE_EEPROM;
|
||||
|
||||
common = ath9k_hw_common(ah);
|
||||
@@ -568,6 +570,9 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -572,6 +574,9 @@ static int ath9k_init_softc(u16 devid, s
|
||||
if (ret)
|
||||
goto err_hw;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -537,8 +537,14 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -541,8 +541,14 @@ static int ath9k_init_softc(u16 devid, s
|
||||
ah->hw_version.subsysid = subsysid;
|
||||
sc->sc_ah = ah;
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
common->ops = &ath9k_common_ops;
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -787,7 +787,7 @@ struct ath_hw {
|
||||
@@ -786,7 +786,7 @@ struct ath_hw {
|
||||
u32 originalGain[22];
|
||||
int initPDADC;
|
||||
int PDADCdelta;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -438,26 +438,20 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
@@ -441,26 +441,20 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
|
||||
#define ATH_LED_PIN_DEF 1
|
||||
#define ATH_LED_PIN_9287 8
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
/* Antenna diversity/combining */
|
||||
#define ATH_ANT_RX_CURRENT_SHIFT 4
|
||||
@@ -608,15 +602,11 @@ struct ath_softc {
|
||||
@@ -611,15 +605,11 @@ struct ath_softc {
|
||||
struct ath_beacon beacon;
|
||||
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
|
||||
|
||||
|
@ -253,7 +253,7 @@
|
|||
/* Rfkill */
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1275,9 +1275,6 @@ static void ath9k_stop(struct ieee80211_
|
||||
@@ -1295,9 +1295,6 @@ static void ath9k_stop(struct ieee80211_
|
||||
|
||||
aphy->state = ATH_WIPHY_INACTIVE;
|
||||
|
||||
|
@ -265,7 +265,7 @@
|
|||
cancel_work_sync(&sc->hw_check_work);
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -139,6 +139,21 @@ static struct ieee80211_rate ath9k_legac
|
||||
@@ -143,6 +143,21 @@ static struct ieee80211_rate ath9k_legac
|
||||
RATE(540, 0x0c, 0),
|
||||
};
|
||||
|
||||
|
@ -287,14 +287,15 @@
|
|||
static void ath9k_deinit_softc(struct ath_softc *sc);
|
||||
|
||||
/*
|
||||
@@ -742,6 +757,12 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -746,6 +761,13 @@ int ath9k_init_device(u16 devid, struct
|
||||
|
||||
ath9k_init_txpower_limits(sc);
|
||||
|
||||
+#ifdef CONFIG_MAC80211_LEDS
|
||||
+ /* must be initialized before ieee80211_register_hw */
|
||||
+ sc->led_cdev.default_trigger = ieee80211_create_tpt_led_trigger(sc->hw,
|
||||
+ ath9k_tpt_blink, ARRAY_SIZE(ath9k_tpt_blink));
|
||||
+ IEEE80211_TPT_LEDTRIG_FL_RADIO, ath9k_tpt_blink,
|
||||
+ ARRAY_SIZE(ath9k_tpt_blink));
|
||||
+#endif
|
||||
+
|
||||
/* Register with mac80211 */
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||
@@ -4762,6 +4762,7 @@ static void ath9k_hw_ar9300_set_txpower(
|
||||
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
|
||||
+ struct ar9300_modal_eep_header *modal_hdr;
|
||||
u8 targetPowerValT2[ar9300RateSize];
|
||||
u8 target_power_val_t2_eep[ar9300RateSize];
|
||||
unsigned int i = 0, paprd_scale_factor = 0;
|
||||
@@ -4771,15 +4772,17 @@ static void ath9k_hw_ar9300_set_txpower(
|
||||
|
||||
if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) {
|
||||
if (IS_CHAN_2GHZ(chan))
|
||||
- ah->paprd_ratemask = (IS_CHAN_HT40(chan) ?
|
||||
- le32_to_cpu(eep->modalHeader2G.papdRateMaskHt40) :
|
||||
- le32_to_cpu(eep->modalHeader2G.papdRateMaskHt20))
|
||||
- & AR9300_PAPRD_RATE_MASK;
|
||||
+ modal_hdr = &eep->modalHeader2G;
|
||||
else
|
||||
- ah->paprd_ratemask = (IS_CHAN_HT40(chan) ?
|
||||
- le32_to_cpu(eep->modalHeader5G.papdRateMaskHt40) :
|
||||
- le32_to_cpu(eep->modalHeader5G.papdRateMaskHt20))
|
||||
- & AR9300_PAPRD_RATE_MASK;
|
||||
+ modal_hdr = &eep->modalHeader5G;
|
||||
+
|
||||
+ ah->paprd_ratemask =
|
||||
+ le32_to_cpu(modal_hdr->papdRateMaskHt20) &
|
||||
+ AR9300_PAPRD_RATE_MASK;
|
||||
+
|
||||
+ ah->paprd_ratemask_ht40 =
|
||||
+ le32_to_cpu(modal_hdr->papdRateMaskHt40) &
|
||||
+ AR9300_PAPRD_RATE_MASK;
|
||||
|
||||
paprd_scale_factor = ar9003_get_paprd_scale_factor(ah, chan);
|
||||
min_pwridx = IS_CHAN_HT40(chan) ? ALL_TARGET_HT40_0_8_16 :
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
@@ -134,7 +134,7 @@ static int ar9003_paprd_setup_single_tab
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2PM, AR_PHY_PAPRD_AM2PM_MASK,
|
||||
ah->paprd_ratemask);
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_HT40, AR_PHY_PAPRD_HT40_MASK,
|
||||
- AR_PHY_PAPRD_HT40_MASK);
|
||||
+ ah->paprd_ratemask_ht40);
|
||||
|
||||
for (i = 0; i < ah->caps.max_txchains; i++) {
|
||||
REG_RMW_FIELD(ah, ctrl0[i],
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -837,6 +837,7 @@ struct ath_hw {
|
||||
unsigned int paprd_target_power;
|
||||
unsigned int paprd_training_power;
|
||||
unsigned int paprd_ratemask;
|
||||
+ unsigned int paprd_ratemask_ht40;
|
||||
bool paprd_table_write_done;
|
||||
u32 paprd_gain_table_entries[PAPRD_GAIN_TABLE_ENTRIES];
|
||||
u8 paprd_gain_table_index[PAPRD_GAIN_TABLE_ENTRIES];
|
|
@ -1,11 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -409,7 +409,7 @@ static void ath9k_hw_init_defaults(struc
|
||||
AR_STA_ID1_CRPT_MIC_ENABLE |
|
||||
AR_STA_ID1_MCAST_KSRCH;
|
||||
ah->enable_32kHz_clock = DONT_USE_32KHZ;
|
||||
- ah->slottime = (u32) -1;
|
||||
+ ah->slottime = 9;
|
||||
ah->globaltxtimeout = (u32) -1;
|
||||
ah->power_mode = ATH9K_PM_UNDEFINED;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -817,7 +817,7 @@ void ath9k_hw_init_global_settings(struc
|
||||
if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ)
|
||||
acktimeout += 64 - sifstime - ah->slottime;
|
||||
|
||||
- ath9k_hw_setslottime(ah, slottime);
|
||||
+ ath9k_hw_setslottime(ah, ah->slottime);
|
||||
ath9k_hw_set_ack_timeout(ah, acktimeout);
|
||||
ath9k_hw_set_cts_timeout(ah, acktimeout);
|
||||
if (ah->globaltxtimeout != (u32) -1)
|
|
@ -0,0 +1,28 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -81,11 +81,10 @@ static ssize_t read_file_tx_chainmask(st
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct ath_softc *sc = file->private_data;
|
||||
- struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
char buf[32];
|
||||
unsigned int len;
|
||||
|
||||
- len = sprintf(buf, "0x%08x\n", common->tx_chainmask);
|
||||
+ len = sprintf(buf, "0x%08x\n", sc->sc_ah->caps.tx_chainmask);
|
||||
return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
||||
}
|
||||
|
||||
@@ -124,11 +123,10 @@ static ssize_t read_file_rx_chainmask(st
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct ath_softc *sc = file->private_data;
|
||||
- struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
char buf[32];
|
||||
unsigned int len;
|
||||
|
||||
- len = sprintf(buf, "0x%08x\n", common->rx_chainmask);
|
||||
+ len = sprintf(buf, "0x%08x\n", sc->sc_ah->caps.rx_chainmask);
|
||||
return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
||||
}
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -320,6 +320,42 @@ static void ath_paprd_activate(struct at
|
||||
ath9k_ps_restore(sc);
|
||||
}
|
||||
|
||||
+static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int chain)
|
||||
+{
|
||||
+ struct ieee80211_hw *hw = sc->hw;
|
||||
+ struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
||||
+ struct ath_tx_control txctl;
|
||||
+ int time_left;
|
||||
+
|
||||
+ memset(&txctl, 0, sizeof(txctl));
|
||||
+ txctl.txq = sc->tx.txq_map[WME_AC_BE];
|
||||
+
|
||||
+ memset(tx_info, 0, sizeof(*tx_info));
|
||||
+ tx_info->band = hw->conf.channel->band;
|
||||
+ tx_info->flags |= IEEE80211_TX_CTL_NO_ACK;
|
||||
+ tx_info->control.rates[0].idx = 0;
|
||||
+ tx_info->control.rates[0].count = 1;
|
||||
+ tx_info->control.rates[0].flags = IEEE80211_TX_RC_MCS;
|
||||
+ tx_info->control.rates[1].idx = -1;
|
||||
+
|
||||
+ init_completion(&sc->paprd_complete);
|
||||
+ sc->paprd_pending = true;
|
||||
+ txctl.paprd = BIT(chain);
|
||||
+ if (ath_tx_start(hw, skb, &txctl) != 0)
|
||||
+ return false;
|
||||
+
|
||||
+ time_left = wait_for_completion_timeout(&sc->paprd_complete,
|
||||
+ msecs_to_jiffies(ATH_PAPRD_TIMEOUT));
|
||||
+ sc->paprd_pending = false;
|
||||
+
|
||||
+ if (!time_left)
|
||||
+ ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_CALIBRATE,
|
||||
+ "Timeout waiting for paprd training on TX chain %d\n",
|
||||
+ chain);
|
||||
+
|
||||
+ return !!time_left;
|
||||
+}
|
||||
+
|
||||
void ath_paprd_calibrate(struct work_struct *work)
|
||||
{
|
||||
struct ath_softc *sc = container_of(work, struct ath_softc, paprd_work);
|
||||
@@ -327,18 +363,12 @@ void ath_paprd_calibrate(struct work_str
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct sk_buff *skb = NULL;
|
||||
- struct ieee80211_tx_info *tx_info;
|
||||
- int band = hw->conf.channel->band;
|
||||
- struct ieee80211_supported_band *sband = &sc->sbands[band];
|
||||
- struct ath_tx_control txctl;
|
||||
struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
int ftype;
|
||||
int chain_ok = 0;
|
||||
int chain;
|
||||
int len = 1800;
|
||||
- int time_left;
|
||||
- int i;
|
||||
|
||||
if (!caldata)
|
||||
return;
|
||||
@@ -347,8 +377,6 @@ void ath_paprd_calibrate(struct work_str
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
- tx_info = IEEE80211_SKB_CB(skb);
|
||||
-
|
||||
skb_put(skb, len);
|
||||
memset(skb->data, 0, len);
|
||||
hdr = (struct ieee80211_hdr *)skb->data;
|
||||
@@ -359,9 +387,6 @@ void ath_paprd_calibrate(struct work_str
|
||||
memcpy(hdr->addr2, hw->wiphy->perm_addr, ETH_ALEN);
|
||||
memcpy(hdr->addr3, hw->wiphy->perm_addr, ETH_ALEN);
|
||||
|
||||
- memset(&txctl, 0, sizeof(txctl));
|
||||
- txctl.txq = sc->tx.txq_map[WME_AC_BE];
|
||||
-
|
||||
ath9k_ps_wakeup(sc);
|
||||
ar9003_paprd_init_table(ah);
|
||||
for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
|
||||
@@ -369,30 +394,19 @@ void ath_paprd_calibrate(struct work_str
|
||||
continue;
|
||||
|
||||
chain_ok = 0;
|
||||
- memset(tx_info, 0, sizeof(*tx_info));
|
||||
- tx_info->band = band;
|
||||
|
||||
- for (i = 0; i < 4; i++) {
|
||||
- tx_info->control.rates[i].idx = sband->n_bitrates - 1;
|
||||
- tx_info->control.rates[i].count = 6;
|
||||
- }
|
||||
+ ath_dbg(common, ATH_DBG_CALIBRATE,
|
||||
+ "Sending PAPRD frame for thermal measurement "
|
||||
+ "on chain %d\n", chain);
|
||||
+ if (!ath_paprd_send_frame(sc, skb, chain))
|
||||
+ goto fail_paprd;
|
||||
|
||||
- init_completion(&sc->paprd_complete);
|
||||
- sc->paprd_pending = true;
|
||||
ar9003_paprd_setup_gain_table(ah, chain);
|
||||
- txctl.paprd = BIT(chain);
|
||||
- if (ath_tx_start(hw, skb, &txctl) != 0)
|
||||
- break;
|
||||
|
||||
- time_left = wait_for_completion_timeout(&sc->paprd_complete,
|
||||
- msecs_to_jiffies(ATH_PAPRD_TIMEOUT));
|
||||
- sc->paprd_pending = false;
|
||||
- if (!time_left) {
|
||||
- ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE,
|
||||
- "Timeout waiting for paprd training on TX chain %d\n",
|
||||
- chain);
|
||||
+ ath_dbg(common, ATH_DBG_CALIBRATE,
|
||||
+ "Sending PAPRD training frame on chain %d\n", chain);
|
||||
+ if (!ath_paprd_send_frame(sc, skb, chain))
|
||||
goto fail_paprd;
|
||||
- }
|
||||
|
||||
if (!ar9003_paprd_is_done(ah))
|
||||
break;
|
|
@ -1,28 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
|
||||
@@ -31,6 +31,12 @@
|
||||
#define AR9300_ANT_16S 25
|
||||
#define AR9300_FUTURE_MODAL_SZ 6
|
||||
|
||||
+#define AR9300_PAPRD_RATE_MASK 0x01ffffff
|
||||
+#define AR9300_PAPRD_SCALE_1 0x0e000000
|
||||
+#define AR9300_PAPRD_SCALE_1_S 25
|
||||
+#define AR9300_PAPRD_SCALE_2 0x70000000
|
||||
+#define AR9300_PAPRD_SCALE_2_S 28
|
||||
+
|
||||
/* Delta from which to start power to pdadc table */
|
||||
/* This offset is used in both open loop and closed loop power control
|
||||
* schemes. In open loop power control, it is not really needed, but for
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
@@ -52,8 +52,8 @@ static void ar9003_paprd_setup_single_ta
|
||||
else
|
||||
hdr = &eep->modalHeader2G;
|
||||
|
||||
- am_mask = le32_to_cpu(hdr->papdRateMaskHt20);
|
||||
- ht40_mask = le32_to_cpu(hdr->papdRateMaskHt40);
|
||||
+ am_mask = le32_to_cpu(hdr->papdRateMaskHt20) & AR9300_PAPRD_RATE_MASK;
|
||||
+ ht40_mask = le32_to_cpu(hdr->papdRateMaskHt40) & AR9300_PAPRD_RATE_MASK;
|
||||
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2AM, AR_PHY_PAPRD_AM2AM_MASK, am_mask);
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2PM, AR_PHY_PAPRD_AM2PM_MASK, am_mask);
|
|
@ -1,233 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
@@ -30,9 +30,69 @@ void ar9003_paprd_enable(struct ath_hw *
|
||||
}
|
||||
EXPORT_SYMBOL(ar9003_paprd_enable);
|
||||
|
||||
-static void ar9003_paprd_setup_single_table(struct ath_hw *ah)
|
||||
+static int ar9003_get_training_power_2g(struct ath_hw *ah)
|
||||
{
|
||||
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
|
||||
+ struct ar9300_modal_eep_header *hdr = &eep->modalHeader2G;
|
||||
+ unsigned int power, scale, delta;
|
||||
+
|
||||
+ scale = MS(le32_to_cpu(hdr->papdRateMaskHt20), AR9300_PAPRD_SCALE_1);
|
||||
+ power = REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE5,
|
||||
+ AR_PHY_POWERTX_RATE5_POWERTXHT20_0);
|
||||
+
|
||||
+ delta = abs((int) ah->paprd_target_power - (int) power);
|
||||
+ if (delta > scale)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (delta < 4)
|
||||
+ power -= 4 - delta;
|
||||
+
|
||||
+ return power;
|
||||
+}
|
||||
+
|
||||
+static int get_streams(int mask)
|
||||
+{
|
||||
+ return !!(mask & BIT(0)) + !!(mask & BIT(1)) + !!(mask & BIT(2));
|
||||
+}
|
||||
+
|
||||
+static int ar9003_get_training_power_5g(struct ath_hw *ah)
|
||||
+{
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
|
||||
+ struct ar9300_modal_eep_header *hdr = &eep->modalHeader5G;
|
||||
+ struct ath9k_channel *chan = ah->curchan;
|
||||
+ unsigned int power, scale, delta;
|
||||
+
|
||||
+ if (chan->channel >= 5700)
|
||||
+ scale = MS(le32_to_cpu(hdr->papdRateMaskHt20),
|
||||
+ AR9300_PAPRD_SCALE_1);
|
||||
+ else if (chan->channel >= 5400)
|
||||
+ scale = MS(le32_to_cpu(hdr->papdRateMaskHt40),
|
||||
+ AR9300_PAPRD_SCALE_2);
|
||||
+ else
|
||||
+ scale = MS(le32_to_cpu(hdr->papdRateMaskHt40),
|
||||
+ AR9300_PAPRD_SCALE_1);
|
||||
+
|
||||
+ if (IS_CHAN_HT40(chan))
|
||||
+ power = REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE8,
|
||||
+ AR_PHY_POWERTX_RATE8_POWERTXHT40_5);
|
||||
+ else
|
||||
+ power = REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE6,
|
||||
+ AR_PHY_POWERTX_RATE6_POWERTXHT20_5);
|
||||
+
|
||||
+ power += scale;
|
||||
+ delta = abs((int) ah->paprd_target_power - (int) power);
|
||||
+ if (delta > scale)
|
||||
+ return -1;
|
||||
+
|
||||
+ power += 2 * get_streams(common->tx_chainmask);
|
||||
+ return power;
|
||||
+}
|
||||
+
|
||||
+static int ar9003_paprd_setup_single_table(struct ath_hw *ah)
|
||||
+{
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
|
||||
struct ar9300_modal_eep_header *hdr;
|
||||
static const u32 ctrl0[3] = {
|
||||
AR_PHY_PAPRD_CTRL0_B0,
|
||||
@@ -45,6 +105,7 @@ static void ar9003_paprd_setup_single_ta
|
||||
AR_PHY_PAPRD_CTRL1_B2
|
||||
};
|
||||
u32 am_mask, ht40_mask;
|
||||
+ int training_power;
|
||||
int i;
|
||||
|
||||
if (ah->curchan && IS_CHAN_5GHZ(ah->curchan))
|
||||
@@ -55,11 +116,25 @@ static void ar9003_paprd_setup_single_ta
|
||||
am_mask = le32_to_cpu(hdr->papdRateMaskHt20) & AR9300_PAPRD_RATE_MASK;
|
||||
ht40_mask = le32_to_cpu(hdr->papdRateMaskHt40) & AR9300_PAPRD_RATE_MASK;
|
||||
|
||||
+ if (IS_CHAN_2GHZ(ah->curchan))
|
||||
+ training_power = ar9003_get_training_power_2g(ah);
|
||||
+ else
|
||||
+ training_power = ar9003_get_training_power_5g(ah);
|
||||
+
|
||||
+ if (training_power < 0) {
|
||||
+ ath_dbg(common, ATH_DBG_CALIBRATE,
|
||||
+ "PAPRD target power delta out of range");
|
||||
+ return -ERANGE;
|
||||
+ }
|
||||
+ ah->paprd_training_power = training_power;
|
||||
+ ath_dbg(common, ATH_DBG_CALIBRATE,
|
||||
+ "Training power: %d, Target power: %d\n",
|
||||
+ ah->paprd_training_power, ah->paprd_target_power);
|
||||
+
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2AM, AR_PHY_PAPRD_AM2AM_MASK, am_mask);
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2PM, AR_PHY_PAPRD_AM2PM_MASK, am_mask);
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_HT40, AR_PHY_PAPRD_HT40_MASK, ht40_mask);
|
||||
|
||||
-
|
||||
for (i = 0; i < ah->caps.max_txchains; i++) {
|
||||
REG_RMW_FIELD(ah, ctrl0[i],
|
||||
AR_PHY_PAPRD_CTRL0_USE_SINGLE_TABLE_MASK, 1);
|
||||
@@ -141,6 +216,7 @@ static void ar9003_paprd_setup_single_ta
|
||||
AR_PHY_PAPRD_PRE_POST_SCALING, 185706);
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_PRE_POST_SCALE_7_B0,
|
||||
AR_PHY_PAPRD_PRE_POST_SCALING, 175487);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static void ar9003_paprd_get_gain_table(struct ath_hw *ah)
|
||||
@@ -595,15 +671,10 @@ void ar9003_paprd_populate_single_table(
|
||||
{
|
||||
u32 *paprd_table_val = caldata->pa_table[chain];
|
||||
u32 small_signal_gain = caldata->small_signal_gain[chain];
|
||||
- u32 training_power;
|
||||
+ u32 training_power = ah->paprd_training_power;
|
||||
u32 reg = 0;
|
||||
int i;
|
||||
|
||||
- training_power =
|
||||
- REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE5,
|
||||
- AR_PHY_POWERTX_RATE5_POWERTXHT20_0);
|
||||
- training_power -= 4;
|
||||
-
|
||||
if (chain == 0)
|
||||
reg = AR_PHY_PAPRD_MEM_TAB_B0;
|
||||
else if (chain == 1)
|
||||
@@ -643,14 +714,8 @@ EXPORT_SYMBOL(ar9003_paprd_populate_sing
|
||||
|
||||
int ar9003_paprd_setup_gain_table(struct ath_hw *ah, int chain)
|
||||
{
|
||||
-
|
||||
unsigned int i, desired_gain, gain_index;
|
||||
- unsigned int train_power;
|
||||
-
|
||||
- train_power = REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE5,
|
||||
- AR_PHY_POWERTX_RATE5_POWERTXHT20_0);
|
||||
-
|
||||
- train_power = train_power - 4;
|
||||
+ unsigned int train_power = ah->paprd_training_power;
|
||||
|
||||
desired_gain = ar9003_get_desired_gain(ah, chain, train_power);
|
||||
|
||||
@@ -716,7 +781,12 @@ EXPORT_SYMBOL(ar9003_paprd_create_curve)
|
||||
|
||||
int ar9003_paprd_init_table(struct ath_hw *ah)
|
||||
{
|
||||
- ar9003_paprd_setup_single_table(ah);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = ar9003_paprd_setup_single_table(ah);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
ar9003_paprd_get_gain_table(ah);
|
||||
return 0;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -835,6 +835,8 @@ struct ath_hw {
|
||||
u32 bb_watchdog_last_status;
|
||||
u32 bb_watchdog_timeout_ms; /* in ms, 0 to disable */
|
||||
|
||||
+ unsigned int paprd_target_power;
|
||||
+ unsigned int paprd_training_power;
|
||||
u32 paprd_gain_table_entries[PAPRD_GAIN_TABLE_ENTRIES];
|
||||
u8 paprd_gain_table_index[PAPRD_GAIN_TABLE_ENTRIES];
|
||||
/*
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
|
||||
@@ -1090,6 +1090,14 @@
|
||||
#define AR_PHY_POWERTX_RATE5_POWERTXHT20_0 0x3F
|
||||
#define AR_PHY_POWERTX_RATE5_POWERTXHT20_0_S 0
|
||||
|
||||
+#define AR_PHY_POWERTX_RATE6 (AR_SM_BASE + 0x1d4)
|
||||
+#define AR_PHY_POWERTX_RATE6_POWERTXHT20_5 0x3F00
|
||||
+#define AR_PHY_POWERTX_RATE6_POWERTXHT20_5_S 8
|
||||
+
|
||||
+#define AR_PHY_POWERTX_RATE8 (AR_SM_BASE + 0x1dc)
|
||||
+#define AR_PHY_POWERTX_RATE8_POWERTXHT40_5 0x3F00
|
||||
+#define AR_PHY_POWERTX_RATE8_POWERTXHT40_5_S 8
|
||||
+
|
||||
void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx);
|
||||
|
||||
#endif /* AR9003_PHY_H */
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||
@@ -4798,6 +4798,19 @@ static void ath9k_hw_ar9300_set_txpower(
|
||||
/* Write target power array to registers */
|
||||
ar9003_hw_tx_power_regwrite(ah, targetPowerValT2);
|
||||
ar9003_hw_calibration_apply(ah, chan->channel);
|
||||
+
|
||||
+ if (IS_CHAN_2GHZ(chan)) {
|
||||
+ if (IS_CHAN_HT40(chan))
|
||||
+ i = ALL_TARGET_HT40_0_8_16;
|
||||
+ else
|
||||
+ i = ALL_TARGET_HT20_0_8_16;
|
||||
+ } else {
|
||||
+ if (IS_CHAN_HT40(chan))
|
||||
+ i = ALL_TARGET_HT40_7;
|
||||
+ else
|
||||
+ i = ALL_TARGET_HT20_7;
|
||||
+ }
|
||||
+ ah->paprd_target_power = targetPowerValT2[i];
|
||||
}
|
||||
|
||||
static u16 ath9k_hw_ar9300_get_spur_channel(struct ath_hw *ah,
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -373,6 +373,9 @@ void ath_paprd_calibrate(struct work_str
|
||||
if (!caldata)
|
||||
return;
|
||||
|
||||
+ if (ar9003_paprd_init_table(ah) < 0)
|
||||
+ return;
|
||||
+
|
||||
skb = alloc_skb(len, GFP_KERNEL);
|
||||
if (!skb)
|
||||
return;
|
||||
@@ -388,7 +391,6 @@ void ath_paprd_calibrate(struct work_str
|
||||
memcpy(hdr->addr3, hw->wiphy->perm_addr, ETH_ALEN);
|
||||
|
||||
ath9k_ps_wakeup(sc);
|
||||
- ar9003_paprd_init_table(ah);
|
||||
for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
|
||||
if (!(common->tx_chainmask & BIT(chain)))
|
||||
continue;
|
|
@ -1,27 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
|
||||
@@ -638,6 +638,7 @@ static const u32 ar9300_2p2_baseband_pos
|
||||
{0x00009fc8, 0x0003f000, 0x0003f000, 0x0001a000, 0x0001a000},
|
||||
{0x0000a204, 0x000037c0, 0x000037c4, 0x000037c4, 0x000037c0},
|
||||
{0x0000a208, 0x00000104, 0x00000104, 0x00000004, 0x00000004},
|
||||
+ {0x0000a22c, 0x01026a2f, 0x01026a2f, 0x01026a2f, 0x01026a2f},
|
||||
{0x0000a230, 0x0000000a, 0x00000014, 0x00000016, 0x0000000b},
|
||||
{0x0000a234, 0x00000fff, 0x10000fff, 0x10000fff, 0x00000fff},
|
||||
{0x0000a238, 0xffb81018, 0xffb81018, 0xffb81018, 0xffb81018},
|
||||
@@ -680,7 +681,7 @@ static const u32 ar9300_2p2_baseband_cor
|
||||
{0x0000981c, 0x00020028},
|
||||
{0x00009834, 0x6400a290},
|
||||
{0x00009838, 0x0108ecff},
|
||||
- {0x0000983c, 0x14750600},
|
||||
+ {0x0000983c, 0x0d000600},
|
||||
{0x00009880, 0x201fff00},
|
||||
{0x00009884, 0x00001042},
|
||||
{0x000098a4, 0x00200400},
|
||||
@@ -722,7 +723,6 @@ static const u32 ar9300_2p2_baseband_cor
|
||||
{0x0000a220, 0x00000000},
|
||||
{0x0000a224, 0x00000000},
|
||||
{0x0000a228, 0x10002310},
|
||||
- {0x0000a22c, 0x01036a27},
|
||||
{0x0000a23c, 0x00000000},
|
||||
{0x0000a244, 0x0c000000},
|
||||
{0x0000a2a0, 0x00000001},
|
|
@ -1,129 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
|
||||
@@ -34,9 +34,9 @@ static const u32 ar9300_2p2_radio_postam
|
||||
|
||||
static const u32 ar9300Modes_lowest_ob_db_tx_gain_table_2p2[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
- {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x00637800, 0x00637800},
|
||||
- {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03838000, 0x03838000},
|
||||
- {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03fc0000, 0x03fc0000},
|
||||
+ {0x0000a2dc, 0x00033800, 0x00033800, 0x00637800, 0x00637800},
|
||||
+ {0x0000a2e0, 0x0003c000, 0x0003c000, 0x03838000, 0x03838000},
|
||||
+ {0x0000a2e4, 0x03fc0000, 0x03fc0000, 0x03fc0000, 0x03fc0000},
|
||||
{0x0000a2e8, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
|
||||
{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
@@ -56,21 +56,21 @@ static const u32 ar9300Modes_lowest_ob_d
|
||||
{0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24},
|
||||
{0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640},
|
||||
{0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
|
||||
- {0x0000a544, 0x5302266c, 0x5302266c, 0x3f001861, 0x3f001861},
|
||||
- {0x0000a548, 0x5702286c, 0x5702286c, 0x43001a81, 0x43001a81},
|
||||
- {0x0000a54c, 0x5c02486b, 0x5c02486b, 0x47001a83, 0x47001a83},
|
||||
- {0x0000a550, 0x61024a6c, 0x61024a6c, 0x4a001c84, 0x4a001c84},
|
||||
- {0x0000a554, 0x66026a6c, 0x66026a6c, 0x4e001ce3, 0x4e001ce3},
|
||||
- {0x0000a558, 0x6b026e6c, 0x6b026e6c, 0x52001ce5, 0x52001ce5},
|
||||
- {0x0000a55c, 0x7002708c, 0x7002708c, 0x56001ce9, 0x56001ce9},
|
||||
- {0x0000a560, 0x7302b08a, 0x7302b08a, 0x5a001ceb, 0x5a001ceb},
|
||||
- {0x0000a564, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
|
||||
- {0x0000a568, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
|
||||
- {0x0000a56c, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
|
||||
- {0x0000a570, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
|
||||
- {0x0000a574, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
|
||||
- {0x0000a578, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
|
||||
- {0x0000a57c, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
|
||||
+ {0x0000a544, 0x52022470, 0x52022470, 0x3f001861, 0x3f001861},
|
||||
+ {0x0000a548, 0x55022490, 0x55022490, 0x43001a81, 0x43001a81},
|
||||
+ {0x0000a54c, 0x59022492, 0x59022492, 0x47001a83, 0x47001a83},
|
||||
+ {0x0000a550, 0x5d022692, 0x5d022692, 0x4a001c84, 0x4a001c84},
|
||||
+ {0x0000a554, 0x61022892, 0x61022892, 0x4e001ce3, 0x4e001ce3},
|
||||
+ {0x0000a558, 0x65024890, 0x65024890, 0x52001ce5, 0x52001ce5},
|
||||
+ {0x0000a55c, 0x69024892, 0x69024892, 0x56001ce9, 0x56001ce9},
|
||||
+ {0x0000a560, 0x6e024c92, 0x6e024c92, 0x5a001ceb, 0x5a001ceb},
|
||||
+ {0x0000a564, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
+ {0x0000a568, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
+ {0x0000a56c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
+ {0x0000a570, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
+ {0x0000a574, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
+ {0x0000a578, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
+ {0x0000a57c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a580, 0x00800000, 0x00800000, 0x00800000, 0x00800000},
|
||||
{0x0000a584, 0x06800003, 0x06800003, 0x04800002, 0x04800002},
|
||||
{0x0000a588, 0x0a800020, 0x0a800020, 0x08800004, 0x08800004},
|
||||
@@ -88,44 +88,44 @@ static const u32 ar9300Modes_lowest_ob_d
|
||||
{0x0000a5b8, 0x4782244a, 0x4782244a, 0x34800e24, 0x34800e24},
|
||||
{0x0000a5bc, 0x4b82244c, 0x4b82244c, 0x38801640, 0x38801640},
|
||||
{0x0000a5c0, 0x4e82246c, 0x4e82246c, 0x3c801660, 0x3c801660},
|
||||
- {0x0000a5c4, 0x5382266c, 0x5382266c, 0x3f801861, 0x3f801861},
|
||||
- {0x0000a5c8, 0x5782286c, 0x5782286c, 0x43801a81, 0x43801a81},
|
||||
- {0x0000a5cc, 0x5c82486b, 0x5c82486b, 0x47801a83, 0x47801a83},
|
||||
- {0x0000a5d0, 0x61824a6c, 0x61824a6c, 0x4a801c84, 0x4a801c84},
|
||||
- {0x0000a5d4, 0x66826a6c, 0x66826a6c, 0x4e801ce3, 0x4e801ce3},
|
||||
- {0x0000a5d8, 0x6b826e6c, 0x6b826e6c, 0x52801ce5, 0x52801ce5},
|
||||
- {0x0000a5dc, 0x7082708c, 0x7082708c, 0x56801ce9, 0x56801ce9},
|
||||
- {0x0000a5e0, 0x7382b08a, 0x7382b08a, 0x5a801ceb, 0x5a801ceb},
|
||||
- {0x0000a5e4, 0x7782b08c, 0x7782b08c, 0x5d801eec, 0x5d801eec},
|
||||
- {0x0000a5e8, 0x7782b08c, 0x7782b08c, 0x5d801eec, 0x5d801eec},
|
||||
- {0x0000a5ec, 0x7782b08c, 0x7782b08c, 0x5d801eec, 0x5d801eec},
|
||||
- {0x0000a5f0, 0x7782b08c, 0x7782b08c, 0x5d801eec, 0x5d801eec},
|
||||
- {0x0000a5f4, 0x7782b08c, 0x7782b08c, 0x5d801eec, 0x5d801eec},
|
||||
- {0x0000a5f8, 0x7782b08c, 0x7782b08c, 0x5d801eec, 0x5d801eec},
|
||||
- {0x0000a5fc, 0x7782b08c, 0x7782b08c, 0x5d801eec, 0x5d801eec},
|
||||
+ {0x0000a5c4, 0x52822470, 0x52822470, 0x3f801861, 0x3f801861},
|
||||
+ {0x0000a5c8, 0x55822490, 0x55822490, 0x43801a81, 0x43801a81},
|
||||
+ {0x0000a5cc, 0x59822492, 0x59822492, 0x47801a83, 0x47801a83},
|
||||
+ {0x0000a5d0, 0x5d822692, 0x5d822692, 0x4a801c84, 0x4a801c84},
|
||||
+ {0x0000a5d4, 0x61822892, 0x61822892, 0x4e801ce3, 0x4e801ce3},
|
||||
+ {0x0000a5d8, 0x65824890, 0x65824890, 0x52801ce5, 0x52801ce5},
|
||||
+ {0x0000a5dc, 0x69824892, 0x69824892, 0x56801ce9, 0x56801ce9},
|
||||
+ {0x0000a5e0, 0x6e824c92, 0x6e824c92, 0x5a801ceb, 0x5a801ceb},
|
||||
+ {0x0000a5e4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
+ {0x0000a5e8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
+ {0x0000a5ec, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
+ {0x0000a5f0, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
+ {0x0000a5f4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
+ {0x0000a5f8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
+ {0x0000a5fc, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
- {0x0000a614, 0x01404000, 0x01404000, 0x01404000, 0x01404000},
|
||||
- {0x0000a618, 0x01404501, 0x01404501, 0x01404501, 0x01404501},
|
||||
- {0x0000a61c, 0x02008802, 0x02008802, 0x02008501, 0x02008501},
|
||||
- {0x0000a620, 0x0300cc03, 0x0300cc03, 0x0280ca03, 0x0280ca03},
|
||||
- {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
|
||||
- {0x0000a628, 0x0300cc03, 0x0300cc03, 0x04014c04, 0x04014c04},
|
||||
- {0x0000a62c, 0x03810c03, 0x03810c03, 0x04015005, 0x04015005},
|
||||
- {0x0000a630, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
|
||||
- {0x0000a634, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
|
||||
- {0x0000a638, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
|
||||
- {0x0000a63c, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
|
||||
- {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x00637800, 0x00637800},
|
||||
- {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03838000, 0x03838000},
|
||||
- {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03fc0000, 0x03fc0000},
|
||||
+ {0x0000a614, 0x02004000, 0x02004000, 0x01404000, 0x01404000},
|
||||
+ {0x0000a618, 0x02004801, 0x02004801, 0x01404501, 0x01404501},
|
||||
+ {0x0000a61c, 0x02808a02, 0x02808a02, 0x02008501, 0x02008501},
|
||||
+ {0x0000a620, 0x0380ce03, 0x0380ce03, 0x0280ca03, 0x0280ca03},
|
||||
+ {0x0000a624, 0x04411104, 0x04411104, 0x03010c04, 0x03010c04},
|
||||
+ {0x0000a628, 0x04411104, 0x04411104, 0x04014c04, 0x04014c04},
|
||||
+ {0x0000a62c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
+ {0x0000a630, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
+ {0x0000a634, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
+ {0x0000a638, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
+ {0x0000a63c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
+ {0x0000b2dc, 0x00033800, 0x00033800, 0x00637800, 0x00637800},
|
||||
+ {0x0000b2e0, 0x0003c000, 0x0003c000, 0x03838000, 0x03838000},
|
||||
+ {0x0000b2e4, 0x03fc0000, 0x03fc0000, 0x03fc0000, 0x03fc0000},
|
||||
{0x0000b2e8, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
- {0x0000c2dc, 0x0380c7fc, 0x0380c7fc, 0x00637800, 0x00637800},
|
||||
- {0x0000c2e0, 0x0000f800, 0x0000f800, 0x03838000, 0x03838000},
|
||||
- {0x0000c2e4, 0x03ff0000, 0x03ff0000, 0x03fc0000, 0x03fc0000},
|
||||
+ {0x0000c2dc, 0x00033800, 0x00033800, 0x00637800, 0x00637800},
|
||||
+ {0x0000c2e0, 0x0003c000, 0x0003c000, 0x03838000, 0x03838000},
|
||||
+ {0x0000c2e4, 0x03fc0000, 0x03fc0000, 0x03fc0000, 0x03fc0000},
|
||||
{0x0000c2e8, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x00016044, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
|
||||
{0x00016048, 0x62480001, 0x62480001, 0x62480001, 0x62480001},
|
|
@ -1,89 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -838,7 +838,7 @@ static void ath_tx_sched_aggr(struct ath
|
||||
ath_tx_txqaddbuf(sc, txq, &bf_q);
|
||||
TX_STAT_INC(txq->axq_qnum, a_aggr);
|
||||
|
||||
- } while (txq->axq_depth < ATH_AGGR_MIN_QDEPTH &&
|
||||
+ } while (txq->axq_ampdu_depth < ATH_AGGR_MIN_QDEPTH &&
|
||||
status != ATH_AGGR_BAW_CLOSED);
|
||||
}
|
||||
|
||||
@@ -999,6 +999,7 @@ struct ath_txq *ath_txq_setup(struct ath
|
||||
INIT_LIST_HEAD(&txq->axq_acq);
|
||||
spin_lock_init(&txq->axq_lock);
|
||||
txq->axq_depth = 0;
|
||||
+ txq->axq_ampdu_depth = 0;
|
||||
txq->axq_tx_inprogress = false;
|
||||
sc->tx.txqsetup |= 1<<qnum;
|
||||
|
||||
@@ -1068,6 +1069,12 @@ int ath_cabq_update(struct ath_softc *sc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static bool bf_is_ampdu_not_probing(struct ath_buf *bf)
|
||||
+{
|
||||
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(bf->bf_mpdu);
|
||||
+ return bf_isampdu(bf) && !(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Drain a given TX queue (could be Beacon or Data)
|
||||
*
|
||||
@@ -1126,7 +1133,8 @@ void ath_draintxq(struct ath_softc *sc,
|
||||
}
|
||||
|
||||
txq->axq_depth--;
|
||||
-
|
||||
+ if (bf_is_ampdu_not_probing(bf))
|
||||
+ txq->axq_ampdu_depth--;
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
if (bf_isampdu(bf))
|
||||
@@ -1316,6 +1324,8 @@ static void ath_tx_txqaddbuf(struct ath_
|
||||
ath9k_hw_txstart(ah, txq->axq_qnum);
|
||||
}
|
||||
txq->axq_depth++;
|
||||
+ if (bf_is_ampdu_not_probing(bf))
|
||||
+ txq->axq_ampdu_depth++;
|
||||
}
|
||||
|
||||
static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_atx_tid *tid,
|
||||
@@ -1336,7 +1346,7 @@ static void ath_tx_send_ampdu(struct ath
|
||||
*/
|
||||
if (!list_empty(&tid->buf_q) || tid->paused ||
|
||||
!BAW_WITHIN(tid->seq_start, tid->baw_size, fi->seqno) ||
|
||||
- txctl->txq->axq_depth >= ATH_AGGR_MIN_QDEPTH) {
|
||||
+ txctl->txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH) {
|
||||
/*
|
||||
* Add this frame to software queue for scheduling later
|
||||
* for aggregation.
|
||||
@@ -2040,6 +2050,9 @@ static void ath_tx_processq(struct ath_s
|
||||
txq->axq_tx_inprogress = false;
|
||||
if (bf_held)
|
||||
list_del(&bf_held->list);
|
||||
+
|
||||
+ if (bf_is_ampdu_not_probing(bf))
|
||||
+ txq->axq_ampdu_depth--;
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
if (bf_held)
|
||||
@@ -2168,6 +2181,8 @@ void ath_tx_edma_tasklet(struct ath_soft
|
||||
INCR(txq->txq_tailidx, ATH_TXFIFO_DEPTH);
|
||||
txq->axq_depth--;
|
||||
txq->axq_tx_inprogress = false;
|
||||
+ if (bf_is_ampdu_not_probing(bf))
|
||||
+ txq->axq_ampdu_depth--;
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
txok = !(txs.ts_status & ATH9K_TXERR_MASK);
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -187,6 +187,7 @@ struct ath_txq {
|
||||
struct list_head axq_q;
|
||||
spinlock_t axq_lock;
|
||||
u32 axq_depth;
|
||||
+ u32 axq_ampdu_depth;
|
||||
bool stopped;
|
||||
bool axq_tx_inprogress;
|
||||
struct list_head axq_acq;
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
@@ -202,6 +202,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
@@ -209,6 +209,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
/*
|
||||
* PCI driver handlers.
|
||||
*/
|
||||
@@ -381,6 +382,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
@@ -388,6 +389,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00pci_resume);
|
||||
#endif /* CONFIG_PM */
|
||||
|
|
|
@ -16,14 +16,14 @@ Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
|
|||
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
@@ -592,6 +592,10 @@ static void rt2800pci_kill_tx_queue(stru
|
||||
return;
|
||||
}
|
||||
@@ -481,6 +481,10 @@ static void rt2800pci_disable_radio(stru
|
||||
|
||||
rt2800_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00001280);
|
||||
|
||||
+ rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®);
|
||||
+ rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_TX_DMA, 0);
|
||||
+ rt2800_register_write(rt2x00dev, WPDMA_GLO_CFG, reg);
|
||||
+
|
||||
rt2800_register_read(rt2x00dev, WPDMA_RST_IDX, ®);
|
||||
rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX0, (queue->qid == QID_AC_BE));
|
||||
rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX1, (queue->qid == QID_AC_BK));
|
||||
rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX0, 1);
|
||||
rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX1, 1);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
@@ -270,8 +270,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
|
||||
@@ -277,8 +277,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
|
||||
|
||||
pci_set_master(pci_dev);
|
||||
|
||||
|
|
|
@ -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,
|
||||
@@ -2540,10 +2545,10 @@ static int b43_gpio_init(struct b43_wlde
|
||||
@@ -2536,10 +2541,10 @@ static int b43_gpio_init(struct b43_wlde
|
||||
& ~B43_MACCTL_GPOUTSMSK);
|
||||
|
||||
b43_write16(dev, B43_MMIO_GPIO_MASK, b43_read16(dev, B43_MMIO_GPIO_MASK)
|
||||
|
@ -35,7 +35,7 @@
|
|||
if (dev->dev->bus->chip_id == 0x4301) {
|
||||
mask |= 0x0060;
|
||||
set |= 0x0060;
|
||||
@@ -5100,10 +5105,10 @@ static void b43_print_driverinfo(void)
|
||||
@@ -5096,10 +5101,10 @@ static void b43_print_driverinfo(void)
|
||||
feat_sdio = "S";
|
||||
#endif
|
||||
printk(KERN_INFO "Broadcom 43xx driver loaded "
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
b43-$(CONFIG_B43_PCMCIA) += pcmcia.o
|
||||
--- a/drivers/net/wireless/b43/main.c
|
||||
+++ b/drivers/net/wireless/b43/main.c
|
||||
@@ -1816,9 +1816,11 @@ static void b43_do_interrupt_thread(stru
|
||||
@@ -1812,9 +1812,11 @@ static void b43_do_interrupt_thread(stru
|
||||
dma_reason[4], dma_reason[5]);
|
||||
b43err(dev->wl, "This device does not support DMA "
|
||||
"on your system. It will now be switched to PIO.\n");
|
||||
|
|
Loading…
Reference in New Issue