* Re: [PATCH] ath9k: Fix read buffer overflow
From: Luis R. Rodriguez @ 2009-08-24 23:34 UTC (permalink / raw)
To: John W. Linville
Cc: Roel Kluin, Jouni Malinen, linux-wireless, ath9k-devel,
Andrew Morton, m.sujith
In-Reply-To: <20090820145239.GC2657@tuxdriver.com>
On Thu, Aug 20, 2009 at 7:52 AM, John W. Linville<linville@tuxdriver.com> wrote:
> Anybody?
Sorry for the delay,
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
This is actually pretty sloppy existing code and I'd prefer to see
this nasty POS code rewritten to avoid such nasty checks from the
start. Also notice how both ath9k_hw_get_legacy_target_powers() and
ath9k_hw_get_target_powers() do exactly the same, except they use a
different name for the bool, a different structure for the calibrated
power targets (array size changes on one element of the struct). But
this patch also fixes another not-noted potential negative rade index
access: lowIndex could be -1 under a special circumstance and this
would prevent that negative index access as well on powInfo[lowIndex].
So although this probably just does not happen right now its safer to
have a fix for two of these theoretical negative array index access
than nothing at hand; a proper rewrite of these two routines as I want
it would require quite a few changes here and more testing. Mentally
lets add that to the TODO list..
Luis
^ permalink raw reply
* Re: [PATCH 1/1] iwmc3200: add more SDIO device ids
From: Marcel Holtmann @ 2009-08-24 23:21 UTC (permalink / raw)
To: Tomas Winkler; +Cc: Luis R. Rodriguez, davem, netdev, linux-wireless, Greg KH
In-Reply-To: <1ba2fa240908241520q5be2060co145ec0745954dcf0@mail.gmail.com>
Hi Tomas,
> >> add WiFi BGN SKU and WiMAX 2.4GHz SKU device ids
> >>
> >> Cc:inaky.perez-gonzalez@intel.com
> >> Cc:cindy.h.kao@intel.com
> >> Cc:yi.zhu@intel.com
> >> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> >
> > Since it seems we are preferring to not do this for PCI for cases
> > where the ID will only be used for 1 device perhaps its best to remove
> > all those ids and stuff them directly into the intel driver itself
> > that will use it.
> >
> I don't have strong opinion about it but this is the current habit
> IIRC there was a mail thread that explicitly asked to move SDIO IDs
> there, of course I cannot locate it right now :(
first thing is that IDs should only be added if there are users for it.
I am missing the patches that are actually using them. Send them all
together.
Second, we have to establish what is the preferred method of IDs for the
SDIO subsystem. In general I would prefer we have a global policy for
this, but in reality it is up to the subsystem maintainers.
My personal vote is for keeping all IDs inside the drivers. And I also
prefer to keep the plain hex values and just put a comment above them
which device this is. Something like this:
static struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */
{ USB_DEVICE_INFO(0xe0, 0x01, 0x01) },
/* AVM BlueFRITZ! USB v2.0 */
{ USB_DEVICE(0x057c, 0x3800) },
{ } /* Terminating entry */
};
Regards
Marcel
^ permalink raw reply
* Re: [PATCH 1/1] iwmc3200: add more SDIO device ids
From: Bob Copeland @ 2009-08-24 22:37 UTC (permalink / raw)
To: Tomas Winkler; +Cc: Luis R. Rodriguez, davem, netdev, linux-wireless, Greg KH
In-Reply-To: <1ba2fa240908241520q5be2060co145ec0745954dcf0@mail.gmail.com>
On Mon, Aug 24, 2009 at 6:20 PM, Tomas Winkler<tomasw@gmail.com> wrote:
> I don't have strong opinion about it but this is the current habit
> IIRC there was a mail thread that explicitly asked to move SDIO IDs
> there, of course I cannot locate it right now :(
This one:
http://marc.info/?l=linux-wireless&m=124489211911222&w=2
Of course, Pierre is no longer maintainer and there are only a few
IDs there, so I don't think anyone will shout either way.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply
* Re: [PATCH 1/1] iwmc3200: add more SDIO device ids
From: Luis R. Rodriguez @ 2009-08-24 22:29 UTC (permalink / raw)
To: Tomas Winkler; +Cc: davem, netdev, linux-wireless, Greg KH
In-Reply-To: <1ba2fa240908241520q5be2060co145ec0745954dcf0@mail.gmail.com>
On Mon, Aug 24, 2009 at 3:20 PM, Tomas Winkler<tomasw@gmail.com> wrote:
> On Tue, Aug 25, 2009 at 12:36 AM, Luis R. Rodriguez<mcgrof@gmail.com> wrote:
>> On Mon, Aug 24, 2009 at 2:34 PM, Tomas Winkler<tomas.winkler@intel.com> wrote:
>>> add WiFi BGN SKU and WiMAX 2.4GHz SKU device ids
>>>
>>> Cc:inaky.perez-gonzalez@intel.com
>>> Cc:cindy.h.kao@intel.com
>>> Cc:yi.zhu@intel.com
>>> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
>>
>> Since it seems we are preferring to not do this for PCI for cases
>> where the ID will only be used for 1 device perhaps its best to remove
>> all those ids and stuff them directly into the intel driver itself
>> that will use it.
>>
> I don't have strong opinion about it but this is the current habit
> IIRC there was a mail thread that explicitly asked to move SDIO IDs
> there, of course I cannot locate it right now :(
Sure, understood, whoever maintains this should decide.
Luis
^ permalink raw reply
* Re: [PATCH 1/1] iwmc3200: add more SDIO device ids
From: Tomas Winkler @ 2009-08-24 22:20 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: davem, netdev, linux-wireless, Greg KH
In-Reply-To: <43e72e890908241436o5f30cfe6xa7bdda8b25ac082@mail.gmail.com>
On Tue, Aug 25, 2009 at 12:36 AM, Luis R. Rodriguez<mcgrof@gmail.com> wrote:
> On Mon, Aug 24, 2009 at 2:34 PM, Tomas Winkler<tomas.winkler@intel.com> wrote:
>> add WiFi BGN SKU and WiMAX 2.4GHz SKU device ids
>>
>> Cc:inaky.perez-gonzalez@intel.com
>> Cc:cindy.h.kao@intel.com
>> Cc:yi.zhu@intel.com
>> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
>
> Since it seems we are preferring to not do this for PCI for cases
> where the ID will only be used for 1 device perhaps its best to remove
> all those ids and stuff them directly into the intel driver itself
> that will use it.
>
I don't have strong opinion about it but this is the current habit
IIRC there was a mail thread that explicitly asked to move SDIO IDs
there, of course I cannot locate it right now :(
Thanks
Tomas
^ permalink raw reply
* Re: [PATCH 1/1] iwmc3200: add more SDIO device ids
From: Luis R. Rodriguez @ 2009-08-24 21:36 UTC (permalink / raw)
To: Tomas Winkler; +Cc: davem, netdev, linux-wireless, Greg KH
In-Reply-To: <1251149659-32212-1-git-send-email-tomas.winkler@intel.com>
On Mon, Aug 24, 2009 at 2:34 PM, Tomas Winkler<tomas.winkler@intel.com> wrote:
> add WiFi BGN SKU and WiMAX 2.4GHz SKU device ids
>
> Cc:inaky.perez-gonzalez@intel.com
> Cc:cindy.h.kao@intel.com
> Cc:yi.zhu@intel.com
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Since it seems we are preferring to not do this for PCI for cases
where the ID will only be used for 1 device perhaps its best to remove
all those ids and stuff them directly into the intel driver itself
that will use it.
Luis
^ permalink raw reply
* [PATCH 1/1] iwmc3200: add more SDIO device ids
From: Tomas Winkler @ 2009-08-24 21:34 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-wireless, Tomas Winkler
add WiFi BGN SKU and WiMAX 2.4GHz SKU device ids
Cc:inaky.perez-gonzalez@intel.com
Cc:cindy.h.kao@intel.com
Cc:yi.zhu@intel.com
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
include/linux/mmc/sdio_ids.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
index 2dbfb5a..addd456 100644
--- a/include/linux/mmc/sdio_ids.h
+++ b/include/linux/mmc/sdio_ids.h
@@ -28,6 +28,8 @@
#define SDIO_DEVICE_ID_INTEL_IWMC3200TOP 0x1404
#define SDIO_DEVICE_ID_INTEL_IWMC3200GPS 0x1405
#define SDIO_DEVICE_ID_INTEL_IWMC3200BT 0x1406
+#define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_24 0x1407
+#define SDIO_DEVICE_ID_INTEL_IWMC3200WIFI_BGN 0x1408
#define SDIO_VENDOR_ID_MARVELL 0x02df
#define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103
--
1.6.0.6
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related
* Re: [RFC/RFT] rtl8187: Implement rfkill support
From: Hin-Tak Leung @ 2009-08-24 21:03 UTC (permalink / raw)
To: Herton Ronaldo Krzesinski; +Cc: linux-wireless, Larry Finger
In-Reply-To: <200908241510.10968.herton@mandriva.com.br>
On Mon, Aug 24, 2009 at 7:10 PM, Herton Ronaldo
Krzesinski<herton@mandriva.com.br> wrote:
<snipped>
> This is strange, may be NetworkManager does something extra and for some reason
> manages to wake up the interface again? I thought it would be unable to "if up"
> the interface since -ERFKILL should be returned to it when switch is off...
>
>>
>> Is this intentional? I thought it is supposed to actually switch off
>> the hardware, or is this how the code supposed to work?
>> Maybe some component needs to let NM knows not to reenanble the device.
>
> About taking interface down, thats expected, but I don't know about
> NetworkManager, I was expecting it to be unable to "if up" the interface again.
Is there a minimum version of NM/wpa_supplicant this is expected? I
could upgrade if needed to. I am mostly fedora 11 based and have NM
0.7.1-8.git20090708 , wpa_supplicant 0.6.8.
Hin-Tak
^ permalink raw reply
* Re: driver_nl80211 broken again
From: Johannes Berg @ 2009-08-24 20:58 UTC (permalink / raw)
To: Maxim Levitsky; +Cc: linux-wireless
In-Reply-To: <1251144381.9374.4.camel@maxim-laptop>
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
On Mon, 2009-08-24 at 23:06 +0300, Maxim Levitsky wrote:
> This is typical output of iwconfig, after failure
> (and I know that this output means trouble):
Hmm, thanks for the info and especially the log. Unfortunately, I can't
reproduce this at all.
Can you run wpa_supplicant with timing info (add -t to the command line)
and at the same time run "iw event -t" please?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: Kernel Panic in __ieee80211_tx with p43usb as AP
From: Chunkeey @ 2009-08-24 20:33 UTC (permalink / raw)
To: Larry Finger, Bob Copeland; +Cc: Chr, Johannes Berg, wireless, John Linville
> On Mon, Aug 24, 2009 at 4:07 PM, Larry Finger<Larry.Finger@lwfinger.net> wrote:
> > static inline int drv_tx(struct ieee80211_local *local, struct sk_buff
> > *skb)
> > {
> > return local->ops->tx(&local->hw, skb);
> > }
> >
> > Are there any suggest changes that would let me debug this problem
> > without crashing the kernel?
>
> Could be a callback into mac80211, e.g. ieee80211_get_tx_rate()
> returning null (I haven't looked at any p54 code, I just know I've hit
> one there before with ath5k).
huu. at this point the frame already has a valid rate.
I guessing the dump is missing some more lines and
it crashes somewhere deep down in the driver.
But, I'm not yet sure where exactly... do you think
you can capture a full oops?
Regards,
Chr
________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/
^ permalink raw reply
* Re: driver_nl80211 broken again
From: Maxim Levitsky @ 2009-08-24 20:06 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1251122885.12007.12.camel@johannes.local>
On Mon, 2009-08-24 at 16:08 +0200, Johannes Berg wrote:
> On Mon, 2009-08-24 at 15:32 +0300, Maxim Levitsky wrote:
> > First connection works fine, but all following connections hang
> > wpa_supplicant hard, and more than that, this is first time,
> > NetworkManager confused that much that it refuses flat to connect to my
> > network, even if I reload the wireless stack.
> >
> > Only way to connect again, is to reload wireless stack, restart
> > wpa_supplicant, and restart NM, and this helps, only for one more shot.
> >
> > My network is WPA2 protected, I use iwl3945, this is quite recent
> > regression (of course I use tip of wireless-testing)
>
> Need more info, works ok here (hwsim).
>
> johannes
This is typical output of iwconfig, after failure
(and I know that this output means trouble):
wlan0 IEEE 802.11bg Mode:Managed Access Point: Not-Associated
Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
Best regards,
Maxim Levitsky
PS: This is wpa_supplicant log:
sudo wpa_supplicant -ddd -u
Providing DBus service 'fi.epitest.hostap.WPASupplicant'.
Initializing interface 'wlan0' conf 'N/A' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
nl80211: Operstate: linkmode=1, operstate=5
Own MAC address: 00:1b:77:f1:7c:29
nl_set_encr: ifindex=5 alg=0 addr=0x451355 key_idx=0 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-67 Link has been severed)
nl_set_encr: ifindex=5 alg=0 addr=0x451355 key_idx=1 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-67 Link has been severed)
nl_set_encr: ifindex=5 alg=0 addr=0x451355 key_idx=2 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-67 Link has been severed)
nl_set_encr: ifindex=5 alg=0 addr=0x451355 key_idx=3 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-67 Link has been severed)
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
Added interface wlan0
Setting scan request: 0 sec 0 usec
Setting scan request: 0 sec 0 usec
Trying to get current scan results first without requesting a new scan to speed up initial association
Received scan results (0 BSSes)
Cached scan results are empty - not posting
No suitable AP found.
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 10 seconds
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
nl80211: Event message available
nl80211: New scan results available
Received scan results (9 BSSes)
CTRL-EVENT-SCAN-RESULTS
No suitable AP found.
Setting scan request: 5 sec 0 usec
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
No keys have been configured - skip key clearing
State: SCANNING -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
nl80211: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
key_mgmt: 0x2
scan_ssid=1 (0x1)
PSK (ASCII passphrase) - hexdump_ascii(len=15): [REMOVED]
ssid - hexdump_ascii(len=6):
31 32 33 34 35 36 <SSID>
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Not rescheduling scan to ensure that specific SSID scans occur
State: DISCONNECTED -> SCANNING
Scan SSID - hexdump_ascii(len=6):
31 32 33 34 35 36 <SSID>
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: New scan results available
Received scan results (10 BSSes)
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: <BSSID> ssid='<SSID>' wpa_ie_len=0 rsn_ie_len=20 caps=0x411
selected based on RSN IE
selected WPA AP <BSSID> ssid='<SSID>'
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
Cancelling scan request
Trying to authenticate with <BSSID> (SSID='<SSID>' freq=2412 MHz)
No keys have been configured - skip key clearing
State: SCANNING -> AUTHENTICATING
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
nl80211: Authenticate (ifindex=5)
* bssid=<BSSID>
* freq=2412
* SSID - hexdump_ascii(len=6):
31 32 33 34 35 36 <SSID>
* IEs - hexdump(len=0): [NULL]
* Auth Type 0
nl80211: Authentication request send successfully
RSN: Ignored PMKID candidate without preauth flag
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: Event message available
nl80211: MLME event 37
nl80211: MLME event frame - hexdump(len=41): b0 00 3a 01 00 1b 77 f1 7c 29 00 1b 9e d8 77 02 00 1b 9e d8 77 02 40 1d 00 00 02 00 00 00 dd 09 00 10 18 02 01 f0 00 00 00
SME: Authentication response: peer=<BSSID> auth_type=0 status_code=0
SME: Authentication response IEs - hexdump(len=11): dd 09 00 10 18 02 01 f0 00 00 00
Trying to associate with <BSSID> (SSID='<SSID>' freq=2412 MHz)
State: AUTHENTICATING -> ASSOCIATING
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
nl80211: Operstate: linkmode=-1, operstate=5
nl80211: Associate (ifindex=5)
* bssid=<BSSID>
* freq=2412
* SSID - hexdump_ascii(len=6):
31 32 33 34 35 36 <SSID>
* IEs - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
nl80211: Association request send successfully
nl80211: Event message available
nl80211: MLME event 38
nl80211: MLME event frame - hexdump(len=83): 10 00 3a 01 00 1b 77 f1 7c 29 00 1b 9e d8 77 02 00 1b 9e d8 77 02 50 1d 11 04 00 00 02 c0 01 08 82 84 8b 96 24 30 48 6c 32 04 0c 12 18 60 dd 09 00 10 18 02 01 f0 00 00 00 dd 18 00 50 f2 02 01 01 80 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
Association info event
resp_ies - hexdump(len=53): 01 08 82 84 8b 96 24 30 48 6c 32 04 0c 12 18 60 dd 09 00 10 18 02 01 f0 00 00 00 dd 18 00 50 f2 02 01 01 80 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
State: ASSOCIATING -> ASSOCIATED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
nl80211: Operstate: linkmode=-1, operstate=5
Associated to a new BSS: BSSID=<BSSID>
No keys have been configured - skip key clearing
Associated with <BSSID>
WPA: Association event - clear replay counter
WPA: Clear old PTK
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: enable timer tick
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
Cancelling scan request
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RX EAPOL from <BSSID>
RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00 00 00 11 9d cd cc d2 b9 eb 29 ea c0 da 67 a1 7d ab 13 79 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 df d4 f3 46 61 e6 31 96 a0 f2 46 5f 59 18 f4 8d
Setting authentication timeout: 10 sec 0 usec
IEEE 802.1X RX: version=2 type=3 length=117
EAPOL-Key type=2
key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
key_length=16 key_data_length=22
replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 11
key_nonce - hexdump(len=32): 9d cd cc d2 b9 eb 29 ea c0 da 67 a1 7d ab 13 79 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d3
key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00 00 00 11 9d cd cc d2 b9 eb 29 ea c0 da 67 a1 7d ab 13 79 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 df d4 f3 46 61 e6 31 96 a0 f2 46 5f 59 18 f4 8d
State: ASSOCIATED -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from <BSSID> (ver=2)
RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 df d4 f3 46 61 e6 31 96 a0 f2 46 5f 59 18 f4 8d
RSN: PMKID from Authenticator - hexdump(len=16): df d4 f3 46 61 e6 31 96 a0 f2 46 5f 59 18 f4 8d
RSN: no matching PMKID found
WPA: Renewed SNonce - hexdump(len=32): 72 df d1 36 e0 74 e3 19 c3 06 bf 6f 43 6e 58 f9 60 7c d6 bc 6b 71 17 12 1c ae 47 12 11 4f 00 bf
WPA: PTK derivation - A1=00:1b:77:f1:7c:29 A2=<BSSID>
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: Sending EAPOL-Key 2/4
WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 11 72 df d1 36 e0 74 e3 19 c3 06 bf 6f 43 6e 58 f9 60 7c d6 bc 6b 71 17 12 1c ae 47 12 11 4f 00 bf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 a5 28 88 2d a0 ff 00 ce 3a 48 00 6b 6b fc de 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
RX EAPOL from <BSSID>
RX EAPOL - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00 00 00 12 9d cd cc d2 b9 eb 29 ea c0 da 67 a1 7d ab 13 79 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 df d4 f3 46 61 e6 31 96 a0 f2 46 5f 59 18 f4 8d
IEEE 802.1X RX: version=2 type=3 length=117
EAPOL-Key type=2
key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
key_length=16 key_data_length=22
replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 12
key_nonce - hexdump(len=32): 9d cd cc d2 b9 eb 29 ea c0 da 67 a1 7d ab 13 79 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d3
key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=121): 02 03 00 75 02 00 8a 00 10 00 00 00 00 00 00 00 12 9d cd cc d2 b9 eb 29 ea c0 da 67 a1 7d ab 13 79 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 dd 14 00 0f ac 04 df d4 f3 46 61 e6 31 96 a0 f2 46 5f 59 18 f4 8d
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from <BSSID> (ver=2)
RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 df d4 f3 46 61 e6 31 96 a0 f2 46 5f 59 18 f4 8d
RSN: PMKID from Authenticator - hexdump(len=16): df d4 f3 46 61 e6 31 96 a0 f2 46 5f 59 18 f4 8d
RSN: no matching PMKID found
WPA: PTK derivation - A1=00:1b:77:f1:7c:29 A2=<BSSID>
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: Sending EAPOL-Key 2/4
WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 12 72 df d1 36 e0 74 e3 19 c3 06 bf 6f 43 6e 58 f9 60 7c d6 bc 6b 71 17 12 1c ae 47 12 11 4f 00 bf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6f d3 5c 1e ba 58 76 34 f1 21 8f 01 52 ca 70 c0 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
RX EAPOL from <BSSID>
RX EAPOL - hexdump(len=155): 02 03 00 97 02 13 ca 00 10 00 00 00 00 00 00 00 13 9d cd cc d2 b9 eb 29 ea c0 da 67 a1 7d ab 13 79 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d3 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d4 1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1a ef fb 38 19 68 f7 76 fd 5e e5 0b 1d a5 29 7b 00 38 7f 12 e3 d2 69 1b 60 31 a0 cf 8d 8c 3b 11 8f e4 9e 0f c8 6e 68 b9 e1 05 43 e3 39 fe d4 0f a3 da b3 09 59 bb 8f 38 b2 d3 d4 5e 1f e9 b8 b4 d1 2a e2 b3 3c 94 ee 27 d2 97
IEEE 802.1X RX: version=2 type=3 length=151
EAPOL-Key type=2
key_info 0x13ca (ver=2 keyidx=0 rsvd=0 Pairwise Install Ack MIC Secure Encr)
key_length=16 key_data_length=56
replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 13
key_nonce - hexdump(len=32): 9d cd cc d2 b9 eb 29 ea c0 da 67 a1 7d ab 13 79 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d3
key_iv - hexdump(len=16): 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d4
key_rsc - hexdump(len=8): 1f 00 00 00 00 00 00 00
key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
key_mic - hexdump(len=16): 1a ef fb 38 19 68 f7 76 fd 5e e5 0b 1d a5 29 7b
WPA: RX EAPOL-Key - hexdump(len=155): 02 03 00 97 02 13 ca 00 10 00 00 00 00 00 00 00 13 9d cd cc d2 b9 eb 29 ea c0 da 67 a1 7d ab 13 79 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d3 07 46 27 ce 70 06 00 98 e9 d9 15 e4 a2 41 b2 d4 1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1a ef fb 38 19 68 f7 76 fd 5e e5 0b 1d a5 29 7b 00 38 7f 12 e3 d2 69 1b 60 31 a0 cf 8d 8c 3b 11 8f e4 9e 0f c8 6e 68 b9 e1 05 43 e3 39 fe d4 0f a3 da b3 09 59 bb 8f 38 b2 d3 d4 5e 1f e9 b8 b4 d1 2a e2 b3 3c 94 ee 27 d2 97
RSN: encrypted key data - hexdump(len=56): 7f 12 e3 d2 69 1b 60 31 a0 cf 8d 8c 3b 11 8f e4 9e 0f c8 6e 68 b9 e1 05 43 e3 39 fe d4 0f a3 da b3 09 59 bb 8f 38 b2 d3 d4 5e 1f e9 b8 b4 d1 2a e2 b3 3c 94 ee 27 d2 97
WPA: decrypted EAPOL-Key key data - hexdump(len=48): [REMOVED]
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 3 of 4-Way Handshake from <BSSID> (ver=2)
WPA: IE KeyData - hexdump(len=48): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 dd 16 00 0f ac 01 01 00 c5 27 25 bf 6e 60 1f 97 76 9e 6a 1b a4 76 73 6a dd 00
WPA: Sending EAPOL-Key 4/4
WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f 02 03 0a 00 00 00 00 00 00 00 00 00 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a7 23 5f 5a ac 1f 73 28 6c 75 44 eb c4 f7 e7 93 00 00
WPA: Installing PTK to the driver.
nl_set_encr: ifindex=5 alg=3 addr=0x6a48b8 key_idx=0 set_tx=1 seq_len=6 key_len=16
addr=<BSSID>
EAPOL: External notification - portValid=1
State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE
RSN: received GTK in pairwise handshake - hexdump(len=18): [REMOVED]
WPA: Group Key - hexdump(len=16): [REMOVED]
WPA: Installing GTK to the driver (keyidx=1 tx=0 len=16).
WPA: RSC - hexdump(len=6): 1f 00 00 00 00 00
nl_set_encr: ifindex=5 alg=3 addr=0x451355 key_idx=1 set_tx=0 seq_len=6 key_len=16
WPA: Key negotiation completed with <BSSID> [PTK=CCMP GTK=CCMP]
Cancelling authentication timeout
State: GROUP_HANDSHAKE -> COMPLETED
CTRL-EVENT-CONNECTED - Connection to <BSSID> completed (auth) [id=0 id_str=]
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
nl80211: Operstate: linkmode=-1, operstate=6
EAPOL: External notification - portValid=1
EAPOL: External notification - EAP success=1
EAPOL: SUPP_PAE entering state AUTHENTICATING
EAPOL: SUPP_BE entering state SUCCESS
EAP: EAP entering state DISABLED
EAPOL: SUPP_PAE entering state AUTHENTICATED
EAPOL: Supplicant port status: Authorized
EAPOL: SUPP_BE entering state IDLE
EAPOL authentication completed successfully
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
EAPOL: startWhen --> 0
EAPOL: disable timer tick
Setting scan request: 0 sec 0 usec
Scan SSID - hexdump_ascii(len=6):
31 32 33 34 35 36 <SSID>
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: New scan results available
Received scan results (9 BSSes)
CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: <BSSID> ssid='<SSID>' wpa_ie_len=0 rsn_ie_len=20 caps=0x411
selected based on RSN IE
selected WPA AP <BSSID> ssid='<SSID>'
Already associated with the selected AP.
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
wpa_driver_nl80211_disassociate
nl_set_encr: ifindex=5 alg=0 addr=0x451355 key_idx=0 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-67 Link has been severed)
nl_set_encr: ifindex=5 alg=0 addr=0x451355 key_idx=1 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-67 Link has been severed)
nl_set_encr: ifindex=5 alg=0 addr=0x451355 key_idx=2 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-67 Link has been severed)
nl_set_encr: ifindex=5 alg=0 addr=0x451355 key_idx=3 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-67 Link has been severed)
nl_set_encr: ifindex=5 alg=0 addr=0x6a2dd8 key_idx=0 set_tx=0 seq_len=0 key_len=0
addr=<BSSID>
nl80211: set_key failed; err=-67 Link has been severed)
State: COMPLETED -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 1->0 (DORMANT)
nl80211: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
No keys have been configured - skip key clearing
State: DISCONNECTED -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
nl80211: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
key_mgmt: 0x2
scan_ssid=1 (0x1)
PSK (ASCII passphrase) - hexdump_ascii(len=15): [REMOVED]
ssid - hexdump_ascii(len=6):
31 32 33 34 35 36 <SSID>
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Scan SSID - hexdump_ascii(len=6):
31 32 33 34 35 36 <SSID>
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 30 seconds
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Setting scan request: 0 sec 0 usec
Scan SSID - hexdump_ascii(len=6):
31 32 33 34 35 36 <SSID>
Starting AP scan for wildcard SSID
nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
Failed to initiate AP scan.
Setting scan request: 10 sec 0 usec
No keys have been configured - skip key clearing
State: SCANNING -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
nl80211: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
No keys have been configured - skip key clearing
State: DISCONNECTED -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
nl80211: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
No keys have been configured - skip key clearing
State: DISCONNECTED -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
nl80211: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
Scan timeout - try to get results
Received scan results (1 BSSes)
CTRL-EVENT-SCAN-RESULTS
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
Failed to initiate AP scan.
Setting scan request: 10 sec 0 usec
Setting scan request: 0 sec 0 usec
Starting AP scan for wildcard SSID
nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
Failed to initiate AP scan.
Setting scan request: 10 sec 0 usec
Setting scan request: 0 sec 0 usec
Starting AP scan for wildcard SSID
nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
Failed to initiate AP scan.
Setting scan request: 10 sec 0 usec
Setting scan request: 0 sec 0 usec
Starting AP scan for wildcard SSID
nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
Failed to initiate AP scan.
Setting scan request: 10 sec 0 usec
^ permalink raw reply
* Re: Kernel Panic in __ieee80211_tx with p43usb as AP
From: Bob Copeland @ 2009-08-24 20:19 UTC (permalink / raw)
To: Larry Finger; +Cc: Johannes Berg, Chr, wireless, John Linville
In-Reply-To: <4A92F2F5.6000909@lwfinger.net>
On Mon, Aug 24, 2009 at 4:07 PM, Larry Finger<Larry.Finger@lwfinger.net> wrote:
> static inline int drv_tx(struct ieee80211_local *local, struct sk_buff
> *skb)
> {
> return local->ops->tx(&local->hw, skb);
> }
>
> Are there any suggest changes that would let me debug this problem
> without crashing the kernel?
Could be a callback into mac80211, e.g. ieee80211_get_tx_rate()
returning null (I haven't looked at any p54 code, I just know I've hit
one there before with ath5k).
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply
* Re: Kernel Panic in __ieee80211_tx with p43usb as AP
From: Johannes Berg @ 2009-08-24 20:16 UTC (permalink / raw)
To: Larry Finger; +Cc: Chr, wireless, John Linville
In-Reply-To: <4A92F2F5.6000909@lwfinger.net>
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
On Mon, 2009-08-24 at 15:07 -0500, Larry Finger wrote:
> All went well until I had a Windows Vista client connect to the
> network. As soon as I launched a browser, the kernel on the AP crashed.
Rather strange.
> The kernel in question is 2.6.31-rc7-Linus-00012-g3edf2fb from the
> mainline tree. I do not know the reported reason for the panic, as
> that scrolls off the screen. The traceback shows the error to be in
> __ieee80211_tx in this statement: ret = drv_tx(local, skb), which
> makes the problem be here:
>
> static inline int drv_tx(struct ieee80211_local *local, struct sk_buff
> *skb)
> {
> return local->ops->tx(&local->hw, skb);
> }
>
> Are there any suggest changes that would let me debug this problem
> without crashing the kernel?
Are you sure it's right there, and not maybe in p54's tx routine which
gets called from here? I mean, the only reason I see for this particular
line of code to go wrong would be corruption of the "local",
"local->ops", or "local->ops->tx" pointers, which seems rather unlikely.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH] libertas: add NULL check on return value of get_zeroed_page
From: John W. Linville @ 2009-08-24 20:00 UTC (permalink / raw)
To: Kiran Divekar; +Cc: libertas-dev, linux-wireless
In-Reply-To: <1fe543780908230952v5738f6bck943627d0de6c1383@mail.gmail.com>
On Sun, Aug 23, 2009 at 10:22:22PM +0530, Kiran Divekar wrote:
> From fb132b536facfbdc47a24afe538c50662d16b3ad Mon Sep 17 00:00:00 2001
> From: Kiran Divekar <kirandivekar@gmail.com>
> Date: Sun, 23 Aug 2009 22:05:21 +0530
> Subject: [PATCH] add NULL check on return value of get_zeroed_page
>
> Most of the places in debugfs.c are missing a NULL check on the return value of
> get_zeroed_page API call. Added required NULL check at appropriate places.
>
> Signed-off-by: Kiran Divekar <kirandivekar@gmail.com>
#1 -- Don't post the output of git format-patch directly like this. Use git
send-email instead.
> ---
> drivers/net/wireless/libertas/debugfs.c | 28 ++++++++++++++++++++++++++++
> 1 files changed, 28 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/libertas/debugfs.c
> b/drivers/net/wireless/libertas/debugfs.c
> index 811ffc3..893a55c 100644
> --- a/drivers/net/wireless/libertas/debugfs.c
> +++ b/drivers/net/wireless/libertas/debugfs.c
> @@ -45,6 +45,8 @@ static ssize_t lbs_dev_info(struct file *file, char
> __user *userbuf,
> unsigned long addr = get_zeroed_page(GFP_KERNEL);
> char *buf = (char *)addr;
> ssize_t res;
> + if (!buf)
> + return -ENOMEM;
>
> pos += snprintf(buf+pos, len-pos, "state = %s\n",
> szStates[priv->connect_status]);
#2 -- Don't use an MUA that alters whitespace in the message.
Feel free to repost...
John
--
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
* Kernel Panic in __ieee80211_tx with p43usb as AP
From: Larry Finger @ 2009-08-24 20:07 UTC (permalink / raw)
To: Johannes Berg, Chr; +Cc: wireless, John Linville
In trying to track down a WARNING reported while using p54usb as the
basis for an AP (http://bugzilla.kernel.org/show_bug.cgi?id=13725), I
created an AP using hostapd 0.6.8. It worked fine as long as I used a
Linux client. I ran repeated tcpperf runs through it to my server, and
repeated installations of b43 firmware. That routine uses wget to pull
the driver files. The only machine I had available as a client does
not include X, so I could not run a browser.
All went well until I had a Windows Vista client connect to the
network. As soon as I launched a browser, the kernel on the AP crashed.
The kernel in question is 2.6.31-rc7-Linus-00012-g3edf2fb from the
mainline tree. I do not know the reported reason for the panic, as
that scrolls off the screen. The traceback shows the error to be in
__ieee80211_tx in this statement: ret = drv_tx(local, skb), which
makes the problem be here:
static inline int drv_tx(struct ieee80211_local *local, struct sk_buff
*skb)
{
return local->ops->tx(&local->hw, skb);
}
Are there any suggest changes that would let me debug this problem
without crashing the kernel?
Thanks,
Larry
^ permalink raw reply
* [PATCH] compal-laptop: Replace sysfs support with rfkill support
From: Mario Limonciello @ 2009-08-24 19:50 UTC (permalink / raw)
To: cezary.jackiewicz
Cc: linux-wireless, linux-acpi, linux-kernel, Mario Limonciello
In-Reply-To: <9b2b86520908220420p282c862fn9c44697db010a08d@mail.gmail.com>
This drops the support for manually groking the files in sysfs
to turn on and off the WLAN and BT for Compal laptops in favor
of platform rfkill support.
It has been combined into a single patch to not introduce regressions
in the process of simply adding rfkill support
Signed-off-by: Mario Limonciello <Mario_Limonciello@Dell.com>
Reviewed-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
---
drivers/platform/x86/compal-laptop.c | 201 +++++++++++-----------------------
1 files changed, 63 insertions(+), 138 deletions(-)
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index c1c8c03..9b1cc45 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -26,17 +26,8 @@
/*
* comapl-laptop.c - Compal laptop support.
*
- * This driver exports a few files in /sys/devices/platform/compal-laptop/:
- *
- * wlan - wlan subsystem state: contains 0 or 1 (rw)
- *
- * bluetooth - Bluetooth subsystem state: contains 0 or 1 (rw)
- *
- * raw - raw value taken from embedded controller register (ro)
- *
- * In addition to these platform device attributes the driver
- * registers itself in the Linux backlight control subsystem and is
- * available to userspace under /sys/class/backlight/compal-laptop/.
+ * The driver registers itself with the rfkill subsystem and
+ * the Linux backlight control subsystem.
*
* This driver might work on other laptops produced by Compal. If you
* want to try it you can pass force=1 as argument to the module which
@@ -52,6 +43,7 @@
#include <linux/backlight.h>
#include <linux/platform_device.h>
#include <linux/autoconf.h>
+#include <linux/rfkill.h>
#define COMPAL_DRIVER_VERSION "0.2.6"
@@ -64,6 +56,10 @@
#define WLAN_MASK 0x01
#define BT_MASK 0x02
+static struct rfkill *wifi_rfkill;
+static struct rfkill *bt_rfkill;
+static struct platform_device *compal_device;
+
static int force;
module_param(force, bool, 0);
MODULE_PARM_DESC(force, "Force driver load, ignore DMI data");
@@ -89,65 +85,75 @@ static int get_lcd_level(void)
return (int) result;
}
-static int set_wlan_state(int state)
+static int compal_rfkill_set(void *data, bool blocked)
{
+ unsigned long radio = (unsigned long) data;
u8 result, value;
ec_read(COMPAL_EC_COMMAND_WIRELESS, &result);
- if ((result & KILLSWITCH_MASK) == 0)
- return -EINVAL;
- else {
- if (state)
- value = (u8) (result | WLAN_MASK);
- else
- value = (u8) (result & ~WLAN_MASK);
- ec_write(COMPAL_EC_COMMAND_WIRELESS, value);
- }
+ if (!blocked)
+ value = (u8) (result | radio);
+ else
+ value = (u8) (result & ~radio);
+ ec_write(COMPAL_EC_COMMAND_WIRELESS, value);
return 0;
}
-static int set_bluetooth_state(int state)
+static void compal_rfkill_poll(struct rfkill *rfkill, void *data)
{
- u8 result, value;
+ u8 result;
+ bool hw_blocked;
ec_read(COMPAL_EC_COMMAND_WIRELESS, &result);
- if ((result & KILLSWITCH_MASK) == 0)
- return -EINVAL;
- else {
- if (state)
- value = (u8) (result | BT_MASK);
- else
- value = (u8) (result & ~BT_MASK);
- ec_write(COMPAL_EC_COMMAND_WIRELESS, value);
- }
-
- return 0;
+ hw_blocked = !(result & KILLSWITCH_MASK);
+ rfkill_set_hw_state(rfkill, hw_blocked);
}
-static int get_wireless_state(int *wlan, int *bluetooth)
+static const struct rfkill_ops compal_rfkill_ops = {
+ .poll = compal_rfkill_poll,
+ .set_block = compal_rfkill_set,
+};
+
+static int setup_rfkill(void)
{
- u8 result;
+ int ret;
- ec_read(COMPAL_EC_COMMAND_WIRELESS, &result);
+ wifi_rfkill = rfkill_alloc("compal-wifi", &compal_device->dev,
+ RFKILL_TYPE_WLAN, &compal_rfkill_ops,
+ (void *) WLAN_MASK);
+ if (!wifi_rfkill)
+ return -ENOMEM;
- if (wlan) {
- if ((result & KILLSWITCH_MASK) == 0)
- *wlan = 0;
- else
- *wlan = result & WLAN_MASK;
- }
+ ret = rfkill_register(wifi_rfkill);
+ if (ret)
+ goto err_wifi;
- if (bluetooth) {
- if ((result & KILLSWITCH_MASK) == 0)
- *bluetooth = 0;
- else
- *bluetooth = (result & BT_MASK) >> 1;
+ bt_rfkill = rfkill_alloc("compal-bluetooth", &compal_device->dev,
+ RFKILL_TYPE_BLUETOOTH, &compal_rfkill_ops,
+ (void *) BT_MASK);
+ if (!bt_rfkill) {
+ ret = -ENOMEM;
+ goto err_allocate_bt;
}
+ ret = rfkill_register(bt_rfkill);
+ if (ret)
+ goto err_register_bt;
return 0;
+
+err_register_bt:
+ rfkill_destroy(bt_rfkill);
+
+err_allocate_bt:
+ rfkill_unregister(wifi_rfkill);
+
+err_wifi:
+ rfkill_destroy(wifi_rfkill);
+
+ return ret;
}
/* Backlight device stuff */
@@ -170,86 +176,6 @@ static struct backlight_ops compalbl_ops = {
static struct backlight_device *compalbl_device;
-/* Platform device */
-
-static ssize_t show_wlan(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- int ret, enabled;
-
- ret = get_wireless_state(&enabled, NULL);
- if (ret < 0)
- return ret;
-
- return sprintf(buf, "%i\n", enabled);
-}
-
-static ssize_t show_raw(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- u8 result;
-
- ec_read(COMPAL_EC_COMMAND_WIRELESS, &result);
-
- return sprintf(buf, "%i\n", result);
-}
-
-static ssize_t show_bluetooth(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- int ret, enabled;
-
- ret = get_wireless_state(NULL, &enabled);
- if (ret < 0)
- return ret;
-
- return sprintf(buf, "%i\n", enabled);
-}
-
-static ssize_t store_wlan_state(struct device *dev,
- struct device_attribute *attr, const char *buf, size_t count)
-{
- int state, ret;
-
- if (sscanf(buf, "%i", &state) != 1 || (state < 0 || state > 1))
- return -EINVAL;
-
- ret = set_wlan_state(state);
- if (ret < 0)
- return ret;
-
- return count;
-}
-
-static ssize_t store_bluetooth_state(struct device *dev,
- struct device_attribute *attr, const char *buf, size_t count)
-{
- int state, ret;
-
- if (sscanf(buf, "%i", &state) != 1 || (state < 0 || state > 1))
- return -EINVAL;
-
- ret = set_bluetooth_state(state);
- if (ret < 0)
- return ret;
-
- return count;
-}
-
-static DEVICE_ATTR(bluetooth, 0644, show_bluetooth, store_bluetooth_state);
-static DEVICE_ATTR(wlan, 0644, show_wlan, store_wlan_state);
-static DEVICE_ATTR(raw, 0444, show_raw, NULL);
-
-static struct attribute *compal_attributes[] = {
- &dev_attr_bluetooth.attr,
- &dev_attr_wlan.attr,
- &dev_attr_raw.attr,
- NULL
-};
-
-static struct attribute_group compal_attribute_group = {
- .attrs = compal_attributes
-};
static struct platform_driver compal_driver = {
.driver = {
@@ -258,8 +184,6 @@ static struct platform_driver compal_driver = {
}
};
-static struct platform_device *compal_device;
-
/* Initialization */
static int dmi_check_cb(const struct dmi_system_id *id)
@@ -390,23 +314,21 @@ static int __init compal_init(void)
ret = platform_device_add(compal_device);
if (ret)
- goto fail_platform_device1;
+ goto fail_platform_device;
- ret = sysfs_create_group(&compal_device->dev.kobj,
- &compal_attribute_group);
+ ret = setup_rfkill();
if (ret)
- goto fail_platform_device2;
+ goto fail_rfkill;
printk(KERN_INFO "compal-laptop: driver "COMPAL_DRIVER_VERSION
" successfully loaded.\n");
return 0;
-fail_platform_device2:
-
+fail_rfkill:
platform_device_del(compal_device);
-fail_platform_device1:
+fail_platform_device:
platform_device_put(compal_device);
@@ -424,10 +346,13 @@ fail_backlight:
static void __exit compal_cleanup(void)
{
- sysfs_remove_group(&compal_device->dev.kobj, &compal_attribute_group);
platform_device_unregister(compal_device);
platform_driver_unregister(&compal_driver);
backlight_device_unregister(compalbl_device);
+ rfkill_unregister(wifi_rfkill);
+ rfkill_destroy(wifi_rfkill);
+ rfkill_unregister(bt_rfkill);
+ rfkill_destroy(bt_rfkill);
printk(KERN_INFO "compal-laptop: driver unloaded.\n");
}
--
1.6.3.3
^ permalink raw reply related
* Re: Few warnings from master-2009-08-17
From: Johannes Berg @ 2009-08-24 19:50 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless
In-Reply-To: <43e72e890908241243w6b6de4d9o6e2fc22e5c814f5e@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
On Mon, 2009-08-24 at 12:43 -0700, Luis R. Rodriguez wrote:
> > Ok, but I don't see the warning after that.
>
> Well it was in the e-mail. Here is some log, not sure if it was the
> exact same one from that day but it does seem the capture the entire
> thing:
>
> [ 1058.261102] No probe response from AP <AP-mac-address> after 500ms, try 1
> [ 1058.761100] No probe response from AP <AP-mac-address> after 500ms, try 2
> [ 1059.261122] No probe response from AP <AP-mac-address> after 500ms, try 3
> [ 1059.761105] No probe response from AP <AP-mac-address> after 500ms, try 4
> [ 1060.261105] No probe response from AP <AP-mac-address> after
> 500ms, disconnecting.
> [ 1060.264257] phy1: device now idle
> [ 1060.268293] phy1: Removed STA <AP-mac-address>
> [ 1060.290788] phy1: Destroyed STA <AP-mac-address>
> [ 1060.290961] wlan6: deauthenticating by local choice (reason=3)
> [ 1060.291025] ------------[ cut here ]------------
> [ 1060.291057] WARNING: at net/wireless/sme.c:610
> __cfg80211_disconnected+0x1fb/0x260 [cfg80211]()
Well, yes, I just can't reproduce the warning. Need better instructions
how you do that.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: Few warnings from master-2009-08-17
From: Luis R. Rodriguez @ 2009-08-24 19:43 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1251142659.12661.0.camel@johannes.local>
On Mon, Aug 24, 2009 at 12:37 PM, Johannes
Berg<johannes@sipsolutions.net> wrote:
> On Mon, 2009-08-24 at 11:21 -0700, Luis R. Rodriguez wrote:
>
>> [ 1058.261102] No probe response from AP <AP-mac-address> after 500ms, try 1
>> [ 1058.761100] No probe response from AP <AP-mac-address> after 500ms, try 2
>> [ 1059.261122] No probe response from AP <AP-mac-address> after 500ms, try 3
>> [ 1059.761105] No probe response from AP <AP-mac-address> after 500ms, try 4
>> [ 1060.261105] No probe response from AP <AP-mac-address> after 500ms,
>> disconnecting.
>> [ 1060.264257] phy1: device now idle
>> [ 1060.268293] phy1: Removed STA <AP-mac-address>
>> [ 1060.290788] phy1: Destroyed STA <AP-mac-address>
>> [ 1060.290961] wlan6: deauthenticating by local choice (reason=3)
>
> Ok, but I don't see the warning after that.
Well it was in the e-mail. Here is some log, not sure if it was the
exact same one from that day but it does seem the capture the entire
thing:
[ 1058.261102] No probe response from AP <AP-mac-address> after 500ms, try 1
[ 1058.761100] No probe response from AP <AP-mac-address> after 500ms, try 2
[ 1059.261122] No probe response from AP <AP-mac-address> after 500ms, try 3
[ 1059.761105] No probe response from AP <AP-mac-address> after 500ms, try 4
[ 1060.261105] No probe response from AP <AP-mac-address> after
500ms, disconnecting.
[ 1060.264257] phy1: device now idle
[ 1060.268293] phy1: Removed STA <AP-mac-address>
[ 1060.290788] phy1: Destroyed STA <AP-mac-address>
[ 1060.290961] wlan6: deauthenticating by local choice (reason=3)
[ 1060.291025] ------------[ cut here ]------------
[ 1060.291057] WARNING: at net/wireless/sme.c:610
__cfg80211_disconnected+0x1fb/0x260 [cfg80211]()
[ 1060.291064] Hardware name: 7660A14
[ 1060.291069] deauth failed: -67
[ 1060.291073] Modules linked in: ar9170usb mac80211 ath cfg80211
<bleh> [last unloaded: ar9170usb]
[ 1060.291230] Pid: 5525, comm: phy1 Tainted: G W 2.6.31-rc6-wl #139
[ 1060.291237] Call Trace:
[ 1060.291252] [<ffffffff810585a8>] warn_slowpath_common+0x78/0xb0
[ 1060.291262] [<ffffffff8105863c>] warn_slowpath_fmt+0x3c/0x40
[ 1060.291287] [<ffffffffa018682b>]
__cfg80211_disconnected+0x1fb/0x260 [cfg80211]
[ 1060.291312] [<ffffffffa01849f2>] ? cfg80211_send_deauth+0x62/0x80 [cfg80211]
[ 1060.291336] [<ffffffffa0184918>]
__cfg80211_send_deauth+0x228/0x2a0 [cfg80211]
[ 1060.291359] [<ffffffffa0184a01>] cfg80211_send_deauth+0x71/0x80 [cfg80211]
[ 1060.291394] [<ffffffffa03d9c1f>]
ieee80211_send_deauth_disassoc+0x14f/0x170 [mac80211]
[ 1060.291425] [<ffffffffa03dd52b>] ieee80211_sta_work+0xceb/0x1100 [mac80211]
[ 1060.291456] [<ffffffffa03dc840>] ? ieee80211_sta_work+0x0/0x1100 [mac80211]
[ 1060.291466] [<ffffffff8106de80>] worker_thread+0x1d0/0x380
[ 1060.291475] [<ffffffff8106de2e>] ? worker_thread+0x17e/0x380
[ 1060.291487] [<ffffffff8152977b>] ? _spin_unlock_irqrestore+0x3b/0x70
[ 1060.291499] [<ffffffff81073630>] ? autoremove_wake_function+0x0/0x40
[ 1060.291509] [<ffffffff8106dcb0>] ? worker_thread+0x0/0x380
[ 1060.291518] [<ffffffff81073266>] kthread+0xa6/0xb0
[ 1060.291529] [<ffffffff810130ca>] child_rip+0xa/0x20
[ 1060.291540] [<ffffffff81012a50>] ? restore_args+0x0/0x30
[ 1060.291549] [<ffffffff810731c0>] ? kthread+0x0/0xb0
[ 1060.291557] [<ffffffff810130c0>] ? child_rip+0x0/0x20
[ 1060.291564] ---[ end trace 7ef91a8a6ee731a3 ]---
[ 1060.428931] phy1: device no longer idle - scanning
[ 1068.424002] phy1: device now idle
[ 1073.259516] phy1: device no longer idle - scanning
[ 1081.234199] phy1: device now idle
[ 1086.357427] phy1: device no longer idle - scanning
[ 1094.366167] phy1: device now idle
Let me know if this helps or if you need something more recent.
Luis
^ permalink raw reply
* Re: Few warnings from master-2009-08-17
From: Johannes Berg @ 2009-08-24 19:37 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless
In-Reply-To: <43e72e890908241121j43683b75x38ef7c2ef3a71463@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 751 bytes --]
On Mon, 2009-08-24 at 11:21 -0700, Luis R. Rodriguez wrote:
> [ 1058.261102] No probe response from AP <AP-mac-address> after 500ms, try 1
> [ 1058.761100] No probe response from AP <AP-mac-address> after 500ms, try 2
> [ 1059.261122] No probe response from AP <AP-mac-address> after 500ms, try 3
> [ 1059.761105] No probe response from AP <AP-mac-address> after 500ms, try 4
> [ 1060.261105] No probe response from AP <AP-mac-address> after 500ms,
> disconnecting.
> [ 1060.264257] phy1: device now idle
> [ 1060.268293] phy1: Removed STA <AP-mac-address>
> [ 1060.290788] phy1: Destroyed STA <AP-mac-address>
> [ 1060.290961] wlan6: deauthenticating by local choice (reason=3)
Ok, but I don't see the warning after that.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* [PATCH v2] mac80211: Fix output of minstrels rc_stats
From: Arnd Hannemann @ 2009-08-24 18:51 UTC (permalink / raw)
To: linux-wireless; +Cc: joe, proski, Arnd Hannemann
In-Reply-To: <1251138015.13464.2.camel@mj>
An integer overflow in the minstrel debug code prevented the
throughput to be displayed correctly. This patch fixes that,
by permutating operations like proposed by Pavel Roskin.
Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
---
net/mac80211/rc80211_minstrel_debugfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c
index 98f4807..3d72ec5 100644
--- a/net/mac80211/rc80211_minstrel_debugfs.c
+++ b/net/mac80211/rc80211_minstrel_debugfs.c
@@ -83,7 +83,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
p += sprintf(p, "%3u%s", mr->bitrate / 2,
(mr->bitrate & 1 ? ".5" : " "));
- tp = ((mr->cur_tp * 96) / 18000) >> 10;
+ tp = mr->cur_tp / ((18000 << 10) / 96);
prob = mr->cur_prob / 18;
eprob = mr->probability / 18;
--
1.6.4.1
^ permalink raw reply related
* Re: [PATCH] mac80211: Fix output of minstrels rc_stats
From: Arnd Hannemann @ 2009-08-24 18:38 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Joe Perches, Arnd Hannemann, linux-wireless@vger.kernel.org
In-Reply-To: <4A92DDAB.6040503@nets.rwth-aachen.de>
Arnd Hannemann schrieb:
> Pavel Roskin schrieb:
>> On Mon, 2009-08-24 at 10:57 -0700, Joe Perches wrote:
>>> On Mon, 2009-08-24 at 19:42 +0200, Arnd Hannemann wrote:
>>>> An integer overflow in the minstrel debug code prevented the
>>>> throughput to be displayed correctly. This patch fixes that,
>>>> by swaping the division and multiplication.
>>>>
>>>> Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
>>>> ---
>>>> net/mac80211/rc80211_minstrel_debugfs.c | 2 +-
>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c
>>>> index 98f4807..caf9453 100644
>>>> --- a/net/mac80211/rc80211_minstrel_debugfs.c
>>>> +++ b/net/mac80211/rc80211_minstrel_debugfs.c
>>>> @@ -83,7 +83,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
>>>> p += sprintf(p, "%3u%s", mr->bitrate / 2,
>>>> (mr->bitrate & 1 ? ".5" : " "));
>>>>
>>>> - tp = ((mr->cur_tp * 96) / 18000) >> 10;
>>>> + tp = ((mr->cur_tp / 18000) * 96) >> 10;
>>> Maybe do_div instead?
>> How about this?
>>
>> tp = mr->cur_tp / ((18000 << 10) / 96);
>>
>> ((18000 << 10) / 96) is exactly 192000.
>>
>
> Hmm don't seems to be equivalent with the original statement:
>
> a = 61027734;
> b = ((a * 96) / 18000) >> 10;
> c = a / ((18000 << 10) / 96);
> printf("%u %u\n", b, c);
>
> Outputs:
> 84 317
Outch, sorry I took the overflowing formula not the fixed one!
Best regards,
Arnd
^ permalink raw reply
* Re: [PATCH] mac80211: Fix output of minstrels rc_stats
From: Arnd Hannemann @ 2009-08-24 18:36 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Joe Perches, Arnd Hannemann, linux-wireless@vger.kernel.org
In-Reply-To: <1251138015.13464.2.camel@mj>
Pavel Roskin schrieb:
> On Mon, 2009-08-24 at 10:57 -0700, Joe Perches wrote:
>> On Mon, 2009-08-24 at 19:42 +0200, Arnd Hannemann wrote:
>>> An integer overflow in the minstrel debug code prevented the
>>> throughput to be displayed correctly. This patch fixes that,
>>> by swaping the division and multiplication.
>>>
>>> Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
>>> ---
>>> net/mac80211/rc80211_minstrel_debugfs.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c
>>> index 98f4807..caf9453 100644
>>> --- a/net/mac80211/rc80211_minstrel_debugfs.c
>>> +++ b/net/mac80211/rc80211_minstrel_debugfs.c
>>> @@ -83,7 +83,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
>>> p += sprintf(p, "%3u%s", mr->bitrate / 2,
>>> (mr->bitrate & 1 ? ".5" : " "));
>>>
>>> - tp = ((mr->cur_tp * 96) / 18000) >> 10;
>>> + tp = ((mr->cur_tp / 18000) * 96) >> 10;
>> Maybe do_div instead?
>
> How about this?
>
> tp = mr->cur_tp / ((18000 << 10) / 96);
>
> ((18000 << 10) / 96) is exactly 192000.
>
Hmm don't seems to be equivalent with the original statement:
a = 61027734;
b = ((a * 96) / 18000) >> 10;
c = a / ((18000 << 10) / 96);
printf("%u %u\n", b, c);
Outputs:
84 317
Best regards,
Arnd
^ permalink raw reply
* Re: Few warnings from master-2009-08-17
From: Luis R. Rodriguez @ 2009-08-24 18:21 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1250847779.17888.5.camel@johannes.local>
On Fri, Aug 21, 2009 at 2:42 AM, Johannes Berg<johannes@sipsolutions.net> wrote:
> On Mon, 2009-08-17 at 18:04 -0700, Luis R. Rodriguez wrote:
>
>> Aug 17 17:45:50 tux kernel: [ 424.812910] ------------[ cut here ]------------
>> Aug 17 17:45:50 tux kernel: [ 424.812928] WARNING: at
>> net/wireless/sme.c:610 __cfg80211_disconnected+0x1fb/0x260
>> [cfg80211]()
>> Aug 17 17:45:50 tux kernel: [ 424.812931] Hardware name: 7660A14
>> Aug 17 17:45:50 tux kernel: [ 424.812933] deauth failed: -67
>
> what was before that?
[ 1058.261102] No probe response from AP <AP-mac-address> after 500ms, try 1
[ 1058.761100] No probe response from AP <AP-mac-address> after 500ms, try 2
[ 1059.261122] No probe response from AP <AP-mac-address> after 500ms, try 3
[ 1059.761105] No probe response from AP <AP-mac-address> after 500ms, try 4
[ 1060.261105] No probe response from AP <AP-mac-address> after 500ms,
disconnecting.
[ 1060.264257] phy1: device now idle
[ 1060.268293] phy1: Removed STA <AP-mac-address>
[ 1060.290788] phy1: Destroyed STA <AP-mac-address>
[ 1060.290961] wlan6: deauthenticating by local choice (reason=3)
Luis
^ permalink raw reply
* Re: [PATCH] mac80211: Fix output of minstrels rc_stats
From: Arnd Hannemann @ 2009-08-24 18:19 UTC (permalink / raw)
To: Joe Perches; +Cc: Arnd Hannemann, linux-wireless@vger.kernel.org
In-Reply-To: <1251136676.3873.28.camel@Joe-Laptop.home>
Joe Perches schrieb:
> On Mon, 2009-08-24 at 19:42 +0200, Arnd Hannemann wrote:
>> An integer overflow in the minstrel debug code prevented the
>> throughput to be displayed correctly. This patch fixes that,
>> by swaping the division and multiplication.
>>
>> Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
>> ---
>> net/mac80211/rc80211_minstrel_debugfs.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c
>> index 98f4807..caf9453 100644
>> --- a/net/mac80211/rc80211_minstrel_debugfs.c
>> +++ b/net/mac80211/rc80211_minstrel_debugfs.c
>> @@ -83,7 +83,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
>> p += sprintf(p, "%3u%s", mr->bitrate / 2,
>> (mr->bitrate & 1 ? ".5" : " "));
>>
>> - tp = ((mr->cur_tp * 96) / 18000) >> 10;
>> + tp = ((mr->cur_tp / 18000) * 96) >> 10;
>
> Maybe do_div instead?
Do you mean the do_div from asm/div64h ?
It seems overly complicated to me. It would result in something like:
tp = mr->cur_tp;
do_div(tp, 18000);
tp = (tp * 96) >> 10;
Or am I missing something?
Probably
tp = mr->cur_tp * 96;
would not work..., as it would already overflow. Not sure if
do_div(tp * 96, 18000);
would work?
Best regards,
Arnd
^ permalink raw reply
* Re: [PATCH] mac80211: Fix output of minstrels rc_stats
From: Pavel Roskin @ 2009-08-24 18:20 UTC (permalink / raw)
To: Joe Perches; +Cc: Arnd Hannemann, linux-wireless
In-Reply-To: <1251136676.3873.28.camel@Joe-Laptop.home>
On Mon, 2009-08-24 at 10:57 -0700, Joe Perches wrote:
> On Mon, 2009-08-24 at 19:42 +0200, Arnd Hannemann wrote:
> > An integer overflow in the minstrel debug code prevented the
> > throughput to be displayed correctly. This patch fixes that,
> > by swaping the division and multiplication.
> >
> > Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
> > ---
> > net/mac80211/rc80211_minstrel_debugfs.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c
> > index 98f4807..caf9453 100644
> > --- a/net/mac80211/rc80211_minstrel_debugfs.c
> > +++ b/net/mac80211/rc80211_minstrel_debugfs.c
> > @@ -83,7 +83,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
> > p += sprintf(p, "%3u%s", mr->bitrate / 2,
> > (mr->bitrate & 1 ? ".5" : " "));
> >
> > - tp = ((mr->cur_tp * 96) / 18000) >> 10;
> > + tp = ((mr->cur_tp / 18000) * 96) >> 10;
>
> Maybe do_div instead?
How about this?
tp = mr->cur_tp / ((18000 << 10) / 96);
((18000 << 10) / 96) is exactly 192000.
--
Regards,
Pavel Roskin
^ permalink raw reply
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