>Alexandre Buisse wrote:
>>Jiri Slaby wrote:
>>>>I've been having problems with ipw2200 oopsing at modprobe since
>>>>2.6.14-rc2-mm1 (sorry for not reporting before). I use the ipw2200
>>>>included in the kernel.
>>>
>>>
>>> Can you apply this and tell me what are the numbers?
>>
>>Hi,
>>
>>I tested with -rc4 and the problem did not appear.
>>As for your patch, it just says ---THIS: 0,0 before oopsing.
>>
>>Hope it helps.
>Yes, it really does.
>
>The problem is in git-netdev-all.patch. Somebody rewrote the function:
>
>diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
>--- a/net/ieee80211/ieee80211_wx.c
>+++ b/net/ieee80211/ieee80211_wx.c
>@@ -1,6 +1,6 @@
> /******************************************************************************
>
>- Copyright(c) 2004 Intel Corporation. All rights reserved.
>+ Copyright(c) 2004-2005 Intel Corporation. All rights reserved.
>
> Portions of this file are based on the WEP enablement code provided by the
> Host AP project hostap-drivers v0.1.3
>@@ -32,6 +32,7 @@
>
> #include <linux/kmod.h>
> #include <linux/module.h>
>+#include <linux/jiffies.h>
>
> #include <net/ieee80211.h>
> #include <linux/wireless.h>
>@@ -140,18 +141,38 @@ static inline char *ipw2100_translate_sc
> start = iwe_stream_add_point(start, stop, &iwe, custom);
>
> /* Add quality statistics */
>- /* TODO: Fix these values... */
> iwe.cmd = IWEVQUAL;
>- iwe.u.qual.qual = network->stats.signal;
>- iwe.u.qual.level = network->stats.rssi;
>- iwe.u.qual.noise = network->stats.noise;
>- iwe.u.qual.updated = network->stats.mask & IEEE80211_STATMASK_WEMASK;
>- if (!(network->stats.mask & IEEE80211_STATMASK_RSSI))
>- iwe.u.qual.updated |= IW_QUAL_LEVEL_INVALID;
>- if (!(network->stats.mask & IEEE80211_STATMASK_NOISE))
>+ iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED |
>+ IW_QUAL_NOISE_UPDATED;
>+
>+ if (!(network->stats.mask & IEEE80211_STATMASK_RSSI)) {
>+ iwe.u.qual.updated |= IW_QUAL_QUAL_INVALID |
>+ IW_QUAL_LEVEL_INVALID;
>+ iwe.u.qual.qual = 0;
>+ iwe.u.qual.level = 0;
>+ } else {
>+ iwe.u.qual.level = network->stats.rssi;
>+ iwe.u.qual.qual =
>+ (100 *
>+ (ieee->perfect_rssi - ieee->worst_rssi) *
>+ (ieee->perfect_rssi - ieee->worst_rssi) -
>+ (ieee->perfect_rssi - network->stats.rssi) *
>+ (15 * (ieee->perfect_rssi - ieee->worst_rssi) +
>+ 62 * (ieee->perfect_rssi - network->stats.rssi))) /
>+ ((ieee->perfect_rssi - ieee->worst_rssi) *
>+ (ieee->perfect_rssi - ieee->worst_rssi));
>But here is a problem ieee->perfect_rssi and ieee->worst_rssi is 0 and 0, as
>you mentioned -- division by zero...
>
>It seems, that it is pulled from your tree, Jeff. Any ideas?
Yup. There is a BIG problem between ipw and 80211. 80211 is a new code and ipw
is an old one. We don't set perfect_rssi and worst_rssi in ipw and 80211 wait
some other values than 0!
What was the problem to not to add a new version of ipw into kernel?
And what about this fix (at least for the time, until ipw will be updated)?
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -152,15 +152,20 @@ static inline char *ipw2100_translate_sc
iwe.u.qual.level = 0;
} else {
iwe.u.qual.level = network->stats.rssi;
- iwe.u.qual.qual =
- (100 *
- (ieee->perfect_rssi - ieee->worst_rssi) *
- (ieee->perfect_rssi - ieee->worst_rssi) -
- (ieee->perfect_rssi - network->stats.rssi) *
- (15 * (ieee->perfect_rssi - ieee->worst_rssi) +
- 62 * (ieee->perfect_rssi - network->stats.rssi))) /
- ((ieee->perfect_rssi - ieee->worst_rssi) *
- (ieee->perfect_rssi - ieee->worst_rssi));
+ if (ieee->perfect_rssi)
+ iwe.u.qual.qual = (100 *
+ (ieee->perfect_rssi - ieee->worst_rssi) *
+ (ieee->perfect_rssi - ieee->worst_rssi) -
+ (ieee->perfect_rssi - network->stats.rssi) *
+ (
+ 15 * (ieee->perfect_rssi - ieee->worst_rssi) +
+ 62 * (ieee->perfect_rssi - network->stats.rssi)
+ )) /
+ ((ieee->perfect_rssi - ieee->worst_rssi) *
+ (ieee->perfect_rssi - ieee->worst_rssi));
+ else
+ iwe.u.qual.qual = network->stats.signal;
+
if (iwe.u.qual.qual > 100)
iwe.u.qual.qual = 100;
else if (iwe.u.qual.qual < 1)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]