* Re: [PATCH] wireless: ipw2100: check result of kzalloc()
From: Dan Carpenter @ 2010-08-03 8:17 UTC (permalink / raw)
To: Christoph Fritz
Cc: John W. Linville, kernel-janitors, Zhu Yi, David S. Miller,
Reinette Chatre, linux-wireless
In-Reply-To: <1280797822.11158.55.camel@lovely.krouter>
On Tue, Aug 03, 2010 at 03:10:22AM +0200, Christoph Fritz wrote:
> If kzalloc() fails return with -ENOMEM from ipw2100_net_init() which is
> called by register_netdev.
>
> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
> ---
> drivers/net/wireless/ipw2x00/ipw2100.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
> index 0bd4dfa..908c176 100644
> --- a/drivers/net/wireless/ipw2x00/ipw2100.c
> +++ b/drivers/net/wireless/ipw2x00/ipw2100.c
> @@ -1924,6 +1924,8 @@ static int ipw2100_net_init(struct net_device *dev)
> bg_band->channels =
> kzalloc(geo->bg_channels *
> sizeof(struct ieee80211_channel), GFP_KERNEL);
> + if (!bg_band->channels)
There should be an "ipw2100_down(priv);" on the error path here.
> + return -ENOMEM;
> /* translate geo->bg to bg_band.channels */
regards,
dan carpenter
^ permalink raw reply
* Re: iwlwifi connection problems
From: Johannes Berg @ 2010-08-03 6:39 UTC (permalink / raw)
To: Alex Romosan; +Cc: Guy, Wey-Yi, linux-wireless@vger.kernel.org
In-Reply-To: <87aap4z70b.fsf@sycorax.lbl.gov>
On Mon, 2010-08-02 at 20:53 -0700, Alex Romosan wrote:
> Johannes Berg <johannes@sipsolutions.net> writes:
>
> > On Mon, 2010-08-02 at 08:42 -0700, Alex Romosan wrote:
> >
> >> so i think i finally managed to track this down. doing a git bisect i
> >> get:
> >>
> >> 3474ad635db371b0d8d0ee40086f15d223d5b6a4 is the first bad commit
> >> commit 3474ad635db371b0d8d0ee40086f15d223d5b6a4
> >> Author: Johannes Berg <johannes.berg@intel.com>
> >> Date: Thu Apr 29 04:43:05 2010 -0700
> >>
> >> iwlwifi: apply filter flags directly
> >
> >> ...
> >
> > Thanks. I'll take a closer look tomorrow, am about to leave for today.
>
> so i looked a little bit more at what happened. the only difference
> between the non working and the working version is a call to
> iwlcore_commit_rxon(priv) on line 1327 of iwl-core.c (the version in
> 2.6.35). if i comment that line out then i can connect to the access
> point without problems. hope this helps.
Yes, thank you, but it's very strange. But it's probably ok, let's
remove the call then, it wasn't there before. Want to post a patch
yourself?
johannes
^ permalink raw reply
* reminder: bug fixes only
From: David Miller @ 2010-08-03 5:48 UTC (permalink / raw)
To: netdev; +Cc: linux-wireless
2.6.35 is out, we're about to enter the merge window, so
if it isn't already in my tree I don't want to see it unless
it's a bug fix.
Thanks.
^ permalink raw reply
* [PATCH] mac80211: Fix compilation warning when CONFIG_INET is not set
From: Juuso Oikarinen @ 2010-08-03 5:22 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
The warning is:
net/mac80211/main.c:688: warning: label ‘fail_ifa’ defined but not used
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
---
net/mac80211/main.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 7cc4f91..798a91b 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -685,10 +685,12 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
return 0;
+#ifdef CONFIG_INET
fail_ifa:
pm_qos_remove_notifier(PM_QOS_NETWORK_LATENCY,
&local->network_latency_notifier);
rtnl_lock();
+#endif
fail_pm_qos:
ieee80211_led_exit(local);
ieee80211_remove_interfaces(local);
--
1.6.3.3
^ permalink raw reply related
* Re: virtual access point setup
From: Ben Greear @ 2010-08-03 4:56 UTC (permalink / raw)
To: Ryszard; +Cc: Florian Fainelli, Patrick McHardy, linux-wireless
In-Reply-To: <AANLkTik0Ebk6zcTi29pofUvzmVDmRwi4hthj+66k9-V0@mail.gmail.com>
On 08/02/2010 05:09 PM, Ryszard wrote:
> hey ben,
>
> here is a list of actions i've done just now to get the previously
> mentioned stack trace:
> ==============================================
> 1. restart box
> 2. uname -a Linux sknwireless 2.6.32-22-generic #33-Ubuntu SMP Wed Apr
> 28 13:27:30 UTC 2010 i586 GNU/Linux
> 3.lsmod:
> Module Size Used by
> ipt_REDIRECT 917 3
> ipt_MASQUERADE 1407 3
> xt_state 1098 6
> xt_tcpudp 2011 33
> iptable_filter 2271 1
> nf_nat_ftp 1836 0
> iptable_nat 4414 1
> ip_tables 9991 2 iptable_filter,iptable_nat
> nf_nat 15735 4
> ipt_REDIRECT,ipt_MASQUERADE,nf_nat_ftp,iptable_nat
> x_tables 14299 6
> ipt_REDIRECT,ipt_MASQUERADE,xt_state,xt_tcpudp,iptable_nat,ip_tables
> nf_conntrack_ftp 5381 1 nf_nat_ftp
> nf_conntrack_ipv4 10672 9 iptable_nat,nf_nat
> nf_conntrack 61583 7
> ipt_MASQUERADE,xt_state,nf_nat_ftp,iptable_nat,nf_nat,nf_conntrack_ftp,nf_conntrack_ipv4
> nf_defrag_ipv4 1073 1 nf_conntrack_ipv4
> arc4 1153 2
> aes_i586 7268 0
> ath5k 118956 0
> aes_generic 26863 1 aes_i586
> mac80211 206808 1 ath5k
> ath 7611 1 ath5k
> leds_alix2 1470 0
> geode_aes 4558 0
> cs5535_gpio 2571 0
> cfg80211 125477 3 ath5k,mac80211,ath
> geode_rng 1011 0
> led_class 2864 2 ath5k,leds_alix2
> pata_cs5536 3224 0
> pata_amd 8766 1
> via_rhine 19154 0
> mii 4381 1 via_rhine
>
> 4. rmmod ath5k
> 5. modprobe ath5k nohwcrypt=1
> 6. syslog shows no stack trace
> 7. iw dev wlan0 interface add sta0 type station
> 8. ifconfig sta0
> sta0 Link encap:Ethernet HWaddr 00:0b:6b:22:5b:cd
> BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
>
> 9. iwconfig sta0
> sta0 IEEE 802.11abg ESSID:off/any
> Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
> Retry long limit:7 RTS thr:off Fragment thr:off
> Encryption key:off
> Power Management:off
> 10. no syslog stacktrace
> 11. iw dev wlan0 interface add vap0 type __ap
> 12. ifconfig vap0
> vap0 Link encap:Ethernet HWaddr 00:0b:6b:22:5b:cd
> BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
>
> 13. iwconfig vap0
> vap0 IEEE 802.11abg Mode:Master Tx-Power=20 dBm
> Retry long limit:7 RTS thr:off Fragment thr:off
> Power Management:off
> 14. no syslog stacktrace
> 15. iw dev wlan0 interface add vap1 type __ap
> 16. ifconfig vap1
> vap1 Link encap:Ethernet HWaddr 00:0b:6b:22:5b:cd
> BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> 17. iwconfig vap1
> vap1 IEEE 802.11abg Mode:Master Tx-Power=20 dBm
> Retry long limit:7 RTS thr:off Fragment thr:off
> Power Management:off
> 18. no syslog stacktrace
> 19. ifconfig vap0 172.16.40.1 up
> SIOCSIFFLAGS: Name not unique on network
> SIOCSIFFLAGS: Name not unique on network
> 20. no syslog stacktrace
> 21 ifconfig vap1 172.16.40.1 up
> SIOCSIFFLAGS: Name not unique on network
> SIOCSIFFLAGS: Name not unique on network
> 22. no syslog stacktrace
> 23. macchanger vap0
> Current MAC: 00:0b:6b:22:5b:cd (Wistron Neweb Corp.)
> Faked MAC: 00:0b:6b:22:5b:ce (Wistron Neweb Corp.)
> 24. no syslog stacktrace
> 25. macchanger vap1
> Current MAC: 00:0b:6b:22:5b:cd (Wistron Neweb Corp.)
> Faked MAC: 00:0b:6b:22:5b:ce (Wistron Neweb Corp.)
> 26. no syslog stacktrace
> 27. ifconfig vap0 172.168.40.1 up
> 28. syslog stacktrace:
> Aug 3 10:04:03 sknwireless kernel: [ 908.740408] ------------[ cut
> here ]------------
> Aug 3 10:04:03 sknwireless kernel: [ 908.740479] WARNING: at
> /home/skn/wireless/compat-wireless-2.6.32.15/drivers/net/wireless/ath/ath5k/base.c:3221
It appears you are not using our 2.6.31.12 kernel. Our wifi patches never
made it upstream..so you have to use the kernel from our site to have any
chance of success.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: iwlwifi connection problems
From: Alex Romosan @ 2010-08-03 3:53 UTC (permalink / raw)
To: Johannes Berg; +Cc: Guy, Wey-Yi, linux-wireless@vger.kernel.org
In-Reply-To: <1280766201.24503.0.camel@jlt3.sipsolutions.net>
Johannes Berg <johannes@sipsolutions.net> writes:
> On Mon, 2010-08-02 at 08:42 -0700, Alex Romosan wrote:
>
>> so i think i finally managed to track this down. doing a git bisect i
>> get:
>>
>> 3474ad635db371b0d8d0ee40086f15d223d5b6a4 is the first bad commit
>> commit 3474ad635db371b0d8d0ee40086f15d223d5b6a4
>> Author: Johannes Berg <johannes.berg@intel.com>
>> Date: Thu Apr 29 04:43:05 2010 -0700
>>
>> iwlwifi: apply filter flags directly
>
>> ...
>
> Thanks. I'll take a closer look tomorrow, am about to leave for today.
so i looked a little bit more at what happened. the only difference
between the non working and the working version is a call to
iwlcore_commit_rxon(priv) on line 1327 of iwl-core.c (the version in
2.6.35). if i comment that line out then i can connect to the access
point without problems. hope this helps.
--alex--
--
| I believe the moment is at hand when, by a paranoiac and active |
| advance of the mind, it will be possible (simultaneously with |
| automatism and other passive states) to systematize confusion |
| and thus to help to discredit completely the world of reality. |
^ permalink raw reply
* Re: [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Justin P. Mattock @ 2010-08-03 3:44 UTC (permalink / raw)
To: Julian Calaby; +Cc: linux-wireless, j, linville, mcgrof
In-Reply-To: <AANLkTinbSvn=kjkvf1VceH3oLsScT5KxtwhSdfGuy5_a@mail.gmail.com>
On 08/02/2010 08:31 PM, Julian Calaby wrote:
> On Tue, Aug 3, 2010 at 12:49, Justin P. Mattock<justinmattock@gmail.com> wrote:
>> On 08/02/2010 07:31 PM, Julian Calaby wrote:
>>>
>>> On Tue, Aug 3, 2010 at 12:23, Justin P. Mattock<justinmattock@gmail.com>
>>> wrote:
>>>>
>>>> wait im lost.. looking at your patch looks the same(number wise) except I
>>>> see different parts of code in there:
>>>>
>>>> hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
>>>> HFA384X_ROAMING_FIRMWARE);
>>>>
>>>> - return 0;
>>>> + return ret;
>>>>
>>>>
>>>>
>>>> mine is:
>>>>
>>>> printk(KERN_DEBUG "SCANREQUEST failed\n");
>>>> - ret = -EINVAL;
>>>> + return ret;
>>>>
>>>>
>>>> The tree Im using is Linus's tree.
>>>
>>> I'm using wireless-testing, and the line you're changing is #1692, I'm
>>> changing #1699.
>>>
>>> Thanks,
>>>
>>
>>
>> ahh.. so there's two return ret's that need to be added then..
>> (if so then go ahead and take my patch and add it to yours.. I'm off to
>> other things)
>
> No.
>
> The function works like this:
>
> 1. set up scan_req
> 2. if local->host_roaming is not set, set host roaming on the hardware
> 3. set scan_req on the hardware
> 4. if local->host_roaming is not set, set the hardware to do firmware roaming
> 5. If set_req could not be set on the hardware, return -EINVAL,
> otherwise return 0.
>
> The significant bits are steps 2 and 4. These must *both* be executed,
> regardless of whether setting scan_req on the hardware succeeds or
> not.
>
> As such, the return value is stored in the ret variable, which is
> initialised to 0 initially, then set to -EINVAL if setting scan_req on
> the hardware fails. Hence, step 5 can be performed by returning ret.
>
> As such, all of your patches are wrong as they are either returning
> the wrong value when setting scan_req on the hardware fails, or
> failing to execute step 4. The *only* correct place to return a value
> is once the roaming status of the hardware has been set properly -
> i.e. at the end of the function.
>
> I hope this has cleared up your confusion.
>
> Thanks,
>
cleared it up perfectly... didnt think that using ret down more would
work..(was stuck a few lines up) but it does.. just tested your version
out and no warning messages..
cheers,
Justin P. Mattock
^ permalink raw reply
* Re: [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Julian Calaby @ 2010-08-03 3:31 UTC (permalink / raw)
To: Justin P. Mattock; +Cc: linux-wireless, j, linville, mcgrof
In-Reply-To: <4C5783AD.4060405@gmail.com>
On Tue, Aug 3, 2010 at 12:49, Justin P. Mattock <justinmattock@gmail.com> wrote:
> On 08/02/2010 07:31 PM, Julian Calaby wrote:
>>
>> On Tue, Aug 3, 2010 at 12:23, Justin P. Mattock<justinmattock@gmail.com>
>> wrote:
>>>
>>> wait im lost.. looking at your patch looks the same(number wise) except I
>>> see different parts of code in there:
>>>
>>> hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
>>> HFA384X_ROAMING_FIRMWARE);
>>>
>>> - return 0;
>>> + return ret;
>>>
>>>
>>>
>>> mine is:
>>>
>>> printk(KERN_DEBUG "SCANREQUEST failed\n");
>>> - ret = -EINVAL;
>>> + return ret;
>>>
>>>
>>> The tree Im using is Linus's tree.
>>
>> I'm using wireless-testing, and the line you're changing is #1692, I'm
>> changing #1699.
>>
>> Thanks,
>>
>
>
> ahh.. so there's two return ret's that need to be added then..
> (if so then go ahead and take my patch and add it to yours.. I'm off to
> other things)
No.
The function works like this:
1. set up scan_req
2. if local->host_roaming is not set, set host roaming on the hardware
3. set scan_req on the hardware
4. if local->host_roaming is not set, set the hardware to do firmware roaming
5. If set_req could not be set on the hardware, return -EINVAL,
otherwise return 0.
The significant bits are steps 2 and 4. These must *both* be executed,
regardless of whether setting scan_req on the hardware succeeds or
not.
As such, the return value is stored in the ret variable, which is
initialised to 0 initially, then set to -EINVAL if setting scan_req on
the hardware fails. Hence, step 5 can be performed by returning ret.
As such, all of your patches are wrong as they are either returning
the wrong value when setting scan_req on the hardware fails, or
failing to execute step 4. The *only* correct place to return a value
is once the roaming status of the hardware has been set properly -
i.e. at the end of the function.
I hope this has cleared up your confusion.
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/
^ permalink raw reply
* Re: [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Justin P. Mattock @ 2010-08-03 2:49 UTC (permalink / raw)
To: Julian Calaby; +Cc: linux-wireless, j, linville, mcgrof
In-Reply-To: <AANLkTi=ZEKts2eW8KjvkNN0h5ogPkEwjfjbMYHjcjx+s@mail.gmail.com>
On 08/02/2010 07:31 PM, Julian Calaby wrote:
> On Tue, Aug 3, 2010 at 12:23, Justin P. Mattock<justinmattock@gmail.com> wrote:
>> wait im lost.. looking at your patch looks the same(number wise) except I
>> see different parts of code in there:
>>
>> hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
>> HFA384X_ROAMING_FIRMWARE);
>>
>> - return 0;
>> + return ret;
>>
>>
>>
>> mine is:
>>
>> printk(KERN_DEBUG "SCANREQUEST failed\n");
>> - ret = -EINVAL;
>> + return ret;
>>
>>
>> The tree Im using is Linus's tree.
>
> I'm using wireless-testing, and the line you're changing is #1692, I'm
> changing #1699.
>
> Thanks,
>
ahh.. so there's two return ret's that need to be added then..
(if so then go ahead and take my patch and add it to yours.. I'm off to
other things)
cheers,
Justin P. Mattock
^ permalink raw reply
* Re: [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Julian Calaby @ 2010-08-03 2:31 UTC (permalink / raw)
To: Justin P. Mattock; +Cc: linux-wireless, j, linville, mcgrof
In-Reply-To: <4C577DB3.4050902@gmail.com>
On Tue, Aug 3, 2010 at 12:23, Justin P. Mattock <justinmattock@gmail.com> wrote:
> wait im lost.. looking at your patch looks the same(number wise) except I
> see different parts of code in there:
>
> hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
> HFA384X_ROAMING_FIRMWARE);
>
> - return 0;
> + return ret;
>
>
>
> mine is:
>
> printk(KERN_DEBUG "SCANREQUEST failed\n");
> - ret = -EINVAL;
> + return ret;
>
>
> The tree Im using is Linus's tree.
I'm using wireless-testing, and the line you're changing is #1692, I'm
changing #1699.
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/
^ permalink raw reply
* Re: [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Justin P. Mattock @ 2010-08-03 2:23 UTC (permalink / raw)
To: Julian Calaby; +Cc: linux-wireless, j, linville, mcgrof
In-Reply-To: <AANLkTimmiraT1wV_=zxUmfKPz7D78uOdY4s67pVXOntA@mail.gmail.com>
On 08/02/2010 06:58 PM, Julian Calaby wrote:
> On Tue, Aug 3, 2010 at 11:46, Justin P. Mattock<justinmattock@gmail.com> wrote:
>> Resend version 3
>>
>> The below patch fixes a warning message generated by GCC:
>> CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
>> drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
>> drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
>>
>> Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>>
>> ---
>> drivers/net/wireless/hostap/hostap_ioctl.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
>> index a85e43a..2cf6532 100644
>> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
>> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
>> @@ -1689,7 +1689,7 @@ static int prism2_request_scan(struct net_device *dev)
>> if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST,&scan_req,
>> sizeof(scan_req))) {
>> printk(KERN_DEBUG "SCANREQUEST failed\n");
>> - ret = -EINVAL;
>> + return ret;
>> }
>>
>> if (!local->host_roaming)
>
> NACK: This doesn't actually fix the error mentioned.
>
> Attached is a more correct patch.
>
> Apologies for the attachment, I'm building the patch by hand at work
> and only have gMail to send it with.
>
> This should apply to wireless-testing.
>
> Thanks,
>
wait im lost.. looking at your patch looks the same(number wise) except
I see different parts of code in there:
hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
HFA384X_ROAMING_FIRMWARE);
- return 0;
+ return ret;
mine is:
printk(KERN_DEBUG "SCANREQUEST failed\n");
- ret = -EINVAL;
+ return ret;
The tree Im using is Linus's tree.
any ideas?
Justin P. Mattock
^ permalink raw reply
* Re: [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Julian Calaby @ 2010-08-03 1:58 UTC (permalink / raw)
To: Justin P. Mattock; +Cc: linux-wireless, j, linville, mcgrof
In-Reply-To: <1280799971-7091-1-git-send-email-justinmattock@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1581 bytes --]
On Tue, Aug 3, 2010 at 11:46, Justin P. Mattock <justinmattock@gmail.com> wrote:
> Resend version 3
>
> The below patch fixes a warning message generated by GCC:
> CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
> drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
> drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
>
> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
>
> ---
> drivers/net/wireless/hostap/hostap_ioctl.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
> index a85e43a..2cf6532 100644
> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
> @@ -1689,7 +1689,7 @@ static int prism2_request_scan(struct net_device *dev)
> if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req,
> sizeof(scan_req))) {
> printk(KERN_DEBUG "SCANREQUEST failed\n");
> - ret = -EINVAL;
> + return ret;
> }
>
> if (!local->host_roaming)
NACK: This doesn't actually fix the error mentioned.
Attached is a more correct patch.
Apologies for the attachment, I'm building the patch by hand at work
and only have gMail to send it with.
This should apply to wireless-testing.
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/
[-- Attachment #2: fix-ret-not-used-hostap.diff --]
[-- Type: text/x-patch, Size: 633 bytes --]
Hostap: Fix "'ret' set but not used" warning message from GCC in hostap
CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
---
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1696,7 +1696,7 @@
hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
HFA384X_ROAMING_FIRMWARE);
- return 0;
+ return ret;
}
#else /* !PRISM2_NO_STATION_MODES */
^ permalink raw reply
* [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Justin P. Mattock @ 2010-08-03 1:46 UTC (permalink / raw)
To: linux-wireless; +Cc: j, linville, mcgrof, julian.calaby, Justin P. Mattock
Resend version 3
The below patch fixes a warning message generated by GCC:
CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
drivers/net/wireless/hostap/hostap_ioctl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index a85e43a..2cf6532 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1689,7 +1689,7 @@ static int prism2_request_scan(struct net_device *dev)
if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req,
sizeof(scan_req))) {
printk(KERN_DEBUG "SCANREQUEST failed\n");
- ret = -EINVAL;
+ return ret;
}
if (!local->host_roaming)
--
1.7.1.rc1.21.gf3bd6
^ permalink raw reply related
* Re: [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used
From: Justin P. Mattock @ 2010-08-03 1:39 UTC (permalink / raw)
To: Julian Calaby; +Cc: Luis R. Rodriguez, linux-wireless, j, linville
In-Reply-To: <AANLkTi=kPgpyv_=VrOU0aUE5oaR2+N6n6wSSY9ENau=t@mail.gmail.com>
On 08/02/2010 06:15 PM, Julian Calaby wrote:
> On Tue, Aug 3, 2010 at 11:03, Luis R. Rodriguez<mcgrof@gmail.com> wrote:
>> On Mon, Aug 2, 2010 at 5:51 PM, Justin P. Mattock
>> <justinmattock@gmail.com> wrote:
>>> This a resend after receiving feedback on a better solution.
>>>
>>> The below patch fixes a warning message generated by GCC:
>>> CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
>>> drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
>>> drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
>>>
>>> Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>>>
>>> ---
>>> drivers/net/wireless/hostap/hostap_ioctl.c | 1 +
>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
>>> index a85e43a..955e070 100644
>>> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
>>> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
>>> @@ -1690,6 +1690,7 @@ static int prism2_request_scan(struct net_device *dev)
>>> sizeof(scan_req))) {
>>> printk(KERN_DEBUG "SCANREQUEST failed\n");
>>> ret = -EINVAL;
>>> + return ret;
>>> }
>>>
>>> if (!local->host_roaming)
>>
>> NACK, just make the routine return the ret instead of 0.
>
> As in something along the lines of:
>
> --- hostap_ioctl.c 2010-08-03 11:13:24.000000000 +1000
> +++ hostap_ioctl.c~new 2010-08-03 11:14:08.000000000 +1000
> @@ -1696,7 +1696,7 @@
> hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
> HFA384X_ROAMING_FIRMWARE);
>
> - return 0;
> + return ret;
> }
>
> #else /* !PRISM2_NO_STATION_MODES */
>
> (whitespace damange, missing paths, and incorrect names are intentional)
>
> Thanks,
>
ahh.. now I see.. so no EINVAL just 0.
let me resend.
Justin P. Mattock
^ permalink raw reply
* Re: [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used
From: Julian Calaby @ 2010-08-03 1:15 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: Justin P. Mattock, linux-wireless, j, linville
In-Reply-To: <AANLkTi==Pz_djtUFaPTttk4gmi2fONxbYyyYkGCXc+HK@mail.gmail.com>
On Tue, Aug 3, 2010 at 11:03, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Mon, Aug 2, 2010 at 5:51 PM, Justin P. Mattock
> <justinmattock@gmail.com> wrote:
>> This a resend after receiving feedback on a better solution.
>>
>> The below patch fixes a warning message generated by GCC:
>> CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
>> drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
>> drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
>>
>> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
>>
>> ---
>> drivers/net/wireless/hostap/hostap_ioctl.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
>> index a85e43a..955e070 100644
>> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
>> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
>> @@ -1690,6 +1690,7 @@ static int prism2_request_scan(struct net_device *dev)
>> sizeof(scan_req))) {
>> printk(KERN_DEBUG "SCANREQUEST failed\n");
>> ret = -EINVAL;
>> + return ret;
>> }
>>
>> if (!local->host_roaming)
>
> NACK, just make the routine return the ret instead of 0.
As in something along the lines of:
--- hostap_ioctl.c 2010-08-03 11:13:24.000000000 +1000
+++ hostap_ioctl.c~new 2010-08-03 11:14:08.000000000 +1000
@@ -1696,7 +1696,7 @@
hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
HFA384X_ROAMING_FIRMWARE);
- return 0;
+ return ret;
}
#else /* !PRISM2_NO_STATION_MODES */
(whitespace damange, missing paths, and incorrect names are intentional)
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/
^ permalink raw reply
* [PATCH] wireless: ipw2100: check result of kzalloc()
From: Christoph Fritz @ 2010-08-03 1:10 UTC (permalink / raw)
To: John W. Linville
Cc: kernel-janitors, Zhu Yi, David S. Miller, Reinette Chatre,
linux-wireless
If kzalloc() fails return with -ENOMEM from ipw2100_net_init() which is
called by register_netdev.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
drivers/net/wireless/ipw2x00/ipw2100.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 0bd4dfa..908c176 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -1924,6 +1924,8 @@ static int ipw2100_net_init(struct net_device *dev)
bg_band->channels =
kzalloc(geo->bg_channels *
sizeof(struct ieee80211_channel), GFP_KERNEL);
+ if (!bg_band->channels)
+ return -ENOMEM;
/* translate geo->bg to bg_band.channels */
for (i = 0; i < geo->bg_channels; i++) {
bg_band->channels[i].band = IEEE80211_BAND_2GHZ;
--
1.7.1
^ permalink raw reply related
* Re: [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used
From: Luis R. Rodriguez @ 2010-08-03 1:03 UTC (permalink / raw)
To: Justin P. Mattock; +Cc: linux-wireless, j, linville
In-Reply-To: <1280796706-4384-1-git-send-email-justinmattock@gmail.com>
On Mon, Aug 2, 2010 at 5:51 PM, Justin P. Mattock
<justinmattock@gmail.com> wrote:
> This a resend after receiving feedback on a better solution.
>
> The below patch fixes a warning message generated by GCC:
> CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
> drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
> drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
>
> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
>
> ---
> drivers/net/wireless/hostap/hostap_ioctl.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
> index a85e43a..955e070 100644
> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
> @@ -1690,6 +1690,7 @@ static int prism2_request_scan(struct net_device *dev)
> sizeof(scan_req))) {
> printk(KERN_DEBUG "SCANREQUEST failed\n");
> ret = -EINVAL;
> + return ret;
> }
>
> if (!local->host_roaming)
NACK, just make the routine return the ret instead of 0.
Luis
^ permalink raw reply
* [PATCH v2]hostap/hostap_ioctl.c Fix variable 'ret' set but not used
From: Justin P. Mattock @ 2010-08-03 0:51 UTC (permalink / raw)
To: linux-wireless; +Cc: j, linville, Justin P. Mattock
This a resend after receiving feedback on a better solution.
The below patch fixes a warning message generated by GCC:
CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
drivers/net/wireless/hostap/hostap_ioctl.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index a85e43a..955e070 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1690,6 +1690,7 @@ static int prism2_request_scan(struct net_device *dev)
sizeof(scan_req))) {
printk(KERN_DEBUG "SCANREQUEST failed\n");
ret = -EINVAL;
+ return ret;
}
if (!local->host_roaming)
--
1.7.1.rc1.21.gf3bd6
^ permalink raw reply related
* Re: [PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Justin P. Mattock @ 2010-08-03 0:37 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless, j, linville
In-Reply-To: <AANLkTimgcFwc7FX72u5Z32DSVkL3xTEC=3vTBxHk9X6H@mail.gmail.com>
On 08/02/2010 05:16 PM, Luis R. Rodriguez wrote:
> On Mon, Aug 2, 2010 at 5:15 PM, Luis R. Rodriguez<mcgrof@gmail.com> wrote:
>> On Mon, Aug 2, 2010 at 5:04 PM, Justin P. Mattock
>> <justinmattock@gmail.com> wrote:
>>> The below patch fixes a warning message generated by GCC:
>>> CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
>>> drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
>>> drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
>>>
>>> Keep in mind Im not sure if this is the right fix for this, so please
>>> feedback is appreciated.
>>>
>>> Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>>>
>>> ---
>>> drivers/net/wireless/hostap/hostap_ioctl.c | 3 +--
>>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
>>> index a85e43a..27d462f 100644
>>> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
>>> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
>>> @@ -1663,7 +1663,6 @@ static int prism2_request_scan(struct net_device *dev)
>>> struct hostap_interface *iface;
>>> local_info_t *local;
>>> struct hfa384x_scan_request scan_req;
>>> - int ret = 0;
>>>
>>> iface = netdev_priv(dev);
>>> local = iface->local;
>>> @@ -1689,7 +1688,7 @@ static int prism2_request_scan(struct net_device *dev)
>>> if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST,&scan_req,
>>> sizeof(scan_req))) {
>>> printk(KERN_DEBUG "SCANREQUEST failed\n");
>>> - ret = -EINVAL;
>>> + return -EINVAL;
>>> }
>>>
>>> if (!local->host_roaming)
>>
>> NACK please read the code instead of just patching blindly to cure a
>> compile issue. For example read this big block:
I suppose I did look blindly.. the whole ret = 0; then ret = *
got me.. then I figured maybe its just a return.
>>
>>
>> /* FIX:
>> * It seems to be enough to set roaming mode for a short moment to
>> * host-based and then setup scanrequest data and return the mode to
>> * firmware-based.
>> *
>> * Master mode would need to drop to Managed mode for a short while
>> * to make scanning work.. Or sweep through the different channels and
>> * use passive scan based on beacons. */
>>
>> So.. it seems to me you likely want to flip back to
>> HFA384X_ROAMING_FIRMWARE *after* you've tried to issue the
>> HFA384X_RID_SCANREQUEST, even if it has failed. So the compile fix
>> should require just changing the last return statement of the function
>> to return ret value.
so this is a simple return ret;
>
> And for 802.11 there is no need to cc netdev and lkml. Just use linux-wireless.
>
> Luis
>
is netdev even used nowadays?
anyways I'll resend this. Thanks for the feedback and info..
Justin P. Mattock
^ permalink raw reply
* Re: [PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Luis R. Rodriguez @ 2010-08-03 0:16 UTC (permalink / raw)
To: Justin P. Mattock; +Cc: linux-wireless, netdev, linux-kernel, j, linville
In-Reply-To: <AANLkTinCa3Z+E6FhgmEkbS65dDVZ-Ss0aNYyDb_GGHMH@mail.gmail.com>
On Mon, Aug 2, 2010 at 5:15 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Mon, Aug 2, 2010 at 5:04 PM, Justin P. Mattock
> <justinmattock@gmail.com> wrote:
>> The below patch fixes a warning message generated by GCC:
>> CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
>> drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
>> drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
>>
>> Keep in mind Im not sure if this is the right fix for this, so please
>> feedback is appreciated.
>>
>> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
>>
>> ---
>> drivers/net/wireless/hostap/hostap_ioctl.c | 3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
>> index a85e43a..27d462f 100644
>> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
>> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
>> @@ -1663,7 +1663,6 @@ static int prism2_request_scan(struct net_device *dev)
>> struct hostap_interface *iface;
>> local_info_t *local;
>> struct hfa384x_scan_request scan_req;
>> - int ret = 0;
>>
>> iface = netdev_priv(dev);
>> local = iface->local;
>> @@ -1689,7 +1688,7 @@ static int prism2_request_scan(struct net_device *dev)
>> if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req,
>> sizeof(scan_req))) {
>> printk(KERN_DEBUG "SCANREQUEST failed\n");
>> - ret = -EINVAL;
>> + return -EINVAL;
>> }
>>
>> if (!local->host_roaming)
>
> NACK please read the code instead of just patching blindly to cure a
> compile issue. For example read this big block:
>
>
> /* FIX:
> * It seems to be enough to set roaming mode for a short moment to
> * host-based and then setup scanrequest data and return the mode to
> * firmware-based.
> *
> * Master mode would need to drop to Managed mode for a short while
> * to make scanning work.. Or sweep through the different channels and
> * use passive scan based on beacons. */
>
> So.. it seems to me you likely want to flip back to
> HFA384X_ROAMING_FIRMWARE *after* you've tried to issue the
> HFA384X_RID_SCANREQUEST, even if it has failed. So the compile fix
> should require just changing the last return statement of the function
> to return ret value.
And for 802.11 there is no need to cc netdev and lkml. Just use linux-wireless.
Luis
^ permalink raw reply
* Re: [PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Luis R. Rodriguez @ 2010-08-03 0:15 UTC (permalink / raw)
To: Justin P. Mattock; +Cc: linux-wireless, netdev, linux-kernel, j, linville
In-Reply-To: <1280793851-1719-1-git-send-email-justinmattock@gmail.com>
On Mon, Aug 2, 2010 at 5:04 PM, Justin P. Mattock
<justinmattock@gmail.com> wrote:
> The below patch fixes a warning message generated by GCC:
> CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
> drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
> drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
>
> Keep in mind Im not sure if this is the right fix for this, so please
> feedback is appreciated.
>
> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
>
> ---
> drivers/net/wireless/hostap/hostap_ioctl.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
> index a85e43a..27d462f 100644
> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
> @@ -1663,7 +1663,6 @@ static int prism2_request_scan(struct net_device *dev)
> struct hostap_interface *iface;
> local_info_t *local;
> struct hfa384x_scan_request scan_req;
> - int ret = 0;
>
> iface = netdev_priv(dev);
> local = iface->local;
> @@ -1689,7 +1688,7 @@ static int prism2_request_scan(struct net_device *dev)
> if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req,
> sizeof(scan_req))) {
> printk(KERN_DEBUG "SCANREQUEST failed\n");
> - ret = -EINVAL;
> + return -EINVAL;
> }
>
> if (!local->host_roaming)
NACK please read the code instead of just patching blindly to cure a
compile issue. For example read this big block:
/* FIX:
* It seems to be enough to set roaming mode for a short moment to
* host-based and then setup scanrequest data and return the mode to
* firmware-based.
*
* Master mode would need to drop to Managed mode for a short while
* to make scanning work.. Or sweep through the different channels and
* use passive scan based on beacons. */
So.. it seems to me you likely want to flip back to
HFA384X_ROAMING_FIRMWARE *after* you've tried to issue the
HFA384X_RID_SCANREQUEST, even if it has failed. So the compile fix
should require just changing the last return statement of the function
to return ret value.
Luis
^ permalink raw reply
* virtual access point setup
From: Ryszard @ 2010-08-03 0:09 UTC (permalink / raw)
To: Ben Greear; +Cc: Florian Fainelli, Patrick McHardy, linux-wireless
hey ben,
here is a list of actions i've done just now to get the previously
mentioned stack trace:
==============================================
1. restart box
2. uname -a Linux sknwireless 2.6.32-22-generic #33-Ubuntu SMP Wed Apr
28 13:27:30 UTC 2010 i586 GNU/Linux
3.lsmod:
Module Size Used by
ipt_REDIRECT 917 3
ipt_MASQUERADE 1407 3
xt_state 1098 6
xt_tcpudp 2011 33
iptable_filter 2271 1
nf_nat_ftp 1836 0
iptable_nat 4414 1
ip_tables 9991 2 iptable_filter,iptable_nat
nf_nat 15735 4
ipt_REDIRECT,ipt_MASQUERADE,nf_nat_ftp,iptable_nat
x_tables 14299 6
ipt_REDIRECT,ipt_MASQUERADE,xt_state,xt_tcpudp,iptable_nat,ip_tables
nf_conntrack_ftp 5381 1 nf_nat_ftp
nf_conntrack_ipv4 10672 9 iptable_nat,nf_nat
nf_conntrack 61583 7
ipt_MASQUERADE,xt_state,nf_nat_ftp,iptable_nat,nf_nat,nf_conntrack_ftp,nf_conntrack_ipv4
nf_defrag_ipv4 1073 1 nf_conntrack_ipv4
arc4 1153 2
aes_i586 7268 0
ath5k 118956 0
aes_generic 26863 1 aes_i586
mac80211 206808 1 ath5k
ath 7611 1 ath5k
leds_alix2 1470 0
geode_aes 4558 0
cs5535_gpio 2571 0
cfg80211 125477 3 ath5k,mac80211,ath
geode_rng 1011 0
led_class 2864 2 ath5k,leds_alix2
pata_cs5536 3224 0
pata_amd 8766 1
via_rhine 19154 0
mii 4381 1 via_rhine
4. rmmod ath5k
5. modprobe ath5k nohwcrypt=1
6. syslog shows no stack trace
7. iw dev wlan0 interface add sta0 type station
8. ifconfig sta0
sta0 Link encap:Ethernet HWaddr 00:0b:6b:22:5b:cd
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
9. iwconfig sta0
sta0 IEEE 802.11abg ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
10. no syslog stacktrace
11. iw dev wlan0 interface add vap0 type __ap
12. ifconfig vap0
vap0 Link encap:Ethernet HWaddr 00:0b:6b:22:5b:cd
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
13. iwconfig vap0
vap0 IEEE 802.11abg Mode:Master Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
14. no syslog stacktrace
15. iw dev wlan0 interface add vap1 type __ap
16. ifconfig vap1
vap1 Link encap:Ethernet HWaddr 00:0b:6b:22:5b:cd
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
17. iwconfig vap1
vap1 IEEE 802.11abg Mode:Master Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
18. no syslog stacktrace
19. ifconfig vap0 172.16.40.1 up
SIOCSIFFLAGS: Name not unique on network
SIOCSIFFLAGS: Name not unique on network
20. no syslog stacktrace
21 ifconfig vap1 172.16.40.1 up
SIOCSIFFLAGS: Name not unique on network
SIOCSIFFLAGS: Name not unique on network
22. no syslog stacktrace
23. macchanger vap0
Current MAC: 00:0b:6b:22:5b:cd (Wistron Neweb Corp.)
Faked MAC: 00:0b:6b:22:5b:ce (Wistron Neweb Corp.)
24. no syslog stacktrace
25. macchanger vap1
Current MAC: 00:0b:6b:22:5b:cd (Wistron Neweb Corp.)
Faked MAC: 00:0b:6b:22:5b:ce (Wistron Neweb Corp.)
26. no syslog stacktrace
27. ifconfig vap0 172.168.40.1 up
28. syslog stacktrace:
Aug 3 10:04:03 sknwireless kernel: [ 908.740408] ------------[ cut
here ]------------
Aug 3 10:04:03 sknwireless kernel: [ 908.740479] WARNING: at
/home/skn/wireless/compat-wireless-2.6.32.15/drivers/net/wireless/ath/ath5k/base.c:3221
ath5k_bss_info_changed+0x1a6/0x1b0 [ath5k]()
Aug 3 10:04:03 sknwireless kernel: [ 908.740508] Modules linked in:
ipt_REDIRECT ipt_MASQUERADE xt_state xt_tcpudp iptable_filter
nf_nat_ftp iptable_nat ip_tables nf_nat x_tables nf_conntrack_ftp
nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 arc4 aes_i586 ath5k
aes_generic mac80211 ath leds_alix2 geode_aes cs5535_gpio cfg80211
geode_rng led_class pata_cs5536 pata_amd via_rhine mii
Aug 3 10:04:03 sknwireless kernel: [ 908.740683] Pid: 3711, comm:
ifconfig Not tainted 2.6.32-22-generic #33-Ubuntu
Aug 3 10:04:03 sknwireless kernel: [ 908.740701] Call Trace:
Aug 3 10:04:03 sknwireless kernel: [ 908.740739] [<c014c3d2>]
warn_slowpath_common+0x72/0xa0
Aug 3 10:04:03 sknwireless kernel: [ 908.740785] [<d09d6406>] ?
ath5k_bss_info_changed+0x1a6/0x1b0 [ath5k]
Aug 3 10:04:03 sknwireless kernel: [ 908.740829] [<d09d6406>] ?
ath5k_bss_info_changed+0x1a6/0x1b0 [ath5k]
Aug 3 10:04:03 sknwireless kernel: [ 908.740861] [<c014c41a>]
warn_slowpath_null+0x1a/0x20
Aug 3 10:04:03 sknwireless kernel: [ 908.740904] [<d09d6406>]
ath5k_bss_info_changed+0x1a6/0x1b0 [ath5k]
Aug 3 10:04:03 sknwireless kernel: [ 908.741012] [<d0946bda>]
ieee80211_bss_info_change_notify+0x9a/0x1b0 [mac80211]
Aug 3 10:04:03 sknwireless kernel: [ 908.741058] [<d09d6260>] ?
ath5k_bss_info_changed+0x0/0x1b0 [ath5k]
Aug 3 10:04:03 sknwireless kernel: [ 908.741134] [<d0951d58>]
ieee80211_open+0x2a8/0x7d0 [mac80211]
Aug 3 10:04:03 sknwireless kernel: [ 908.741238] [<c04c3ec2>]
dev_open+0x92/0xf0
Aug 3 10:04:03 sknwireless kernel: [ 908.741268] [<c058b866>] ?
_spin_unlock_bh+0x16/0x20
Aug 3 10:04:03 sknwireless kernel: [ 908.741296] [<c04c1a2f>] ?
dev_set_rx_mode+0x2f/0x40
Aug 3 10:04:03 sknwireless kernel: [ 908.741325] [<c04c3739>]
dev_change_flags+0x139/0x1b0
Aug 3 10:04:03 sknwireless kernel: [ 908.741360] [<c0515f0a>]
devinet_ioctl+0x54a/0x5a0
Aug 3 10:04:03 sknwireless kernel: [ 908.741389] [<c04c512f>] ?
dev_ioctl+0x2af/0x720
Aug 3 10:04:03 sknwireless kernel: [ 908.741422] [<c0517065>]
inet_ioctl+0x95/0xb0
Aug 3 10:04:03 sknwireless kernel: [ 908.741450] [<c04b237d>]
sock_ioctl+0x6d/0x270
Aug 3 10:04:03 sknwireless kernel: [ 908.741475] [<c04b2310>] ?
sock_ioctl+0x0/0x270
Aug 3 10:04:03 sknwireless kernel: [ 908.741501] [<c0216231>]
vfs_ioctl+0x21/0x90
Aug 3 10:04:03 sknwireless kernel: [ 908.741526] [<c058955c>] ?
schedule+0x44c/0x840
Aug 3 10:04:03 sknwireless kernel: [ 908.741553] [<c0216519>]
do_vfs_ioctl+0x79/0x310
Aug 3 10:04:03 sknwireless kernel: [ 908.741578] [<c0216817>]
sys_ioctl+0x67/0x80
Aug 3 10:04:03 sknwireless kernel: [ 908.741607] [<c01033ec>]
syscall_call+0x7/0xb
Aug 3 10:04:03 sknwireless kernel: [ 908.741628] ---[ end trace
c6a7c8dea11614de ]---
Aug 3 10:04:13 sknwireless kernel: [ 919.169554] vap0: no IPv6 routers present
29. ifconfig vap1 172.168.40.1 up
SIOCSIFFLAGS: Name not unique on network
SIOCSIFFLAGS: Name not unique on network
30. macchanger vap1
Current MAC: 00:0b:6b:22:5b:ce (Wistron Neweb Corp.)
Faked MAC: 00:0b:6b:22:5b:cf (Wistron Neweb Corp.)
31. ifconfig vap1 172.168.40.1 up
32. no additional stack trace in syslog
==============================================
i'm doing this remote right now and dont have access to a wireless
client to attempt to get a lease (after running hostapd of course).
is this information relevant/useful to you? is there anything else
you'd like me to do?
regs
R
^ permalink raw reply
* [PATCH]hostap:hostap_hw.c Fix variable 'fc' set but not used
From: Justin P. Mattock @ 2010-08-03 0:05 UTC (permalink / raw)
To: linux-wireless; +Cc: netdev, linux-kernel, j, linville, Justin P. Mattock
The below fixes a build wanring from GCC.
CC [M] drivers/net/wireless/hostap/hostap_plx.o
In file included from drivers/net/wireless/hostap/hostap_plx.c:264:0:
drivers/net/wireless/hostap/hostap_hw.c: In function 'prism2_tx_80211':
drivers/net/wireless/hostap/hostap_hw.c:1816:18: warning: variable 'fc' set but not used
Removing fc from this just introduces a new warning
CC [M] drivers/net/wireless/hostap/hostap_plx.o
In file included from drivers/net/wireless/hostap/hostap_plx.c:264:0:
drivers/net/wireless/hostap/hostap_hw.c: In function 'prism2_tx_80211':
drivers/net/wireless/hostap/hostap_hw.c:1839:3: warning: statement with no effect
So I went and removed the whole thing. Let me know if theres another solution.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
drivers/net/wireless/hostap/hostap_hw.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index e9d9d62..d734f3e 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -1813,7 +1813,7 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev)
struct hfa384x_tx_frame txdesc;
struct hostap_skb_tx_data *meta;
int hdr_len, data_len, idx, res, ret = -1;
- u16 tx_control, fc;
+ u16 tx_control;
iface = netdev_priv(dev);
local = iface->local;
@@ -1836,7 +1836,6 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev)
/* skb->data starts with txdesc->frame_control */
hdr_len = 24;
skb_copy_from_linear_data(skb, &txdesc.frame_control, hdr_len);
- fc = le16_to_cpu(txdesc.frame_control);
if (ieee80211_is_data(txdesc.frame_control) &&
ieee80211_has_a4(txdesc.frame_control) &&
skb->len >= 30) {
--
1.7.1.rc1.21.gf3bd6
^ permalink raw reply related
* [PATCH]hostap:hostap_ioctl.c Fix variable 'hostscan' set but not used
From: Justin P. Mattock @ 2010-08-03 0:04 UTC (permalink / raw)
To: linux-wireless; +Cc: netdev, linux-kernel, j, linville, Justin P. Mattock
The patch below fixes a compiler warning:
CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_translate_scan':
drivers/net/wireless/hostap/hostap_ioctl.c:1954:13: warning: variable 'hostscan' set but not used
Keep in mind I've looked and searched for a fix for this but
couldnt come up with anything.(if there is let me know and I'll have a try at it).
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
drivers/net/wireless/hostap/hostap_ioctl.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 27d462f..25420e3 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1951,7 +1951,7 @@ static inline int prism2_translate_scan(local_info_t *local,
char *buffer, int buflen)
{
struct hfa384x_hostscan_result *scan;
- int entry, hostscan;
+ int entry;
char *current_ev = buffer;
char *end_buf = buffer + buflen;
struct list_head *ptr;
@@ -1964,7 +1964,6 @@ static inline int prism2_translate_scan(local_info_t *local,
bss->included = 0;
}
- hostscan = local->last_scan_type == PRISM2_HOSTSCAN;
for (entry = 0; entry < local->last_scan_results_count; entry++) {
int found = 0;
scan = &local->last_scan_results[entry];
--
1.7.1.rc1.21.gf3bd6
^ permalink raw reply related
* [PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set but not used
From: Justin P. Mattock @ 2010-08-03 0:04 UTC (permalink / raw)
To: linux-wireless; +Cc: netdev, linux-kernel, j, linville, Justin P. Mattock
The below patch fixes a warning message generated by GCC:
CC [M] drivers/net/wireless/hostap/hostap_ioctl.o
drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used
Keep in mind Im not sure if this is the right fix for this, so please
feedback is appreciated.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
drivers/net/wireless/hostap/hostap_ioctl.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index a85e43a..27d462f 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1663,7 +1663,6 @@ static int prism2_request_scan(struct net_device *dev)
struct hostap_interface *iface;
local_info_t *local;
struct hfa384x_scan_request scan_req;
- int ret = 0;
iface = netdev_priv(dev);
local = iface->local;
@@ -1689,7 +1688,7 @@ static int prism2_request_scan(struct net_device *dev)
if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req,
sizeof(scan_req))) {
printk(KERN_DEBUG "SCANREQUEST failed\n");
- ret = -EINVAL;
+ return -EINVAL;
}
if (!local->host_roaming)
--
1.7.1.rc1.21.gf3bd6
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox