2008-06-17 07:52:55

by David Miller

[permalink] [raw]
Subject: [PATCH 0/12]: Proper compat WEXT support.


This is what I consider the final submission of this patch set, it's
ready to go. I also made sure all the patches are checkpatch clean.

I've actually tested these exact patches on sparc64 with a RNDIS based
USB wireless device from Linksys. I was able to perform iwconfig
commands, check iwlist, bring up the interface and use it properly.
All with 32-bit tools. I've also done an allmodconfig sanity build
check on sparc64. Masakazu-san has tested these patches extensively
on PS3 systems, using the gelic and zd1211 drivers. In particular he
tested wpa_supplicant use.

The patch set starts by cleaning up the code so that we can avoid
having multiple copies of the WEXT main dispatch routines, one for
compat and one for the non-compat case.

Next, basic compat level handling of the WEXT ioctl is added, and the
equivalent code in the compat_ioctl.c file is removed.

Finally, compat IWE stream munging is added for the wireless layer.
When we get a compat WEXT ioctl request, we set a bit in the request
info blob, and the stream building helpers tip off this to format the
stream entries properly.

These patches are against net-next-2.6 and are also available as
a GIT tree at:

master.kernel.org:/pub/scm/linux/kernel/git/davem/wireless-2.6.git

John, please pull or apply as you deem appropriate.


2008-06-16 09:15:43

by Masakazu Mokuno

[permalink] [raw]
Subject: Re: [PATCH 0/12]: Proper compat WEXT support.


On Thu, 12 Jun 2008 22:53:32 -0700 (PDT)
David Miller <[email protected]> wrote:

> Here is a new version of patch 12, which should fix the problems
> you reported here. The idea is simple, all references to
> IW_EV_LCP_LEN are replaced with calls to a new inline function
> named iwe_stream_lcp_len() which returns the compat value if
> necessary.
>
> wext: Emit event stream entries correctly when compat.
>
> Three major portions to this change:
>
> 1) Add IW_EV_COMPAT_LCP_LEN, IW_EV_COMPAT_POINT_OFF,
> and IW_EV_COMPAT_POINT_LEN helper defines.
>
> 2) Delete iw_stream_check_add_*(), they are unused.
>
> 3) Add iw_request_info argument to iwe_stream_add_*(), and use it to
> size the event and pointer lengths correctly depending upon whether
> IW_REQUEST_FLAG_COMPAT is set or not.
>
> 4) The mechanical transformations to the drivers and wireless stack
> bits to get the iw_request_info passed down into the routines
> modified in #3. Also, explicit references to IW_EV_LCP_LEN are
> replaced with iwe_stream_lcp_len(info).
>
> With a lot of help and bug fixes from Masakazu Mokuno.
>
> Signed-off-by: David S. Miller <[email protected]>
> ---
> drivers/net/ps3_gelic_wireless.c | 30 +++---
> drivers/net/wireless/airo.c | 43 +++++---
> drivers/net/wireless/atmel.c | 24 ++++-
> drivers/net/wireless/hostap/hostap.h | 3 +-
> drivers/net/wireless/hostap/hostap_ap.c | 32 +++---
> drivers/net/wireless/hostap/hostap_ioctl.c | 58 ++++++-----
> drivers/net/wireless/libertas/scan.c | 36 ++++---
> drivers/net/wireless/orinoco.c | 23 +++--
> drivers/net/wireless/prism54/isl_ioctl.c | 49 +++++----
> drivers/net/wireless/rndis_wlan.c | 31 +++---
> drivers/net/wireless/wl3501_cs.c | 10 +-
> drivers/net/wireless/zd1201.c | 21 +++--
> include/linux/wireless.h | 15 +++
> include/net/iw_handler.h | 149 +++++++++-------------------
> net/ieee80211/ieee80211_wx.c | 48 +++++----
> net/mac80211/ieee80211_i.h | 5 +-
> net/mac80211/mlme.c | 45 +++++----
> net/mac80211/wext.c | 2 +-
> 18 files changed, 323 insertions(+), 301 deletions(-)

Thank you again for updating the patch set!

With this new patch #12, it worked OK for me. I tested on my PS3 with:

- wireless_tools version 28 and 29. Both 64 and 32-bit compiled
iwlist and iwconfig
- wpa_supplicant 0.6.x, 64 and 32-bit compiled
- gelic and zd1211 driver


checkpatch.pl complained some error/warnings on the patches #7, #9 and
#12. It seemed that most of them were inherited from the original code,
some seemed like newly created ones, like 80-characters over warnings in
net/mac80211/mlme.c. We might want to fix them?

Anyway the code works fine. Again, thank you!

--
Masakazu Mokuno