* ath5k: Fixes for mesh operation
@ 2010-12-01 2:18 Javier Cardona
2010-12-01 2:18 ` [PATCH 1/3] ath5k: Fix beaconing in mesh mode Javier Cardona
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Javier Cardona @ 2010-12-01 2:18 UTC (permalink / raw)
To: John W. Linville
Cc: Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
After applying these fixes we were able to successfully bring up mesh
interfaces and establish peer links with ath9k devices.
One issue still looms with both athX drivers: you have to issue a scan to get
mesh beaconing started. Keep that in mind if you try and test these fixes.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/3] ath5k: Fix beaconing in mesh mode
2010-12-01 2:18 ath5k: Fixes for mesh operation Javier Cardona
@ 2010-12-01 2:18 ` Javier Cardona
2010-12-01 13:16 ` Bob Copeland
2010-12-07 20:58 ` John W. Linville
2010-12-01 2:18 ` [PATCH 2/3] ath5k: Prevent mesh interfaces from being counted as ad-hoc Javier Cardona
` (2 subsequent siblings)
3 siblings, 2 replies; 15+ messages in thread
From: Javier Cardona @ 2010-12-01 2:18 UTC (permalink / raw)
To: John W. Linville
Cc: Javier Cardona, Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
This patch fixes the oops below when attempting to bring up a mesh
interface on ath5k hardware.
[ 128.933099] kernel BUG at drivers/net/wireless/ath/ath5k/base.c:197!
[ 128.933099] invalid opcode: 0000 [#1]
(...)
[ 128.933099] Call Trace:
[ 128.933099] [<c83b77fa>] ? ath5k_beacon_update+0x57/0x1f8 [ath5k]
[ 128.933099] [<c02d9a40>] ? __sysfs_add_one+0x28/0x76
[ 128.933099] [<c83b830e>] ? ath5k_bss_info_changed+0x13f/0x173
[ath5k]
[ 128.933099] [<c82ff629>] ? ieee80211_config_beacon+0xc0/0x17e
[mac80211]
[ 128.933099] [<c82f073e>] ?
ieee80211_bss_info_change_notify+0x182/0x18b [mac80211]
[ 128.933099] [<c83b81cf>] ? ath5k_bss_info_changed+0x0/0x173 [ath5k]
[ 128.933099] [<c82ff6d6>] ? ieee80211_config_beacon+0x16d/0x17e
[mac80211]
[ 128.933099] [<c82ff753>] ? ieee80211_add_beacon+0x34/0x39 [mac80211]
[ 128.933099] [<c830a4ed>] ? ieee80211s_init+0xf8/0x10f [mac80211]
[ 128.933099] [<c830a5df>] ? ieee80211_mesh_init_sdata+0xdb/0x154 [mac80211]
---
drivers/net/wireless/ath/ath5k/base.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index a8d380a..73c7118 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1921,8 +1921,9 @@ ath5k_beacon_send(struct ath5k_softc *sc)
/* NB: hw still stops DMA, so proceed */
}
- /* refresh the beacon for AP mode */
- if (sc->opmode == NL80211_IFTYPE_AP)
+ /* refresh the beacon for AP or MESH mode */
+ if (sc->opmode == NL80211_IFTYPE_AP ||
+ sc->opmode == NL80211_IFTYPE_MESH_POINT)
ath5k_beacon_update(sc->hw, vif);
ath5k_hw_set_txdp(ah, sc->bhalq, bf->daddr);
@@ -2826,7 +2827,8 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
/* Assign the vap/adhoc to a beacon xmit slot. */
if ((avf->opmode == NL80211_IFTYPE_AP) ||
- (avf->opmode == NL80211_IFTYPE_ADHOC)) {
+ (avf->opmode == NL80211_IFTYPE_ADHOC) ||
+ (avf->opmode == NL80211_IFTYPE_MESH_POINT)) {
int slot;
WARN_ON(list_empty(&sc->bcbuf));
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/3] ath5k: Prevent mesh interfaces from being counted as ad-hoc
2010-12-01 2:18 ath5k: Fixes for mesh operation Javier Cardona
2010-12-01 2:18 ` [PATCH 1/3] ath5k: Fix beaconing in mesh mode Javier Cardona
@ 2010-12-01 2:18 ` Javier Cardona
2010-12-07 20:58 ` John W. Linville
2010-12-01 2:18 ` [PATCH 3/3] ath5k: Put the right tsf value in mesh beacons Javier Cardona
2010-12-07 19:12 ` ath5k: Fixes for mesh operation Javier Cardona
3 siblings, 1 reply; 15+ messages in thread
From: Javier Cardona @ 2010-12-01 2:18 UTC (permalink / raw)
To: John W. Linville
Cc: Javier Cardona, Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
This results in an erroneus num_adhoc_vifs count, as the this counter
was incremented but not decremented for mesh interfaces.
---
drivers/net/wireless/ath/ath5k/base.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 73c7118..44f3050 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2847,7 +2847,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
sc->bslot[avf->bslot] = vif;
if (avf->opmode == NL80211_IFTYPE_AP)
sc->num_ap_vifs++;
- else
+ else if (avf->opmode == NL80211_IFTYPE_ADHOC)
sc->num_adhoc_vifs++;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/3] ath5k: Put the right tsf value in mesh beacons
2010-12-01 2:18 ath5k: Fixes for mesh operation Javier Cardona
2010-12-01 2:18 ` [PATCH 1/3] ath5k: Fix beaconing in mesh mode Javier Cardona
2010-12-01 2:18 ` [PATCH 2/3] ath5k: Prevent mesh interfaces from being counted as ad-hoc Javier Cardona
@ 2010-12-01 2:18 ` Javier Cardona
2010-12-07 20:57 ` John W. Linville
2010-12-07 19:12 ` ath5k: Fixes for mesh operation Javier Cardona
3 siblings, 1 reply; 15+ messages in thread
From: Javier Cardona @ 2010-12-01 2:18 UTC (permalink / raw)
To: John W. Linville
Cc: Javier Cardona, Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
---
drivers/net/wireless/ath/ath5k/base.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 44f3050..6b06754 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1889,7 +1889,8 @@ ath5k_beacon_send(struct ath5k_softc *sc)
sc->bmisscount = 0;
}
- if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) {
+ if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) ||
+ sc->opmode == NL80211_IFTYPE_MESH_POINT) {
u64 tsf = ath5k_hw_get_tsf64(ah);
u32 tsftu = TSF_TO_TU(tsf);
int slot = ((tsftu % sc->bintval) * ATH_BCBUF) / sc->bintval;
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] ath5k: Fix beaconing in mesh mode
2010-12-01 2:18 ` [PATCH 1/3] ath5k: Fix beaconing in mesh mode Javier Cardona
@ 2010-12-01 13:16 ` Bob Copeland
2010-12-01 18:23 ` Javier Cardona
2010-12-07 20:58 ` John W. Linville
1 sibling, 1 reply; 15+ messages in thread
From: Bob Copeland @ 2010-12-01 13:16 UTC (permalink / raw)
To: Javier Cardona
Cc: John W. Linville, Steve Derosier, devel, linux-wireless,
Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez
On Tue, Nov 30, 2010 at 9:18 PM, Javier Cardona <javier@cozybit.com> wrote:
> This patch fixes the oops below when attempting to bring up a mesh
> interface on ath5k hardware.
>
> [ 128.933099] kernel BUG at drivers/net/wireless/ath/ath5k/base.c:197!
> [ 128.933099] invalid opcode: 0000 [#1]
> (...)
> [ 128.933099] Call Trace:
> [ 128.933099] [<c83b77fa>] ? ath5k_beacon_update+0x57/0x1f8 [ath5k]
> [ 128.933099] [<c02d9a40>] ? __sysfs_add_one+0x28/0x76
> [ 128.933099] [<c83b830e>] ? ath5k_bss_info_changed+0x13f/0x173
> [ath5k]
> [ 128.933099] [<c82ff629>] ? ieee80211_config_beacon+0xc0/0x17e
> [mac80211]
> [ 128.933099] [<c82f073e>] ?
> ieee80211_bss_info_change_notify+0x182/0x18b [mac80211]
> [ 128.933099] [<c83b81cf>] ? ath5k_bss_info_changed+0x0/0x173 [ath5k]
> [ 128.933099] [<c82ff6d6>] ? ieee80211_config_beacon+0x16d/0x17e
> [mac80211]
> [ 128.933099] [<c82ff753>] ? ieee80211_add_beacon+0x34/0x39 [mac80211]
> [ 128.933099] [<c830a4ed>] ? ieee80211s_init+0xf8/0x10f [mac80211]
> [ 128.933099] [<c830a5df>] ? ieee80211_mesh_init_sdata+0xdb/0x154 [mac80211]
> ---
> drivers/net/wireless/ath/ath5k/base.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index a8d380a..73c7118 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -1921,8 +1921,9 @@ ath5k_beacon_send(struct ath5k_softc *sc)
> /* NB: hw still stops DMA, so proceed */
> }
>
> - /* refresh the beacon for AP mode */
> - if (sc->opmode == NL80211_IFTYPE_AP)
> + /* refresh the beacon for AP or MESH mode */
> + if (sc->opmode == NL80211_IFTYPE_AP ||
> + sc->opmode == NL80211_IFTYPE_MESH_POINT)
> ath5k_beacon_update(sc->hw, vif);
Do you need to update the beacon this often or just once?
Adhoc doesn't need to do this, for example, because it doesn't
need the TIM; I don't know about mesh.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] ath5k: Fix beaconing in mesh mode
2010-12-01 13:16 ` Bob Copeland
@ 2010-12-01 18:23 ` Javier Cardona
2010-12-02 1:16 ` Bruno Randolf
0 siblings, 1 reply; 15+ messages in thread
From: Javier Cardona @ 2010-12-01 18:23 UTC (permalink / raw)
To: Bob Copeland
Cc: John W. Linville, Steve Derosier, devel, linux-wireless,
Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez
Bob,
On Wed, Dec 1, 2010 at 5:16 AM, Bob Copeland <me@bobcopeland.com> wrote:
> On Tue, Nov 30, 2010 at 9:18 PM, Javier Cardona <javier@cozybit.com> wrote:
>> This patch fixes the oops below when attempting to bring up a mesh
>> interface on ath5k hardware.
>>
>> [ 128.933099] kernel BUG at drivers/net/wireless/ath/ath5k/base.c:197!
>> [ 128.933099] invalid opcode: 0000 [#1]
>> (...)
>> [ 128.933099] Call Trace:
>> [ 128.933099] [<c83b77fa>] ? ath5k_beacon_update+0x57/0x1f8 [ath5k]
>> [ 128.933099] [<c02d9a40>] ? __sysfs_add_one+0x28/0x76
>> [ 128.933099] [<c83b830e>] ? ath5k_bss_info_changed+0x13f/0x173
>> [ath5k]
>> [ 128.933099] [<c82ff629>] ? ieee80211_config_beacon+0xc0/0x17e
>> [mac80211]
>> [ 128.933099] [<c82f073e>] ?
>> ieee80211_bss_info_change_notify+0x182/0x18b [mac80211]
>> [ 128.933099] [<c83b81cf>] ? ath5k_bss_info_changed+0x0/0x173 [ath5k]
>> [ 128.933099] [<c82ff6d6>] ? ieee80211_config_beacon+0x16d/0x17e
>> [mac80211]
>> [ 128.933099] [<c82ff753>] ? ieee80211_add_beacon+0x34/0x39 [mac80211]
>> [ 128.933099] [<c830a4ed>] ? ieee80211s_init+0xf8/0x10f [mac80211]
>> [ 128.933099] [<c830a5df>] ? ieee80211_mesh_init_sdata+0xdb/0x154 [mac80211]
>> ---
>> drivers/net/wireless/ath/ath5k/base.c | 8 +++++---
>> 1 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
>> index a8d380a..73c7118 100644
>> --- a/drivers/net/wireless/ath/ath5k/base.c
>> +++ b/drivers/net/wireless/ath/ath5k/base.c
>> @@ -1921,8 +1921,9 @@ ath5k_beacon_send(struct ath5k_softc *sc)
>> /* NB: hw still stops DMA, so proceed */
>> }
>>
>> - /* refresh the beacon for AP mode */
>> - if (sc->opmode == NL80211_IFTYPE_AP)
>> + /* refresh the beacon for AP or MESH mode */
>> + if (sc->opmode == NL80211_IFTYPE_AP ||
>> + sc->opmode == NL80211_IFTYPE_MESH_POINT)
>> ath5k_beacon_update(sc->hw, vif);
>
> Do you need to update the beacon this often or just once?
> Adhoc doesn't need to do this, for example, because it doesn't
> need the TIM; I don't know about mesh.
Currently power save mode is not implemented for mesh interfaces, so
the TIM is not really updated or used. But yes, in principle mesh
beacons should include the TIM. So it's better to use AP style
beaconing to pave the way for someone implementing proper traffic info
maps and power save for mesh.
Thanks for reviewing.
Cheers,
Javier
--
Javier Cardona
cozybit Inc.
http://www.cozybit.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] ath5k: Fix beaconing in mesh mode
2010-12-01 18:23 ` Javier Cardona
@ 2010-12-02 1:16 ` Bruno Randolf
0 siblings, 0 replies; 15+ messages in thread
From: Bruno Randolf @ 2010-12-02 1:16 UTC (permalink / raw)
To: Javier Cardona
Cc: Bob Copeland, John W. Linville, Steve Derosier, devel,
linux-wireless, Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez
On Thu December 2 2010 03:23:07 Javier Cardona wrote:
> > Do you need to update the beacon this often or just once?
> > Adhoc doesn't need to do this, for example, because it doesn't
> > need the TIM; I don't know about mesh.
>
> Currently power save mode is not implemented for mesh interfaces, so
> the TIM is not really updated or used. But yes, in principle mesh
> beacons should include the TIM. So it's better to use AP style
> beaconing to pave the way for someone implementing proper traffic info
> maps and power save for mesh.
I have been thinking the same. Using the same style beaconing for AP, ad-hoc
and mesh mode could simplify the code, and make it easier to implement TIM or
DFS later.
bruno
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ath5k: Fixes for mesh operation
2010-12-01 2:18 ath5k: Fixes for mesh operation Javier Cardona
` (2 preceding siblings ...)
2010-12-01 2:18 ` [PATCH 3/3] ath5k: Put the right tsf value in mesh beacons Javier Cardona
@ 2010-12-07 19:12 ` Javier Cardona
2010-12-07 20:57 ` John W. Linville
3 siblings, 1 reply; 15+ messages in thread
From: Javier Cardona @ 2010-12-07 19:12 UTC (permalink / raw)
To: John W. Linville
Cc: Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
John,
Are you waiting for acks from ath5k maintainers to apply this series?
https://patchwork.kernel.org/patch/369461/
https://patchwork.kernel.org/patch/369471/
https://patchwork.kernel.org/patch/369481/
Thanks!
Javier
On Tue, Nov 30, 2010 at 6:18 PM, Javier Cardona <javier@cozybit.com> wrote:
> After applying these fixes we were able to successfully bring up mesh
> interfaces and establish peer links with ath9k devices.
>
> One issue still looms with both athX drivers: you have to issue a scan to get
> mesh beaconing started. Keep that in mind if you try and test these fixes.
>
>
--
Javier Cardona
cozybit Inc.
http://www.cozybit.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ath5k: Fixes for mesh operation
2010-12-07 19:12 ` ath5k: Fixes for mesh operation Javier Cardona
@ 2010-12-07 20:57 ` John W. Linville
0 siblings, 0 replies; 15+ messages in thread
From: John W. Linville @ 2010-12-07 20:57 UTC (permalink / raw)
To: Javier Cardona
Cc: Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
Waiting on davem to process my last pull request...
On Tue, Dec 07, 2010 at 11:12:55AM -0800, Javier Cardona wrote:
> John,
>
> Are you waiting for acks from ath5k maintainers to apply this series?
>
> https://patchwork.kernel.org/patch/369461/
> https://patchwork.kernel.org/patch/369471/
> https://patchwork.kernel.org/patch/369481/
>
> Thanks!
>
> Javier
>
> On Tue, Nov 30, 2010 at 6:18 PM, Javier Cardona <javier@cozybit.com> wrote:
> > After applying these fixes we were able to successfully bring up mesh
> > interfaces and establish peer links with ath9k devices.
> >
> > One issue still looms with both athX drivers: you have to issue a scan to get
> > mesh beaconing started. Keep that in mind if you try and test these fixes.
> >
> >
>
>
>
> --
> Javier Cardona
> cozybit Inc.
> http://www.cozybit.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] ath5k: Put the right tsf value in mesh beacons
2010-12-01 2:18 ` [PATCH 3/3] ath5k: Put the right tsf value in mesh beacons Javier Cardona
@ 2010-12-07 20:57 ` John W. Linville
2010-12-07 21:37 ` Javier Cardona
0 siblings, 1 reply; 15+ messages in thread
From: John W. Linville @ 2010-12-07 20:57 UTC (permalink / raw)
To: Javier Cardona
Cc: Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
Missing Signed-off-by...
On Tue, Nov 30, 2010 at 06:18:39PM -0800, Javier Cardona wrote:
> ---
> drivers/net/wireless/ath/ath5k/base.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 44f3050..6b06754 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -1889,7 +1889,8 @@ ath5k_beacon_send(struct ath5k_softc *sc)
> sc->bmisscount = 0;
> }
>
> - if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) {
> + if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) ||
> + sc->opmode == NL80211_IFTYPE_MESH_POINT) {
> u64 tsf = ath5k_hw_get_tsf64(ah);
> u32 tsftu = TSF_TO_TU(tsf);
> int slot = ((tsftu % sc->bintval) * ATH_BCBUF) / sc->bintval;
> --
> 1.7.1
>
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] ath5k: Fix beaconing in mesh mode
2010-12-01 2:18 ` [PATCH 1/3] ath5k: Fix beaconing in mesh mode Javier Cardona
2010-12-01 13:16 ` Bob Copeland
@ 2010-12-07 20:58 ` John W. Linville
2010-12-07 21:35 ` Javier Cardona
1 sibling, 1 reply; 15+ messages in thread
From: John W. Linville @ 2010-12-07 20:58 UTC (permalink / raw)
To: Javier Cardona
Cc: Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
Missing Signed-off-by...
On Tue, Nov 30, 2010 at 06:18:37PM -0800, Javier Cardona wrote:
> This patch fixes the oops below when attempting to bring up a mesh
> interface on ath5k hardware.
>
> [ 128.933099] kernel BUG at drivers/net/wireless/ath/ath5k/base.c:197!
> [ 128.933099] invalid opcode: 0000 [#1]
> (...)
> [ 128.933099] Call Trace:
> [ 128.933099] [<c83b77fa>] ? ath5k_beacon_update+0x57/0x1f8 [ath5k]
> [ 128.933099] [<c02d9a40>] ? __sysfs_add_one+0x28/0x76
> [ 128.933099] [<c83b830e>] ? ath5k_bss_info_changed+0x13f/0x173
> [ath5k]
> [ 128.933099] [<c82ff629>] ? ieee80211_config_beacon+0xc0/0x17e
> [mac80211]
> [ 128.933099] [<c82f073e>] ?
> ieee80211_bss_info_change_notify+0x182/0x18b [mac80211]
> [ 128.933099] [<c83b81cf>] ? ath5k_bss_info_changed+0x0/0x173 [ath5k]
> [ 128.933099] [<c82ff6d6>] ? ieee80211_config_beacon+0x16d/0x17e
> [mac80211]
> [ 128.933099] [<c82ff753>] ? ieee80211_add_beacon+0x34/0x39 [mac80211]
> [ 128.933099] [<c830a4ed>] ? ieee80211s_init+0xf8/0x10f [mac80211]
> [ 128.933099] [<c830a5df>] ? ieee80211_mesh_init_sdata+0xdb/0x154 [mac80211]
> ---
> drivers/net/wireless/ath/ath5k/base.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index a8d380a..73c7118 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -1921,8 +1921,9 @@ ath5k_beacon_send(struct ath5k_softc *sc)
> /* NB: hw still stops DMA, so proceed */
> }
>
> - /* refresh the beacon for AP mode */
> - if (sc->opmode == NL80211_IFTYPE_AP)
> + /* refresh the beacon for AP or MESH mode */
> + if (sc->opmode == NL80211_IFTYPE_AP ||
> + sc->opmode == NL80211_IFTYPE_MESH_POINT)
> ath5k_beacon_update(sc->hw, vif);
>
> ath5k_hw_set_txdp(ah, sc->bhalq, bf->daddr);
> @@ -2826,7 +2827,8 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
>
> /* Assign the vap/adhoc to a beacon xmit slot. */
> if ((avf->opmode == NL80211_IFTYPE_AP) ||
> - (avf->opmode == NL80211_IFTYPE_ADHOC)) {
> + (avf->opmode == NL80211_IFTYPE_ADHOC) ||
> + (avf->opmode == NL80211_IFTYPE_MESH_POINT)) {
> int slot;
>
> WARN_ON(list_empty(&sc->bcbuf));
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] ath5k: Prevent mesh interfaces from being counted as ad-hoc
2010-12-01 2:18 ` [PATCH 2/3] ath5k: Prevent mesh interfaces from being counted as ad-hoc Javier Cardona
@ 2010-12-07 20:58 ` John W. Linville
2010-12-07 21:36 ` Javier Cardona
0 siblings, 1 reply; 15+ messages in thread
From: John W. Linville @ 2010-12-07 20:58 UTC (permalink / raw)
To: Javier Cardona
Cc: Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
Missing Signed-off-by...
On Tue, Nov 30, 2010 at 06:18:38PM -0800, Javier Cardona wrote:
> This results in an erroneus num_adhoc_vifs count, as the this counter
> was incremented but not decremented for mesh interfaces.
> ---
> drivers/net/wireless/ath/ath5k/base.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 73c7118..44f3050 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -2847,7 +2847,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
> sc->bslot[avf->bslot] = vif;
> if (avf->opmode == NL80211_IFTYPE_AP)
> sc->num_ap_vifs++;
> - else
> + else if (avf->opmode == NL80211_IFTYPE_ADHOC)
> sc->num_adhoc_vifs++;
> }
>
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/3] ath5k: Fix beaconing in mesh mode
2010-12-07 20:58 ` John W. Linville
@ 2010-12-07 21:35 ` Javier Cardona
0 siblings, 0 replies; 15+ messages in thread
From: Javier Cardona @ 2010-12-07 21:35 UTC (permalink / raw)
To: John W. Linville
Cc: Javier Cardona, Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
This patch fixes the oops below when attempting to bring up a mesh
interface on ath5k hardware.
[ 128.933099] kernel BUG at drivers/net/wireless/ath/ath5k/base.c:197!
[ 128.933099] invalid opcode: 0000 [#1]
(...)
[ 128.933099] Call Trace:
[ 128.933099] [<c83b77fa>] ? ath5k_beacon_update+0x57/0x1f8 [ath5k]
[ 128.933099] [<c02d9a40>] ? __sysfs_add_one+0x28/0x76
[ 128.933099] [<c83b830e>] ? ath5k_bss_info_changed+0x13f/0x173
[ath5k]
[ 128.933099] [<c82ff629>] ? ieee80211_config_beacon+0xc0/0x17e
[mac80211]
[ 128.933099] [<c82f073e>] ?
ieee80211_bss_info_change_notify+0x182/0x18b [mac80211]
[ 128.933099] [<c83b81cf>] ? ath5k_bss_info_changed+0x0/0x173 [ath5k]
[ 128.933099] [<c82ff6d6>] ? ieee80211_config_beacon+0x16d/0x17e
[mac80211]
[ 128.933099] [<c82ff753>] ? ieee80211_add_beacon+0x34/0x39 [mac80211]
[ 128.933099] [<c830a4ed>] ? ieee80211s_init+0xf8/0x10f [mac80211]
[ 128.933099] [<c830a5df>] ? ieee80211_mesh_init_sdata+0xdb/0x154 [mac80211]
Signed-off-by: Javier Cardona <javier@cozybit.com>
---
drivers/net/wireless/ath/ath5k/base.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 0a7071a..6c35730 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1913,8 +1913,9 @@ ath5k_beacon_send(struct ath5k_softc *sc)
/* NB: hw still stops DMA, so proceed */
}
- /* refresh the beacon for AP mode */
- if (sc->opmode == NL80211_IFTYPE_AP)
+ /* refresh the beacon for AP or MESH mode */
+ if (sc->opmode == NL80211_IFTYPE_AP ||
+ sc->opmode == NL80211_IFTYPE_MESH_POINT)
ath5k_beacon_update(sc->hw, vif);
ath5k_hw_set_txdp(ah, sc->bhalq, bf->daddr);
@@ -2977,7 +2978,8 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
/* Assign the vap/adhoc to a beacon xmit slot. */
if ((avf->opmode == NL80211_IFTYPE_AP) ||
- (avf->opmode == NL80211_IFTYPE_ADHOC)) {
+ (avf->opmode == NL80211_IFTYPE_ADHOC) ||
+ (avf->opmode == NL80211_IFTYPE_MESH_POINT)) {
int slot;
WARN_ON(list_empty(&sc->bcbuf));
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/3] ath5k: Prevent mesh interfaces from being counted as ad-hoc
2010-12-07 20:58 ` John W. Linville
@ 2010-12-07 21:36 ` Javier Cardona
0 siblings, 0 replies; 15+ messages in thread
From: Javier Cardona @ 2010-12-07 21:36 UTC (permalink / raw)
To: John W. Linville
Cc: Javier Cardona, Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
This results in an erroneus num_adhoc_vifs count, as the this counter
was incremented but not decremented for mesh interfaces.
Signed-off-by: Javier Cardona <javier@cozybit.com>
---
drivers/net/wireless/ath/ath5k/base.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 6c35730..2bf2e28 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2998,7 +2998,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
sc->bslot[avf->bslot] = vif;
if (avf->opmode == NL80211_IFTYPE_AP)
sc->num_ap_vifs++;
- else
+ else if (avf->opmode == NL80211_IFTYPE_ADHOC)
sc->num_adhoc_vifs++;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/3] ath5k: Put the right tsf value in mesh beacons
2010-12-07 20:57 ` John W. Linville
@ 2010-12-07 21:37 ` Javier Cardona
0 siblings, 0 replies; 15+ messages in thread
From: Javier Cardona @ 2010-12-07 21:37 UTC (permalink / raw)
To: John W. Linville
Cc: Javier Cardona, Steve Derosier, devel, linux-wireless, Jiri Slaby,
Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
Signed-off-by: Javier Cardona <javier@cozybit.com>
---
drivers/net/wireless/ath/ath5k/base.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 2bf2e28..ac7da50 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1881,7 +1881,8 @@ ath5k_beacon_send(struct ath5k_softc *sc)
sc->bmisscount = 0;
}
- if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) {
+ if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) ||
+ sc->opmode == NL80211_IFTYPE_MESH_POINT) {
u64 tsf = ath5k_hw_get_tsf64(ah);
u32 tsftu = TSF_TO_TU(tsf);
int slot = ((tsftu % sc->bintval) * ATH_BCBUF) / sc->bintval;
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2010-12-07 21:42 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-01 2:18 ath5k: Fixes for mesh operation Javier Cardona
2010-12-01 2:18 ` [PATCH 1/3] ath5k: Fix beaconing in mesh mode Javier Cardona
2010-12-01 13:16 ` Bob Copeland
2010-12-01 18:23 ` Javier Cardona
2010-12-02 1:16 ` Bruno Randolf
2010-12-07 20:58 ` John W. Linville
2010-12-07 21:35 ` Javier Cardona
2010-12-01 2:18 ` [PATCH 2/3] ath5k: Prevent mesh interfaces from being counted as ad-hoc Javier Cardona
2010-12-07 20:58 ` John W. Linville
2010-12-07 21:36 ` Javier Cardona
2010-12-01 2:18 ` [PATCH 3/3] ath5k: Put the right tsf value in mesh beacons Javier Cardona
2010-12-07 20:57 ` John W. Linville
2010-12-07 21:37 ` Javier Cardona
2010-12-07 19:12 ` ath5k: Fixes for mesh operation Javier Cardona
2010-12-07 20:57 ` John W. Linville
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).