All of lore.kernel.org
 help / color / mirror / Atom feed
* wireless-dev.git breaks wireless extensions
@ 2007-02-16 23:54 Pavel Roskin
  2007-02-17  0:09 ` Johannes Berg
  2007-02-17  1:03 ` [PATCH] fix wext_ioctl() exit path Johannes Berg
  0 siblings, 2 replies; 7+ messages in thread
From: Pavel Roskin @ 2007-02-16 23:54 UTC (permalink / raw)
  To: linux-wireless

Hello!

Today's wireless-dev.git breaks wireless extensions.  It forces
CONFIG_CFG80211 to be enabled.  I reported that it breaks legacy driver=
s
back in December 2006.  It's still broken.  That's what I get for
MadWifi:

ath0      4=BF3=C0=D8=BD=BF  ESSID:"" [51]  Nickname:""
          Channel:-0  Access Point: 9F:DD:13:94:33:C0   Bit Rate=3D-576=
733 kb/s  =20
          Tx-Power=3Doff   Sensitivity=3D-576733388 dBm =20
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=3D0/94  Signal level=3D-96 dBm  Noise level=3D-9=
6 dBm
          Rx invalid nwid:2088  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

I'll appreciate if things known be broken are not enabled by default,
let alone unconditionally.

--=20
Regards,
Pavel Roskin

-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wireless-dev.git breaks wireless extensions
  2007-02-16 23:54 wireless-dev.git breaks wireless extensions Pavel Roskin
@ 2007-02-17  0:09 ` Johannes Berg
  2007-02-17  0:50   ` Pavel Roskin
  2007-02-17  1:03 ` [PATCH] fix wext_ioctl() exit path Johannes Berg
  1 sibling, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2007-02-17  0:09 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

On Fri, 2007-02-16 at 18:54 -0500, Pavel Roskin wrote:
> Hello!
> 
> Today's wireless-dev.git breaks wireless extensions.  It forces
> CONFIG_CFG80211 to be enabled.
                        ^^^^^^^ ??????

>   I reported that it breaks legacy drivers
> back in December 2006.  It's still broken.  That's what I get for
> MadWifi:
> 
> ath0      4¿3Àؽ¿  ESSID:"" [51]  Nickname:""
>           Channel:-0  Access Point: 9F:DD:13:94:33:C0   Bit Rate=-576733 kb/s   
>           Tx-Power=off   Sensitivity=-576733388 dBm  
>           Retry:off   RTS thr:off   Fragment thr:off
>           Power Management:off
>           Link Quality=0/94  Signal level=-96 dBm  Noise level=-96 dBm
>           Rx invalid nwid:2088  Rx invalid crypt:0  Rx invalid frag:0
>           Tx excessive retries:0  Invalid misc:0   Missed beacon:0
> 
> I'll appreciate if things known be broken are not enabled by default,
> let alone unconditionally.
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wireless-dev.git breaks wireless extensions
  2007-02-17  0:09 ` Johannes Berg
@ 2007-02-17  0:50   ` Pavel Roskin
  2007-02-17  1:02     ` John W. Linville
  0 siblings, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2007-02-17  0:50 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Sat, 2007-02-17 at 01:09 +0100, Johannes Berg wrote:
> On Fri, 2007-02-16 at 18:54 -0500, Pavel Roskin wrote:
> > Hello!
> > 
> > Today's wireless-dev.git breaks wireless extensions.  It forces
> > CONFIG_CFG80211 to be enabled.
>                         ^^^^^^^ ??????

>From net/d80211/Kconfig:

config D80211
        tristate "Generic IEEE 802.11 Networking Stack (dscape)"
        select CRYPTO
        select CRYPTO_ECB
        select CRYPTO_ARC4
        select CRYPTO_AES
        select CRC32
        select WIRELESS_EXT
        select CFG80211

It means if I want D80211, CFG80211 will be selected for me.  Last time
I pulled the sources (a few days ago) I was able to disable CFG80211.

Even if I compile D80211 and CFG80211 as modules and load MadWifi, lsmod
shows that cfg80211 is not loaded, but the iwconfig output is still
wrong.  Some part of cfg80211 must be compiled into the kernel.

-- 
Regards,
Pavel Roskin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wireless-dev.git breaks wireless extensions
  2007-02-17  0:50   ` Pavel Roskin
@ 2007-02-17  1:02     ` John W. Linville
  2007-02-17  1:45       ` Pavel Roskin
  0 siblings, 1 reply; 7+ messages in thread
From: John W. Linville @ 2007-02-17  1:02 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Johannes Berg, linux-wireless

On Fri, Feb 16, 2007 at 07:50:14PM -0500, Pavel Roskin wrote:

> Even if I compile D80211 and CFG80211 as modules and load MadWifi, lsmod
> shows that cfg80211 is not loaded, but the iwconfig output is still
> wrong.  Some part of cfg80211 must be compiled into the kernel.

Sounds like the new version of cfg80211's wext compatibility hook
is broken...?

-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] fix wext_ioctl() exit path
  2007-02-16 23:54 wireless-dev.git breaks wireless extensions Pavel Roskin
  2007-02-17  0:09 ` Johannes Berg
