From: Bob Copeland <me@bobcopeland.com>
To: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org
Subject: Re: [ath5k-devel] [PATCH] ath5k: set mac address in add_interface
Date: Fri, 21 Nov 2008 18:15:27 -0500 [thread overview]
Message-ID: <20081121231527.GA27720@hash.localnet> (raw)
In-Reply-To: <49272BEE.2020106@gmail.com>
On Fri, Nov 21, 2008 at 11:45:18PM +0200, Maxim Levitsky wrote:
>> I double check that I use right kernel (install it again).
>
> compiled kernel again, and installed it, same results.
Can you confirm that the proper mac address shows up if you do ifconfig
or macchanger -s? I think it's just not associating.
Also can you try specifying the ap again to trigger a probe after
ifconfig up:
$ iwconfig wlan0 ap <your AP's mac address>
Though I did forget about this gem, try this too:
diff --git a/drivers/net/wireless/ath5k/pcu.c b/drivers/net/wireless/ath5k/pcu.c
index d7f0c10..f401691 100644
--- a/drivers/net/wireless/ath5k/pcu.c
+++ b/drivers/net/wireless/ath5k/pcu.c
@@ -267,24 +267,23 @@ void ath5k_hw_get_lladdr(struct ath5k_hw *ah, u8 *mac)
* @mac: The card's mac address
*
* Set station id on hw using the provided mac address
- *
- * NOTE: This is only called during attach, don't call it
- * on reset because it overwrites all AR5K_STA_ID1 settings.
- * We have set_opmode (above) for reset.
*/
int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
{
u32 low_id, high_id;
+ u32 pcu_reg;
ATH5K_TRACE(ah->ah_sc);
/* Set new station ID */
memcpy(ah->ah_sta_id, mac, ETH_ALEN);
+ pcu_reg = ath5k_hw_reg_read(ah, AR5K_STA_ID1) & 0xffff0000;
+
low_id = AR5K_LOW_ID(mac);
high_id = AR5K_HIGH_ID(mac);
ath5k_hw_reg_write(ah, low_id, AR5K_STA_ID0);
- ath5k_hw_reg_write(ah, high_id, AR5K_STA_ID1);
+ ath5k_hw_reg_write(ah, pcu_reg | high_id, AR5K_STA_ID1);
return 0;
}
--
Bob Copeland %% www.bobcopeland.com
next prev parent reply other threads:[~2008-11-21 23:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 4:40 [PATCH] ath5k: set mac address in add_interface Bob Copeland
2008-11-21 19:49 ` Maxim Levitsky
2008-11-21 20:01 ` [ath5k-devel] " Bob Copeland
2008-11-21 20:53 ` Maxim Levitsky
2008-11-21 21:45 ` Maxim Levitsky
2008-11-21 23:15 ` Bob Copeland [this message]
2008-11-22 13:25 ` Maxim Levitsky
2008-12-15 15:47 ` Stefanik Gábor
2008-12-15 16:04 ` Dan Williams
2008-12-15 16:12 ` Stefanik Gábor
2008-12-15 16:22 ` Dan Williams
2008-12-15 17:16 ` [ath5k-devel] " Bob Copeland
2008-12-16 14:58 ` Bob Copeland
2008-12-16 15:01 ` Johannes Berg
2008-12-19 15:15 ` Bob Copeland
2008-12-20 9:46 ` Johannes Berg
2008-12-16 15:42 ` Stefanik Gábor
[not found] ` <20081215161435.M87237@bobcopeland.com>
2008-12-15 16:30 ` Stefanik Gábor
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=20081121231527.GA27720@hash.localnet \
--to=me@bobcopeland.com \
--cc=ath5k-devel@lists.ath5k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=maximlevitsky@gmail.com \
/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).