Re: [PATCH] drivers/net/wireless/d80211: Check configuration type in hw-config_interface.
On Wed, 19 Jul 2006 22:26:52 +0200, Jean-Mickael Guerin wrote: This patch prevents a NULL pointer dereferencing in AP mode: ieee80211_if_config will set conf-bssid only if device is of type STA or IBSS. I see it using following commands right after module loading (with rt61) # iwconfig wlan0 mode Master # ifconfig wlan0 up The patch seems to fix the problem at a wrong place. rt2x00 has broken add_interface handler - it allows adding of AP interface even though the driver doesn't support AP mode. It is add_interface callback that should be fixed in rt2x00. The check in the patch most likely won't be needed even after AP mode support is added to rt2x00 - the driver needs to handle AP mode differently so config_interface callback will be rewritten anyway. adm8211 driver doesn't have this problem and doesn't need to be modified. Thanks, Jiri -- Jiri Benc SUSE Labs - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drivers/net/wireless/d80211: Check configuration type in hw-config_interface.
On Wed, 19 Jul 2006 18:07:05 -0700, Michael Wu wrote: Why is that? Isn't there a BSSID in AP mode too? Perhaps it is calling config_interface before setting the BSSID? The bssid field in ieee80211_if_conf structure is not set in AP mode. There is no need for that - you already have a MAC address of the AP interface (from add_interface callback). That's your BSSID. adm8211 doesn't support AP mode yet, but it's good to know this crash won't occur when it does. :) The crash won't occur even without the patch - you will need to do completely different things in adm8211_config_interface for AP mode than for STA or IBSS mode and you will put some switch there anyway. No reason for doing it now and bloating the code with a check for condition that cannot happen. Thanks, Jiri -- Jiri Benc SUSE Labs - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drivers/net/wireless/d80211: Check configuration type in hw-config_interface.
Hi, This patch prevents a NULL pointer dereferencing in AP mode: ieee80211_if_config will set conf-bssid only if device is of type STA or IBSS. I see it using following commands right after module loading (with rt61) # iwconfig wlan0 mode Master # ifconfig wlan0 up The patch seems to fix the problem at a wrong place. rt2x00 has broken add_interface handler - it allows adding of AP interface even though the driver doesn't support AP mode. It is add_interface callback that should be fixed in rt2x00. Well rt2x00 does support AP mode, our latest CVS tree (patches for wireless-dev are in progress) has even shown a working configuration for some users. So add_interface is correct at allowing the AP interface, perhaps some more steps are required to make it completely work, but it is work in progress. The check in the patch most likely won't be needed even after AP mode support is added to rt2x00 - the driver needs to handle AP mode differently so config_interface callback will be rewritten anyway. I'll make a check to see if the bssid is NULL or invalid in the config_bssid() function, and make sure that in AP mode the MAC is written as BSSID. Ivo - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drivers/net/wireless/d80211: Check configuration type in hw-config_interface.
Hi, This patch prevents a NULL pointer dereferencing in AP mode: ieee80211_if_config will set conf-bssid only if device is of type STA or IBSS. I see it using following commands right after module loading (with rt61) # iwconfig wlan0 mode Master # ifconfig wlan0 up The patch seems to fix the problem at a wrong place. rt2x00 has broken add_interface handler - it allows adding of AP interface even though the driver doesn't support AP mode. It is add_interface callback that should be fixed in rt2x00. Well rt2x00 does support AP mode, our latest CVS tree (patches for wireless-dev are in progress) has even shown a working configuration for some users. So add_interface is correct at allowing the AP interface, perhaps some more steps are required to make it completely work, but it is work in progress. The check in the patch most likely won't be needed even after AP mode support is added to rt2x00 - the driver needs to handle AP mode differently so config_interface callback will be rewritten anyway. I'll make a check to see if the bssid is NULL or invalid in the config_bssid() function, and make sure that in AP mode the MAC is written as BSSID. I won't be able to send this patch seperately, so it will become part of the larger series that I am currently working on, that patch series throws a lot of code around and has some major changes to the rt2x00 code so expect very large patches. The bssid is NULL fix was already in my cvs tree, so only the update to use the MAC as BSSID in master mode has been added. Ivo - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drivers/net/wireless/d80211: Check configuration type in hw-config_interface.
On Wednesday 19 July 2006 13:26, Jean-Mickael Guerin wrote: This patch prevents a NULL pointer dereferencing in AP mode: ieee80211_if_config will set conf-bssid only if device is of type STA or IBSS. Why is that? Isn't there a BSSID in AP mode too? Perhaps it is calling config_interface before setting the BSSID? adm8211 doesn't support AP mode yet, but it's good to know this crash won't occur when it does. :) -Michael Wu pgpWQw1uVOGGK.pgp Description: PGP signature