@ 2007-02-17  1:03 ` Johannes Berg
  1 sibling, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2007-02-17  1:03 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-wireless

This fixes the wext_ioctl() exit path, it was copying things from "&ifr"
instead of "ifr", caused by now using a pointer to ifr in that new
function.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

---
This should fix it. Looks like I had it right for the cfg80211 exit path
but not the old one...

--- wireless-dev.orig/net/wireless/wext-common.c	2007-02-17 01:46:03.204695664 +0100
+++ wireless-dev/net/wireless/wext-common.c	2007-02-17 01:59:18.075094300 +0100
@@ -640,26 +640,24 @@ int wext_ioctl(unsigned int cmd, struct 
 
 	rtnl_unlock();
 
-	if (IW_IS_GET(cmd) && copy_to_user(arg, &ifr, sizeof(struct ifreq)))
-		ret = -EFAULT;
-
 	/* haha, I cheat here by allowing a driver or stack to have both WE and
 	 * CFG80211-WE for a little while during conversion... wext returns
 	 * -EOPNOTSUPP if a handler is not assigned, so we can in that case try
 	 * calling cfg80211's compat code instead.
 	 */
 	if (ret != -EOPNOTSUPP)
-		return ret;
+		goto out;
 #endif
 
 #ifdef CONFIG_CFG80211_WEXT_COMPAT
 	/* no need to hold rtnl lock here for the new stuff,
 	 * we properly use dev_get_by_name() and dev_put() */
 	ret = call_cfg80211_wext_ioctl(ifr, cmd);
+#endif
 
+ out:
 	if (IW_IS_GET(cmd) && copy_to_user(arg, ifr, sizeof(struct ifreq)))
 		ret = -EFAULT;
-#endif
 
 	return ret;
 }



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wireless-dev.git breaks wireless extensions
  2007-02-17  1:02     ` John W. Linville
@ 2007-02-17  1:45       ` Pavel Roskin
  2007-02-17 14:14         ` John W. Linville
  0 siblings, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2007-02-17  1:45 UTC (permalink / raw)
  To: John W. Linville; +Cc: Johannes Berg, linux-wireless

On Fri, 2007-02-16 at 20:02 -0500, John W. Linville wrote:
> On Fri, Feb 16, 2007 at 07:50:14PM -0500, Pavel Roskin wrote:
> 
> > Even if I compile D80211 and CFG80211 as modules and load MadWifi, lsmod
> > shows that cfg80211 is not loaded, but the iwconfig output is still
> > wrong.  Some part of cfg80211 must be compiled into the kernel.
> 
> Sounds like the new version of cfg80211's wext compatibility hook
> is broken...?

I've applied two patches by Johannes "fix wext_ioctl() exit path" and
"fix cfg80211 modular compile w/o wext-compat", and MadWifi is working
fine now.

On the other hand, DadWifi won't compile:

/home/proski/src/dadwifi/ath/if_ath_d80211.c: In function
'ath_d80211_calc_bssid_mask':
/home/proski/src/dadwifi/ath/if_ath_d80211.c:305: error: 'struct
ieee80211_hw' has no member named 'perm_addr'

The same problem exists with iwlwifi.  I'm away from my bcm43xx card at
the moment.

I'll post more if I find any problems with either upgrading the driver
or wireless extensions for d80211 enabled drivers.

-- 
Regards,
Pavel Roskin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wireless-dev.git breaks wireless extensions
  2007-02-17  1:45       ` Pavel Roskin
@ 2007-02-17 14:14         ` John W. Linville
  0 siblings, 0 replies; 7+ messages in thread
From: John W. Linville @ 2007-02-17 14:14 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Johannes Berg, linux-wireless

On Fri, Feb 16, 2007 at 08:45:40PM -0500, Pavel Roskin wrote:
> On Fri, 2007-02-16 at 20:02 -0500, John W. Linville wrote:

> > Sounds like the new version of cfg80211's wext compatibility hook
> > is broken...?
> 
> I've applied two patches by Johannes "fix wext_ioctl() exit path" and
> "fix cfg80211 modular compile w/o wext-compat", and MadWifi is working
> fine now.
 
Soungs good...thanks for the report!

> On the other hand, DadWifi won't compile:
> 
> /home/proski/src/dadwifi/ath/if_ath_d80211.c: In function
> 'ath_d80211_calc_bssid_mask':
> /home/proski/src/dadwifi/ath/if_ath_d80211.c:305: error: 'struct
> ieee80211_hw' has no member named 'perm_addr'
> 
> The same problem exists with iwlwifi.  I'm away from my bcm43xx card at
> the moment.

Yep...this goes with the territory for out-of-kernel drivers.

FWIW, the changes are straight-forward.  See the commits near the
top of the tree for examples.

> I'll post more if I find any problems with either upgrading the driver
> or wireless extensions for d80211 enabled drivers.

Thanks,

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-17 14:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16 23:54 wireless-dev.git breaks wireless extensions Pavel Roskin
2007-02-17  0:09 ` Johannes Berg
2007-02-17  0:50   ` Pavel Roskin
2007-02-17  1:02     ` John W. Linville
2007-02-17  1:45       ` Pavel Roskin
2007-02-17 14:14         ` John W. Linville
2007-02-17  1:03 ` [PATCH] fix wext_ioctl() exit path Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.