ATH9K bug fixes - TX hang & Signal Quality issue
cover ATH9K bug fixes - TX hang & Signal Quality issue
This seris fixes couple of important issues
1) Signal Quality issue (patch 1/7)
2) INI update - fixes performance issue (Patch 2/7)
3) TX hang issue (happens after an hour time, Patch 6/7 & 7/7)
Thanks
Senthil
PATCH 1/7 ath9k: Manipulate and report the correct RSSI
RSSI reported by the RX descriptor requires little manipulation. Manipulate and report the correct RSSI to the stack. This will fix the improper signal levels reported by iwconfig iw dev wlanX station dump.
Also use the default noise floor for now as the one reported during the caliberation seems to be wrong.
--- drivers/net/wireless/ath/ath9k/ath9k.h | 15 +++++++++++++++ drivers/net/wireless/ath/ath9k/calib.c | 13 ++++++++++--- drivers/net/wireless/ath/ath9k/calib.h | 4 +++- drivers/net/wireless/ath/ath9k/main.c | 1 + drivers/net/wireless/ath/ath9k/recv.c | 20 +++++++++++++++++++- 5 files changed, 48 insertions(+), 5 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +15 -0
@@ -297,12 +297,27 @@ struct ath_tx_control {#define ATH_TX_XRETRY 0x02#define ATH_TX_BAR 0x04 +#define ATH_RSSI_LPF_LEN 10 +#define RSSI_LPF_THRESHOLD -20 +#define ATH_RSSI_EP_MULTIPLIER (1<<7) +#define ATH_EP_MUL (x, mul) ((x) * (mul)) +#define ATH_RSSI_IN (x) (ATH_EP_MUL((x), ATH_RSSI_EP_MULTIPLIER)) +#define ATH_LPF_RSSI (x, y, len) \ + ((x != ATH_RSSI_DUMMY_MARKER) ? (((x) * ((len) - 1) + (y)) / (len)) : (y)) +#define ATH_RSSI_LPF (x, y) do { \ + if ((y) >= RSSI_LPF_THRESHOLD) \ + x = ATH_LPF_RSSI((x), ATH_RSSI_IN((y)), ATH_RSSI_LPF_LEN); \ +} while (0) +#define ATH_EP_RND (x, mul) \ + ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul)) +struct ath_node {struct ath_softc *an_sc;struct ath_atx_tid tid[WME_NUM_TID ];struct ath_atx_ac ac[WME_NUM_AC ];u16 maxampdu;u8 mpdudensity; +int last_rssi; };struct ath_tx {
drivers/net/wireless/ath/ath9k/calib.c +10 -3
@@ -691,15 +691,22 @@ int16_t ath9k_hw_getnf(struct ath_hw *ah,void ath9k_init_nfcal_hist_buffer (struct ath_hw *ah) {int i, j; +s16 noise_floor; + +if (AR_SREV_9280 (ah)) + noise_floor =AR_PHY_CCA_MAX_AR9280_GOOD_VALUE ; +else if (AR_SREV_9285 (ah)) + noise_floor =AR_PHY_CCA_MAX_AR9285_GOOD_VALUE ; +else + noise_floor =AR_PHY_CCA_MAX_AR5416_GOOD_VALUE ;for (i =0 ; i <NUM_NF_READINGS ; i++) { ah->nfCalHist[i].currIndex =0 ; - ah->nfCalHist[i].privNF =AR_PHY_CCA_MAX_GOOD_VALUE ; + ah->nfCalHist[i].privNF = noise_floor; ah->nfCalHist[i].invalidNFcount =AR_PHY_CCA_FILTERWINDOW_LENGTH ;for (j =0 ; j <ATH9K_NF_CAL_HIST_MAX ; j++) { - ah->nfCalHist[i].nfCalBuffer[j] = -AR_PHY_CCA_MAX_GOOD_VALUE ; + ah->nfCalHist[i].nfCalBuffer[j] = noise_floor; } } }
drivers/net/wireless/ath/ath9k/calib.h +3 -1
@@ -25,7 +25,9 @@ extern const struct ath9k_percal_data adc_dc_cal_multi_sample;extern const struct ath9k_percal_data adc_dc_cal_single_sample;extern const struct ath9k_percal_data adc_init_dc_cal; -#define AR_PHY_CCA_MAX_GOOD_VALUE -85 +#define AR_PHY_CCA_MAX_AR5416_GOOD_VALUE -85 +#define AR_PHY_CCA_MAX_AR9280_GOOD_VALUE -112 +#define AR_PHY_CCA_MAX_AR9285_GOOD_VALUE -118#define AR_PHY_CCA_MAX_HIGH_VALUE -62#define AR_PHY_CCA_MIN_BAD_VALUE -140#define AR_PHY_CCA_FILTERWINDOW_LENGTH_INIT 3
drivers/net/wireless/ath/ath9k/main.c +1 -0
@@ -447,6 +447,7 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta) an->maxampdu =1 << (IEEE80211_HTCAP_MAXRXAMPDU_FACTOR + sta->ht_cap.ampdu_factor); an->mpdudensity =parse_mpdudensity (sta->ht_cap.ampdu_density); + an->last_rssi =ATH_RSSI_DUMMY_MARKER ; } }
drivers/net/wireless/ath/ath9k/recv.c +19 -1
@@ -145,6 +145,9 @@ static int ath_rx_prepare(struct sk_buff *skb, struct ath_desc *ds,u8 ratecode;__le16 fc;struct ieee80211_hw *hw; +struct ieee80211_sta *sta; +struct ath_node *an; + hdr = (struct ieee80211_hdr *)skb->data; fc = hdr->frame_control;
@@ -229,11 +232,26 @@ static int ath_rx_prepare(struct sk_buff *skb, struct ath_desc *ds, } } +rcu_read_lock (); + sta =ieee80211_find_sta (sc->hw, hdr->addr2); +if (sta) { + an = (struct ath_node *) sta->drv_priv; +ATH_RSSI_LPF (an->last_rssi, ds->ds_rxstat.rs_rssi); +if (likely (an->last_rssi !=ATH_RSSI_DUMMY_MARKER )) + ds->ds_rxstat.rs_rssi =ATH_EP_RND (an->last_rssi, +ATH_RSSI_EP_MULTIPLIER ); +if (ds->ds_rxstat.rs_rssi <0 ) + ds->ds_rxstat.rs_rssi =0 ; +else if (ds->ds_rxstat.rs_rssi >127 ) + ds->ds_rxstat.rs_rssi =127 ; + } +rcu_read_unlock (); + rx_status->mactime =ath_extend_tsf (sc, ds->ds_rxstat.rs_tstamp); rx_status->band = hw->conf.channel->band; rx_status->freq = hw->conf.channel->center_freq; rx_status->noise = sc->ani.noise_floor; - rx_status->signal = rx_status->noise + ds->ds_rxstat.rs_rssi; + rx_status->signal =ATH_DEFAULT_NOISE_FLOOR + ds->ds_rxstat.rs_rssi; rx_status->antenna = ds->ds_rxstat.rs_antenna;/* at 45 you will be able to use MCS 15 reliably. A more elaborate
Signature · 1 line
1.6.0.4
PATCH 2/7 ath9k: AR9285 & AR9280 INI update and minor bug fixes.
INI Update for AR9285 & AR9280 chipsets.
Also set the margin and db values of chain1(block1) to chain0(block0)
--- drivers/net/wireless/ath/ath9k/eeprom.c | 20 +++++++++++- drivers/net/wireless/ath/ath9k/initvals.h | 47 +++++++++++++++------------- 2 files changed, 44 insertions(+), 23 deletions(-)
drivers/net/wireless/ath/ath9k/eeprom.c +19 -1
@@ -1208,6 +1208,19 @@ static void ath9k_hw_4k_set_gain(struct ath_hw *ah, pModal->xatten2Margin[0]);REG_RMW_FIELD (ah,AR_PHY_GAIN_2GHZ + regChainOffset,AR_PHY_GAIN_2GHZ_XATTEN2_DB , pModal->xatten2Db[0 ]); + +/* Set the block 1 value to block 0 value */ +REG_RMW_FIELD (ah,AR_PHY_GAIN_2GHZ +0x1000 , +AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN , + pModal->bswMargin[0 ]); +REG_RMW_FIELD (ah,AR_PHY_GAIN_2GHZ +0x1000 , +AR_PHY_GAIN_2GHZ_XATTEN1_DB , pModal->bswAtten[0 ]); +REG_RMW_FIELD (ah,AR_PHY_GAIN_2GHZ +0x1000 , +AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN , + pModal->xatten2Margin[0 ]); +REG_RMW_FIELD (ah,AR_PHY_GAIN_2GHZ +0x1000 , +AR_PHY_GAIN_2GHZ_XATTEN2_DB , + pModal->xatten2Db[0 ]); } REG_RMW_FIELD(ah, AR_PHY_RXGAIN + regChainOffset,
@@ -1215,6 +1228,11 @@ static void ath9k_hw_4k_set_gain(struct ath_hw *ah,REG_RMW_FIELD (ah,AR_PHY_RXGAIN + regChainOffset,AR9280_PHY_RXGAIN_TXRX_MARGIN , pModal->rxTxMarginCh[0 ]); +REG_RMW_FIELD (ah,AR_PHY_RXGAIN +0x1000 , +AR9280_PHY_RXGAIN_TXRX_ATTEN , txRxAttenLocal); +REG_RMW_FIELD (ah,AR_PHY_RXGAIN +0x1000 , +AR9280_PHY_RXGAIN_TXRX_MARGIN , pModal->rxTxMarginCh[0 ]); +if (AR_SREV_9285_11 (ah))REG_WRITE (ah,AR9285_AN_TOP4 , (AR9285_AN_TOP4_DEFAULT |0x14 )); }
@@ -1239,7 +1257,7 @@ static void ath9k_hw_4k_set_board_values(struct ath_hw *ah,ath9k_hw_4k_set_gain (ah, pModal, eep, txRxAttenLocal,0 );/* Initialize Ant Diversity settings from EEPROM */ -if (pModal->version ==3 ) { +if (pModal->version >=3 ) { ant_div_control1 = ((pModal->ob_234 >>12 ) &0xf ); ant_div_control2 = ((pModal->db1_234 >>12 ) &0xf ); regVal =REG_READ (ah,0x99ac );
drivers/net/wireless/ath/ath9k/initvals.h +25 -22
104 lines not on this page · raw message
Signature · 1 line
1.6.0.4
PATCH 3/7 ath9k: remove unnecessary STATION mode check.
Remove unncessary STATION mode check in ath9k_bss_assoc_info() as it is called only for STATION mode.
--- drivers/net/wireless/ath/ath9k/main.c | 21 +++++++++------------ 1 files changed, 9 insertions(+), 12 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +8 -11
@@ -905,24 +905,21 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc, struct ieee80211_vif *vif, struct ieee80211_bss_conf *bss_conf) { - struct ath_vif *avp = (void *)vif->drv_priv;if (bss_conf->assoc) {DPRINTF (sc,ATH_DBG_CONFIG ,"Bss Info ASSOC %d, bssid: %pM\n" , bss_conf->aid, sc->curbssid);/* New association, store aid */ -if (avp->av_opmode ==NL80211_IFTYPE_STATION ) { - sc->curaid = bss_conf->aid; -ath9k_hw_write_associd (sc); + sc->curaid = bss_conf->aid; +ath9k_hw_write_associd (sc); -/* -* Request a re-configuration of Beacon related timers -* on the receipt of the first Beacon frame (i.e., -* after time sync with the AP). -*/ - sc->sc_flags |=SC_OP_BEACON_SYNC ; - } +/* +* Request a re-configuration of Beacon related timers +* on the receipt of the first Beacon frame (i.e., +* after time sync with the AP). +*/ + sc->sc_flags |=SC_OP_BEACON_SYNC ;/* Configure the beacon */ ath_beacon_config (sc, vif);
Signature · 1 line
1.6.0.4
PATCH 4/7 ath9k: stop ani when the STA gets disconnected.
ANI is not required when the STA is disconnected. So stop it and enable ANI for adhoc and monitor mode.
--- drivers/net/wireless/ath/ath9k/main.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +5 -1
@@ -934,6 +934,8 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc, }else {DPRINTF (sc,ATH_DBG_CONFIG ,"Bss Info DISASSOC\n" ); sc->curaid =0 ; +/* Stop ANI */ +del_timer_sync (&sc->ani.timer); } }
@@ -2243,7 +2245,9 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,ath9k_hw_set_interrupts (sc->sc_ah, sc->imask); -if (conf->type ==NL80211_IFTYPE_AP ) +if (conf->type ==NL80211_IFTYPE_AP || + conf->type ==NL80211_IFTYPE_ADHOC || + conf->type ==NL80211_IFTYPE_MONITOR )ath_start_ani (sc); out:
Signature · 1 line
1.6.0.4
PATCH 5/7 ath9k: race condition in SCANNING state check during ANI calibration
ANI calibration shouldn't be done when we are not on our home channel. This is already verified. However, it is racy. Fix this by proper spin locks.
--- drivers/net/wireless/ath/ath9k/ath9k.h | 1 + drivers/net/wireless/ath/ath9k/main.c | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +1 -0
@@ -568,6 +568,7 @@ struct ath_softc {int irq;spinlock_t sc_resetlock;spinlock_t sc_serial_rw; +spinlock_t ani_lock;struct mutex mutex;u8 curbssid[ETH_ALEN ];
drivers/net/wireless/ath/ath9k/main.c +7 -4
@@ -326,6 +326,7 @@ static void ath_ani_calibrate(unsigned long data)* don't calibrate when we're scanning. * we are most likely not on our home channel. */ +spin_lock (&sc->ani_lock);if (sc->sc_flags &SC_OP_SCANNING ) goto set_timer;
@@ -389,6 +390,7 @@ static void ath_ani_calibrate(unsigned long data)ath9k_ps_restore (sc); set_timer: +spin_unlock (&sc->ani_lock);/* * Set timer interval based on previous results. * The interval must be the shortest necessary to satisfy ANI,
@@ -1348,6 +1350,7 @@ static int ath_init(u16 devid, struct ath_softc *sc)spin_lock_init (&sc->wiphy_lock);spin_lock_init (&sc->sc_resetlock);spin_lock_init (&sc->sc_serial_rw); +spin_lock_init (&sc->ani_lock);mutex_init (&sc->mutex);tasklet_init (&sc->intr_tq, ath9k_tasklet, (unsigned long )sc); tasklet_init(&sc->bcon_tasklet, ath_beacon_tasklet,
@@ -2732,9 +2735,9 @@ static void ath9k_sw_scan_start(struct ieee80211_hw *hw) aphy->state =ATH_WIPHY_SCAN ;ath9k_wiphy_pause_all_forced (sc, aphy); -mutex_lock (&sc->mutex); +spin_lock_bh (&sc->ani_lock); sc->sc_flags |=SC_OP_SCANNING ; -mutex_unlock (&sc->mutex); +spin_unlock_bh (&sc->ani_lock); }static void ath9k_sw_scan_complete (struct ieee80211_hw *hw)
@@ -2742,11 +2745,11 @@ static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)struct ath_wiphy *aphy = hw->priv;struct ath_softc *sc = aphy->sc; -mutex_lock (&sc->mutex); +spin_lock_bh (&sc->ani_lock); aphy->state =ATH_WIPHY_ACTIVE ; sc->sc_flags &= ~SC_OP_SCANNING ; sc->sc_flags |=SC_OP_FULL_RESET ; -mutex_unlock (&sc->mutex); +spin_unlock_bh (&sc->ani_lock); }struct ieee80211_ops ath9k_ops = {
Signature · 1 line
1.6.0.4
PATCH 6/7 ath9k: Fix TX hang issue with Atheros chipsets
The hardware doesn't generate interrupts in some cases and so work around that by monitoring the TX status periodically and reset the chip of required. The STA seems to be pretty stable with this fix.
--- drivers/net/wireless/ath/ath9k/ath9k.h | 4 +++ drivers/net/wireless/ath/ath9k/main.c | 2 + drivers/net/wireless/ath/ath9k/xmit.c | 41 ++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +4 -0
@@ -231,6 +231,8 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd,#define ATH_DS_TX_BA (_ds) ((_ds)->ds_us.tx.ts_flags & ATH9K_TX_BA)#define ATH_AN_2_TID (_an, _tidno) (&(_an)->tid[(_tidno)]) +#define ATH_TX_COMPLETE_POLL_INT 1000 +enum ATH_AGGR_STATUS {ATH_AGGR_DONE ,ATH_AGGR_BAW_CLOSED ,
@@ -246,6 +248,7 @@ struct ath_txq {u8 axq_aggr_depth;u32 axq_totalqueued;bool stopped; +bool axq_tx_inprogress;struct ath_buf *axq_linkbuf;/* first desc of the last descriptor that contains CTS */
@@ -619,6 +622,7 @@ struct ath_softc {#endif struct ath_bus_ops *bus_ops;struct ath_beacon_config cur_beacon_conf; +struct delayed_work tx_complete_work; };struct ath_wiphy {
drivers/net/wireless/ath/ath9k/main.c +2 -0
@@ -1291,6 +1291,7 @@ void ath_detach(struct ath_softc *sc)ath_deinit_leds (sc);cancel_work_sync (&sc->chan_work);cancel_delayed_work_sync (&sc->wiphy_work); +cancel_delayed_work_sync (&sc->tx_complete_work);for (i =0 ; i < sc->num_sec_wiphy; i++) {struct ath_wiphy *aphy = sc->sec_wiphy[i];
@@ -2025,6 +2026,7 @@ static int ath9k_start(struct ieee80211_hw *hw)#if defined(CONFIG_RFKILL ) || defined(CONFIG_RFKILL_MODULE ) r =ath_start_rfkill_poll (sc);#endif +queue_delayed_work (sc->hw->workqueue, &sc->tx_complete_work,0 ); mutex_unlock:mutex_unlock (&sc->mutex);
drivers/net/wireless/ath/ath9k/xmit.c +41 -0
71 lines not on this page · raw message
Signature · 1 line
1.6.0.4
PATCH 7/7 ath9k: schedule aggregation regardless of queue depth
schedule aggregation regardless of queue depth. Also we shouldn't remove holding descriptor from AC queue if it happens to be the only descriptor.
--- drivers/net/wireless/ath/ath9k/xmit.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-)
drivers/net/wireless/ath/ath9k/xmit.c +1 -14
@@ -1113,8 +1113,7 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)if (tid->paused)continue ; -if ((txq->axq_depth %2 ) ==0 ) -ath_tx_sched_aggr (sc, txq, tid); +ath_tx_sched_aggr (sc, txq, tid);/* * add tid to round-robin queue if more frames
@@ -1957,19 +1956,7 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)if (bf->bf_stale) { bf_held = bf;if (list_is_last (&bf_held->list, &txq->axq_q)) { - txq->axq_link =NULL ; - txq->axq_linkbuf =NULL ;spin_unlock_bh (&txq->axq_lock); - -/* -* The holding descriptor is the last -* descriptor in queue. It's safe to remove -* the last holding descriptor in BH context. -*/ -spin_lock_bh (&sc->tx.txbuflock); -list_move_tail (&bf_held->list, &sc->tx.txbuf); -spin_unlock_bh (&sc->tx.txbuflock); -break ; }else { bf = list_entry(bf_held->list.next,
Signature · 1 line
1.6.0.4
PATCH 1/1 ath9k: Fix panic when ath9k is unloaded.
RFKILL deinit should happen after the device is unregistered with mac80211.
EIP: 0060:[<f8a52231>] EFLAGS: 00010286 CPU: 1
EIP is at rfkill_pause_polling+0x11/0x30 [rfkill]
EAX: 00000000 EBX: e1eaeab4 ECX: f8947048 EDX: da8f5c00
ESI: e1eae1c0 EDI: e1eaeb78 EBP: d808ddac ESP: d808ddac
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process rmmod (pid: 5618, ti=d808c000 task=f61a8410 task.ti=d808c000)
Stack: d808ddcc f8902191 c02e4e10 ffffffff e1eaeb78 00000000 e1eae1c0 e1c0b360 d808de04 f856d62e e1c0b360 e1c0b4d8 e1c0b000 e1eae2b0 c02f500e 00000000 00000002 e1c0b6e0 e1c0b140 e1c0b000 f8586180 e1eae760 d808de20 c02e4df3 Call Trace: [<f8902191>] ? ath9k_stop+0x81/0x120 [ath9k] [<c02e4e10>] ? dev_close+0x90/0xd0 [<f856d62e>] ? ieee80211_stop+0x27e/0x5c0 [mac80211] [<c02f500e>] ? dev_deactivate+0x17e/0x1a0 [<c02e4df3>] ? dev_close+0x73/0xd0 [<c02e4e97>] ? rollback_registered+0x47/0x210 [<c02e507e>] ? unregister_netdevice+0x1e/0x70 [<f856ceb9>] ? ieee80211_remove_interfaces+0x69/0xa0 [mac80211] [<f8560190>] ? ieee80211_unregister_hw+0x40/0xe0 [mac80211] [<f890438e>] ? ath_detach+0xbe/0x1e0 [ath9k] [<f89044c0>] ? ath_cleanup+0x10/0x40 [ath9k] [<f890bfa8>] ? ath_pci_remove+0x18/0x20 [ath9k] [<c024867e>] ? pci_device_remove+0x1e/0x40 [<c02b4ec6>] ? __device_release_driver+0x56/0x90 [<c02b4f8f>] ? driver_detach+0x8f/0xa0 [<c02b40db>] ? bus_remove_driver+0x7b/0xb0 [<c02b54d9>] ? driver_unregister+0x39/0x40 [<c02488d5>] ? pci_unregister_driver+0x35/0x90 [<f890bec2>] ? ath_pci_exit+0x12/0x20 [ath9k] [<f890d7e4>] ? ath9k_exit+0x10/0x3d [ath9k] [<c036edcd>] ? mutex_unlock+0xd/0x10 [<c015d257>] ? sys_delete_module+0x167/0x210 [<c019c40b>] ? do_munmap+0x22b/0x280 [<c0103af0>] ? sysenter_do_call+0x12/0x2c EIP: [<f8a52231>] rfkill_pause_polling+0x11/0x30 [rfkill] SS:ESP 0068:d808ddac
--- drivers/net/wireless/ath/ath9k/main.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +4 -3
@@ -1288,9 +1288,6 @@ void ath_detach(struct ath_softc *sc)DPRINTF (sc,ATH_DBG_CONFIG ,"Detach ATH hw\n" ); -#if defined(CONFIG_RFKILL ) || defined(CONFIG_RFKILL_MODULE ) -ath_deinit_rfkill (sc); -#endif ath_deinit_leds (sc);cancel_work_sync (&sc->chan_work);cancel_delayed_work_sync (&sc->wiphy_work);
@@ -1304,6 +1301,10 @@ void ath_detach(struct ath_softc *sc)ieee80211_free_hw (aphy->hw); }ieee80211_unregister_hw (hw); + +#if defined(CONFIG_RFKILL ) || defined(CONFIG_RFKILL_MODULE ) +ath_deinit_rfkill (sc); +#endif ath_rx_cleanup (sc);ath_tx_cleanup (sc);
Signature · 1 line
1.6.0.4
PATCH 1/1 ath9k: Fix panic when ath9k is unloaded.
John
Please drop this patch alone. It was sent accidentally. I was using this patch to get around RFKILL rmmod panic until RFKILL is properly tested with ath9k.
Sorry! for the confusion.
Senthil
Quoted 73 lines · Senthilkumar Balasubramanian
RFKILL deinit should happen after the device is unregistered with mac80211.
EIP: 0060:[<f8a52231>] EFLAGS: 00010286 CPU: 1
EIP is atrfkill_pause_polling+0x11/0x30[rfkill]
EAX: 00000000 EBX:e1eaeab4ECX:f8947048EDX:da8f5c00
ESI:e1eae1c0EDI:e1eaeb78EBP:d808ddacESP:d808ddac
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process rmmod (pid: 5618, ti=d808c000 task=f61a8410 task.ti=d808c000)Stack: d808ddcc f8902191 c02e4e10 ffffffff e1eaeb78 00000000 e1eae1c0 e1c0b360 d808de04 f856d62e e1c0b360 e1c0b4d8 e1c0b000 e1eae2b0 c02f500e 00000000 00000002 e1c0b6e0 e1c0b140 e1c0b000 f8586180 e1eae760 d808de20 c02e4df3 Call Trace: [<f8902191>] ? ath9k_stop+0x81/0x120 [ath9k] [<c02e4e10>] ? dev_close+0x90/0xd0 [<f856d62e>] ? ieee80211_stop+0x27e/0x5c0 [mac80211] [<c02f500e>] ? dev_deactivate+0x17e/0x1a0 [<c02e4df3>] ? dev_close+0x73/0xd0 [<c02e4e97>] ? rollback_registered+0x47/0x210 [<c02e507e>] ? unregister_netdevice+0x1e/0x70 [<f856ceb9>] ? ieee80211_remove_interfaces+0x69/0xa0 [mac80211] [<f8560190>] ? ieee80211_unregister_hw+0x40/0xe0 [mac80211] [<f890438e>] ? ath_detach+0xbe/0x1e0 [ath9k] [<f89044c0>] ? ath_cleanup+0x10/0x40 [ath9k] [<f890bfa8>] ? ath_pci_remove+0x18/0x20 [ath9k] [<c024867e>] ? pci_device_remove+0x1e/0x40 [<c02b4ec6>] ? __device_release_driver+0x56/0x90 [<c02b4f8f>] ? driver_detach+0x8f/0xa0 [<c02b40db>] ? bus_remove_driver+0x7b/0xb0 [<c02b54d9>] ? driver_unregister+0x39/0x40 [<c02488d5>] ? pci_unregister_driver+0x35/0x90 [<f890bec2>] ? ath_pci_exit+0x12/0x20 [ath9k] [<f890d7e4>] ? ath9k_exit+0x10/0x3d [ath9k] [<c036edcd>] ? mutex_unlock+0xd/0x10 [<c015d257>] ? sys_delete_module+0x167/0x210 [<c019c40b>] ? do_munmap+0x22b/0x280 [<c0103af0>] ? sysenter_do_call+0x12/0x2c EIP: [<f8a52231>] rfkill_pause_polling+0x11/0x30 [rfkill] SS:ESP 0068:d808ddacSigned-off-by Senthil Balasubramanian <[email protected]>--- drivers/net/wireless/ath/ath9k/main.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)drivers/net/wireless/ath/ath9k/main.c +4
-4@@ -1288,9 +1288,6 @@ void ath_detach(struct ath_softc *sc)DPRINTF (sc,ATH_DBG_CONFIG ,"Detach ATH hw\n" ); -#if defined(CONFIG_RFKILL ) || defined(CONFIG_RFKILL_MODULE ) -ath_deinit_rfkill (sc); -#endif ath_deinit_leds (sc);cancel_work_sync (&sc->chan_work);cancel_delayed_work_sync (&sc->wiphy_work);@@ -1304,6 +1301,10 @@ void ath_detach(struct ath_softc *sc)ieee80211_free_hw (aphy->hw); }ieee80211_unregister_hw (hw); + +#if defined(CONFIG_RFKILL ) || defined(CONFIG_RFKILL_MODULE ) +ath_deinit_rfkill (sc); +#endif ath_rx_cleanup (sc);ath_tx_cleanup (sc); --1.6.0.4
cover ATH9K bug fixes - TX hang & Signal Quality issue
In reply to Senthil BalasubramanianQuoted 5 lines · Senthil Balasubramanian
This seris fixes couple of important issues
1) Signal Quality issue (patch 1/7)
2) INI update - fixes performance issue (Patch 2/7)
3) TX hang issue (happens after an hour time, Patch 6/7 & 7/7)
I'm sorry, but the changelog entries for those patches is insufficiently detailed -- especially if you want them merged as fixes for 2.6.31. I need a report with enough details for the fix to be properly evaluated and preferably a link to an actual bug report.
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you linville at tuxdriver.com might be all we have. Be ready.