Re: [RFC/PATCH 3/13] d80211: non-shared interface types
On Mon, Mar 06, 2006 at 04:44:23PM +0100, Jiri Benc wrote: This patch removes iwmode variable (local-conf.mode) shared by all interfaces. Instead, every interface has its own type (STA/IBSS/AP/WDS). Index: dscape/include/net/d80211.h === --- dscape.orig/include/net/d80211.h 2006-03-06 13:33:02.0 +0100 +++ dscape/include/net/d80211.h 2006-03-06 14:10:07.0 +0100 @@ -242,8 +242,6 @@ struct ieee80211_conf { int freq; /* MHz */ int channel_val;/* hw specific value for the channel */ - int mode; /* IW_MODE_ */ - This breaks bcm43xx-d80211 build. Do you happen to have a patch to fix it? At least the experimental branch of your dscape.git seemed to show the same issue: CC [M] drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.o drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c: In function ‘bcm43xx_net_config’: drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c:4412: error: ‘struct ieee80211_conf’ has no member named ‘mode’ drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c:4413: error: ‘struct ieee80211_conf’ has no member named ‘mode’ The same issue showed up with our low-level driver. How was the low-level driver supposed to get this information with this change? d80211 part is likely fine, since it has the interface type available like you mentioned, but I don't think that this is available to low-level drivers(?). In other words, keeping this int mode in struct ieee80211_conf may be useful even if we change d80211 to do something else internally. Which driver did you use to test these changes? I have now successfully tested both client and AP modes with bcm43xx_d80211 and Devicescape driver for Atheros cards prior to applying these 13 changes. I would like to verify that the new changes work properly before they are applied into the wireless-2.6 tree. I can change our code easily, but I would rather not touch bcm43xx_d80211 code to avoid any problems in keeping the reverse engineered implementation clean as far as use of proprietary information is concerned. -- Jouni MalinenPGP id EFC895FA - 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: [RFC/PATCH 3/13] d80211: non-shared interface types
On Wed, 15 Mar 2006 09:40:52 -0800, Jouni Malinen wrote: This breaks bcm43xx-d80211 build. Do you happen to have a patch to fix it? Yes, I do. Sorry for not posting it. This is a first part; it's just ugly and quick (but working) fix. Index: dscape/drivers/net/wireless/bcm43xx-d80211/bcm43xx.h === --- dscape.orig/drivers/net/wireless/bcm43xx-d80211/bcm43xx.h 2006-03-06 15:37:20.0 +0100 +++ dscape/drivers/net/wireless/bcm43xx-d80211/bcm43xx.h2006-03-15 17:29:08.0 +0100 @@ -720,6 +720,7 @@ struct bcm43xx_private { /* Informational stuff. */ char nick[IW_ESSID_MAX_SIZE + 1]; u8 bssid[ETH_ALEN]; + int interfaces; /* encryption/decryption */ u16 security_offset; Index: dscape/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c === --- dscape.orig/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c 2006-03-06 15:37:20.0 +0100 +++ dscape/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c 2006-03-15 17:29:08.0 +0100 @@ -4409,9 +4409,6 @@ static int bcm43xx_net_config(struct net if (conf-channel != radio-channel) bcm43xx_radio_selectchannel(bcm, conf-channel, 0); - if (conf-mode != bcm-iw_mode) - bcm43xx_set_iwmode(bcm, conf-mode); - if (conf-short_slot_time != bcm-short_slot) { assert(phy-type == BCM43xx_PHYTYPE_G); if (conf-short_slot_time) @@ -4578,6 +4575,33 @@ static int bcm43xx_net_stop(struct net_d return 0; } +static int bcm43xx_add_interface(struct net_device *net_dev, +struct ieee80211_if_conf *conf) +{ + struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + + if (bcm-interfaces 0) + return -ENOBUFS; + if (memcmp(bcm-net_dev-dev_addr, conf-mac_addr, ETH_ALEN) != 0) + return -EADDRNOTAVAIL; + if (conf-type == IEEE80211_SUB_IF_TYPE_STA) + bcm-iw_mode = IW_MODE_INFRA; + else if (conf-type == IEEE80211_SUB_IF_TYPE_IBSS) + bcm-iw_mode = IW_MODE_ADHOC; + else + return -EOPNOTSUPP; + bcm-interfaces++; + return 0; +} + +static void bcm43xx_remove_interface(struct net_device *net_dev, +struct ieee80211_if_conf *conf) +{ + struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + + bcm-interfaces--; +} + /* Initialization of struct net_device, just after allocation. */ static void bcm43xx_netdev_setup(struct net_device *net_dev) { @@ -4659,6 +4683,8 @@ static int __devinit bcm43xx_init_one(st ieee-tx = bcm43xx_net_hard_start_xmit; ieee-open = bcm43xx_net_open; ieee-stop = bcm43xx_net_stop; + ieee-add_interface = bcm43xx_add_interface; + ieee-remove_interface = bcm43xx_remove_interface; ieee-reset = bcm43xx_net_reset; ieee-config = bcm43xx_net_config; //TODO ieee-set_key = bcm43xx_net_set_key; -- 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: [RFC/PATCH 3/13] d80211: non-shared interface types
On Wed, 15 Mar 2006 09:40:52 -0800, Jouni Malinen wrote: The same issue showed up with our low-level driver. How was the low-level driver supposed to get this information with this change? From struct ieee80211_if_conf in add_interface callback. d80211 part is likely fine, since it has the interface type available like you mentioned, but I don't think that this is available to low-level drivers(?). In other words, keeping this int mode in struct ieee80211_conf may be useful even if we change d80211 to do something else internally. If you have two interfaces running, one of STA type and of AP type, what should be the value of such global mode variable? It makes more sense to have per-interface mode and let driver decide what should be the mode it tells to the hardware. Which driver did you use to test these changes? I have now successfully tested both client and AP modes with bcm43xx_d80211 and Devicescape driver for Atheros cards prior to applying these 13 changes. I would like to verify that the new changes work properly before they are applied into the wireless-2.6 tree. I can change our code easily, but I would rather not touch bcm43xx_d80211 code to avoid any problems in keeping the reverse engineered implementation clean as far as use of proprietary information is concerned. Unfortunately, I'm not able to test AP mode as it's not supported by any available driver yet. For STA mode I use bcm43xx drivers. Thanks, -- 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: [RFC/PATCH 3/13] d80211: non-shared interface types
On Wed, Mar 15, 2006 at 06:47:40PM +0100, Jiri Benc wrote: On Wed, 15 Mar 2006 09:40:52 -0800, Jouni Malinen wrote: This breaks bcm43xx-d80211 build. Do you happen to have a patch to fix it? Yes, I do. Sorry for not posting it. This is a first part; it's just ugly and quick (but working) fix. Thanks! I'll try with this. In addition to fixing bcm43xx build, this was enough to remind me how the mode parameter is now available to low-level driver, so I'll test a similar change with our Atheros driver. One more driver is failing, though: drivers/net/wireless/rt2x00/rt2400pci.c: In function ‘rt2400pci_rxdone’: drivers/net/wireless/rt2x00/rt2400pci.c:756: warning: implicit declaration of function ‘ieee80211_rx’ drivers/net/wireless/rt2x00/rt2400pci.c: In function ‘rt2400pci_config_update’: drivers/net/wireless/rt2x00/rt2400pci.c:1468: error: ‘struct ieee80211_conf’ has no member named ‘mode’ drivers/net/wireless/rt2x00/rt2400pci.c: In function ‘rt2400pci_reset_tsf’: drivers/net/wireless/rt2x00/rt2400pci.c:1724: error: ‘struct ieee80211_conf’ has no member named ‘mode’ drivers/net/wireless/rt2x00/rt2400pci.c:1726: error: ‘struct ieee80211_conf’ has no member named ‘mode’ drivers/net/wireless/rt2x00/rt2400pci.c: In function ‘rt2400pci_init_hw’: drivers/net/wireless/rt2x00/rt2400pci.c:1972: error: ‘struct ieee80211_hw’ has no member named ‘set_mac_address’ I don't have rt2400 card in my current testbed (but should probably add one; I'm pretty sure I have such a card somewhere), so this is not critical for my current tests. Anyway, this will also need to be fixed before the d80211 changes can be merged into wireless-2.6. -- Jouni MalinenPGP id EFC895FA - 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: [RFC/PATCH 3/13] d80211: non-shared interface types
On Wed, Mar 15, 2006 at 06:59:53PM +0100, Jiri Benc wrote: On Wed, 15 Mar 2006 09:40:52 -0800, Jouni Malinen wrote: The same issue showed up with our low-level driver. How was the low-level driver supposed to get this information with this change? From struct ieee80211_if_conf in add_interface callback. This was the part I had already forgetten about.. If you have two interfaces running, one of STA type and of AP type, what should be the value of such global mode variable? It makes more sense to have per-interface mode and let driver decide what should be the mode it tells to the hardware. Agreed. The proposed change is much better way of doing this. Unfortunately, I'm not able to test AP mode as it's not supported by any available driver yet. For STA mode I use bcm43xx drivers. OK. I tested bcm43xx_dscape in AP mode yesterday and, to my surprise, it was actually almost working. It was not sending beacon frames, but once I convinced my client to not care about this, I was able to successfully associate in WPA-PSK/TKIP mode. Anyway, since I haven't yet got to the point of merging in needed changes for hostapd, that would be the next showstopper in allowing you to test this easily.. In other words, until I get that done, I better be prepared to use time on testing all the AP mode cases myself ;-). -- Jouni MalinenPGP id EFC895FA - 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: [RFC/PATCH 3/13] d80211: non-shared interface types
On Wednesday 15 March 2006 19:02, Jouni Malinen wrote: On Wed, Mar 15, 2006 at 06:47:40PM +0100, Jiri Benc wrote: On Wed, 15 Mar 2006 09:40:52 -0800, Jouni Malinen wrote: This breaks bcm43xx-d80211 build. Do you happen to have a patch to fix it? Yes, I do. Sorry for not posting it. This is a first part; it's just ugly and quick (but working) fix. Thanks! I'll try with this. In addition to fixing bcm43xx build, this was enough to remind me how the mode parameter is now available to low-level driver, so I'll test a similar change with our Atheros driver. One more driver is failing, though: drivers/net/wireless/rt2x00/rt2400pci.c: In function ‘rt2400pci_rxdone’: drivers/net/wireless/rt2x00/rt2400pci.c:756: warning: implicit declaration of function ‘ieee80211_rx’ drivers/net/wireless/rt2x00/rt2400pci.c: In function ‘rt2400pci_config_update’: drivers/net/wireless/rt2x00/rt2400pci.c:1468: error: ‘struct ieee80211_conf’ has no member named ‘mode’ drivers/net/wireless/rt2x00/rt2400pci.c: In function ‘rt2400pci_reset_tsf’: drivers/net/wireless/rt2x00/rt2400pci.c:1724: error: ‘struct ieee80211_conf’ has no member named ‘mode’ drivers/net/wireless/rt2x00/rt2400pci.c:1726: error: ‘struct ieee80211_conf’ has no member named ‘mode’ drivers/net/wireless/rt2x00/rt2400pci.c: In function ‘rt2400pci_init_hw’: drivers/net/wireless/rt2x00/rt2400pci.c:1972: error: ‘struct ieee80211_hw’ has no member named ‘set_mac_address’ I don't have rt2400 card in my current testbed (but should probably add one; I'm pretty sure I have such a card somewhere), so this is not critical for my current tests. Anyway, this will also need to be fixed before the d80211 changes can be merged into wireless-2.6. For the ieee80211_rx error a patch was already send to the list, but there were some problems with the patch so it was resend a couple of weeks later, but has not yet been comitted to git yet. I can make a patch for the mode and set_mac_address changes this weekend, and either send it seperately, or make it part of the (already quite large) patch series that would update the in-kernel rt2x00 to our latest CVS version. IvD pgpVsOo1TFbgf.pgp Description: PGP signature