From: Sujith <m.sujith@gmail.com>
To: Mats Johannesson <spamcan1@abrasax.se>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [ath9k] 2.6.28-rc7-wl Kernel panic when "iwlist ath0 scan" as root
Date: Sat, 6 Dec 2008 23:22:04 +0530 [thread overview]
Message-ID: <18746.48068.593834.660064@localhost.localdomain> (raw)
In-Reply-To: <20081206180537.717d1791@loke.fish.not>
Mats Johannesson wrote:
> It fixes the kernel panic with root "iwlist ath0 scan" but after that
> the network dies without a sign of any kind (iwlist, ifconfig etc is
> normal, nothing in logs). Tried several times. Boot -> ping local and
> remote machine OK -> "iwlist ath0 scan" -> ping nonfunctional: 'no
> route to host' or some such message.
>
Ok, thanks for testing.
Can you check if this patch makes the connection stable ?
Please apply on top of the earlier patch.
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c
index d874223..9e5c0c0 100644
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -106,7 +106,7 @@ static void ath_beacon_setup(struct ath_softc *sc,
* XXX everything at min xmit rate
*/
rix = 0;
- rt = sc->hw_rate_table[sc->sc_curmode];
+ rt = sc->cur_rate_table;
rate = rt->info[rix].ratecode;
if (sc->sc_flags & SC_OP_PREAMBLE_SHORT)
rate |= rt->info[rix].short_preamble;
diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h
index 726d0a3..23844e0 100644
--- a/drivers/net/wireless/ath9k/core.h
+++ b/drivers/net/wireless/ath9k/core.h
@@ -646,7 +646,6 @@ struct ath_softc {
u8 sc_tx_chainmask;
u8 sc_rx_chainmask;
enum ath9k_int sc_imask;
- enum wireless_mode sc_curmode;
enum PROT_MODE sc_protmode;
u8 sc_nbcnvaps;
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 08f2949..5c6a1b0 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -60,7 +60,8 @@ static void bus_read_cachesize(struct ath_softc *sc, int *csz)
static void ath_setcurmode(struct ath_softc *sc, enum wireless_mode mode)
{
- sc->sc_curmode = mode;
+ if (!sc->sc_curaid)
+ sc->cur_rate_table = sc->hw_rate_table[mode];
/*
* All protection frames are transmited at 2Mb/s for
* 11g, otherwise at 1Mb/s.
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c
index 8eec667..0ae5988 100644
--- a/drivers/net/wireless/ath9k/rc.c
+++ b/drivers/net/wireless/ath9k/rc.c
@@ -874,9 +874,8 @@ static void ath_rc_ratefind(struct ath_softc *sc,
* So, set fourth rate in series to be same as third one for
* above conditions.
*/
- if ((sc->sc_curmode == ATH9K_MODE_11NG_HT20) ||
- (sc->sc_curmode == ATH9K_MODE_11NG_HT40PLUS) ||
- (sc->sc_curmode == ATH9K_MODE_11NG_HT40MINUS)) {
+ if ((sc->hw->conf.channel->band == IEEE80211_BAND_2GHZ) &&
+ (sc->hw->conf.ht.enabled)) {
u8 dot11rate = rate_table->info[rix].dot11rate;
u8 phy = rate_table->info[rix].phy;
if (i == 4 &&
@@ -1354,8 +1353,8 @@ static void ath_rc_init(struct ath_softc *sc,
sta->ht_cap.ht_supported,
is_cw_40);
} else if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) {
- /* sc_curmode would be set on init through config() */
- rate_table = sc->hw_rate_table[sc->sc_curmode];
+ /* cur_rate_table would be set on init through config() */
+ rate_table = sc->cur_rate_table;
}
if (!rate_table) {
diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c
index ec7edac..8aa8614 100644
--- a/drivers/net/wireless/ath9k/recv.c
+++ b/drivers/net/wireless/ath9k/recv.c
@@ -147,7 +147,7 @@ static int ath_rx_prepare(struct sk_buff *skb, struct ath_desc *ds,
struct ieee80211_rx_status *rx_status, bool *decrypt_error,
struct ath_softc *sc)
{
- struct ath_rate_table *rate_table = sc->hw_rate_table[sc->sc_curmode];
+ struct ath_rate_table *rate_table = sc->cur_rate_table;
struct ieee80211_hdr *hdr;
int ratekbps, rix;
u8 ratecode;
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index 9de27c6..353b7ed 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -493,7 +493,7 @@ static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, struct ath_buf *bf,
int width, int half_gi, bool shortPreamble)
{
- struct ath_rate_table *rate_table = sc->hw_rate_table[sc->sc_curmode];
+ struct ath_rate_table *rate_table = sc->cur_rate_table;
u32 nbits, nsymbits, duration, nsymbols;
u8 rc;
int streams, pktlen;
@@ -557,7 +557,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
}
/* get the cix for the lowest valid rix */
- rt = sc->hw_rate_table[sc->sc_curmode];
+ rt = sc->cur_rate_table;
for (i = 3; i >= 0; i--) {
if (rates[i].count && (rates[i].idx >= 0)) {
rix = rates[i].idx;
@@ -1240,7 +1240,7 @@ static u32 ath_lookup_rate(struct ath_softc *sc,
struct ath_buf *bf,
struct ath_atx_tid *tid)
{
- struct ath_rate_table *rate_table = sc->hw_rate_table[sc->sc_curmode];
+ struct ath_rate_table *rate_table = sc->cur_rate_table;
struct sk_buff *skb;
struct ieee80211_tx_info *tx_info;
struct ieee80211_tx_rate *rates;
@@ -1308,7 +1308,7 @@ static int ath_compute_num_delims(struct ath_softc *sc,
struct ath_buf *bf,
u16 frmlen)
{
- struct ath_rate_table *rt = sc->hw_rate_table[sc->sc_curmode];
+ struct ath_rate_table *rt = sc->cur_rate_table;
struct sk_buff *skb = bf->bf_mpdu;
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
u32 nsymbits, nsymbols, mpdudensity;
next prev parent reply other threads:[~2008-12-06 17:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-06 10:34 [ath9k] 2.6.28-rc7-wl Kernel panic when "iwlist ath0 scan" as root Mats Johannesson
2008-12-06 12:45 ` Mats Johannesson
2008-12-06 14:25 ` John W. Linville
2008-12-06 15:13 ` Mats Johannesson
2008-12-06 14:52 ` Sujith
2008-12-06 17:05 ` Mats Johannesson
2008-12-06 17:52 ` Sujith [this message]
2008-12-06 19:22 ` Mats Johannesson
2008-12-07 3:02 ` Sujith
2008-12-07 14:04 ` Mats Johannesson
2008-12-07 15:23 ` Sujith
2008-12-07 16:29 ` Mats Johannesson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18746.48068.593834.660064@localhost.localdomain \
--to=m.sujith@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=spamcan1@abrasax.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).