You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(46) |
Sep
(117) |
Oct
(24) |
Nov
(10) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(11) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
(5) |
Jul
(7) |
Aug
(1) |
Sep
(8) |
Oct
(2) |
Nov
(27) |
Dec
(33) |
2009 |
Jan
(11) |
Feb
(10) |
Mar
(10) |
Apr
(16) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Pedro R. <ram...@se...> - 2005-09-01 10:09:22
|
Jiri Benc wrote: > On Sat, 27 Aug 2005 11:21:37 -0500, James Ketrenos wrote: > >>The order required of user space is: >> >> kernel hotplug hotplug script >> ----------------------- -------------- ----------- >>1. module load >>2. netdev device registered >>3. new device >>4. ifconfig up >>5. open: load firmware, >>6. init device, etc. >>7. configure wireless >>8. scan >>9. associate >>A. >>link >> >>B. carrier detected >>C. configure link >>(dhcp) > > > I don't agree with this scheme. Association should be started on > explicit userspace request (*). As we definitely don't want to add a new > WE (or some other) call to perform this, the only call we can use for > telling the driver "ok, now it's the time to associate" is ifconfig up. > So opening the card should follow its configuration. > The scheme looks good to me. Wireless cards mostly map to a regular network card. Only difference is that you need to do something to configure the link to have "carrier detected" and DHCP should only be started after "carrier detected" (IFF_RUNNING IIRC). Regarding association only on explicit userspace request, that's fixable in the drivers (some drivers automatically associate once they're ifconfig'ed up, the ipw2x00 drivers have a module parameter to change this behaviour). > And yes, this brings up the problem with firmware loading. It should > really be solved, but trying to solve it by requiring to bring the card > up before it is configured is the bad way. Why is it the "wrong way"? I don't see a big problem with this, the card is only going to be used after it's UP. The only problem i see is that it doesn't behave exactly like most network drivers, where they are able to detect a link even when they're DOWN. Is there a good reason for a card to do anything even when it's DOWN? > > Today, some cards require to be brought up before they are configured > and some require it in the other order. Distributions have to deal with > it if they want to support different devices. It definitely needs to be > unified. And when the unification is performed, why not do this the > right way? > Agreed, there should be a guideline for the setup behaviour. > (*) Because it's not good idea to start association before wireless is > fully configured. Trying to associate to some random AP because > semi-entered configuration matches the AP settings is very unexpected > behaviour. And there might arise some problems with allowed/forbidden > channels as well. > Right, that would need a new interface where all parameters are passed at once, or keep the existing interface and add another just to explicitly associate. Besides that, there should also be a way to configure if you want to auto-associate to new access points if the old access point becomes unavailable or with a weaker signal than the new one, or if you want to manually associate, ex: association is done once and never tried again until you tell it to do so. The manual association would be a good thing for a wireless managed, where it would have the work of handling new networks, APs becoming unavailable and available again, etc. -- Pedro Ramalhais |
From: Peter J. <pj...@re...> - 2005-08-31 21:06:38
|
On Wed, 2005-08-31 at 19:08 +0200, Jiri Benc wrote: > But is it really needed? Imagine the situation when computer is started > with unplugged ethernet cable which is plugged in later. I know, this is > rare, but - shouldn't be the right approach that DHCP is started by > hotplug when the carrier is detected? Not necessarily started "by hotplug", but started by something like ifplugd or NetworkManager. And that class of programs is already responsible for things like choosing what AP to associate, so it's an extra degree of control for them, but not really a hastle for end users, who shouldn't have to run "ifconfig up" or anything else 99% of the time. You also don't want to "ifconfig down" when you're hopping from AP to AP with the same ESSID -- you generally want to tell it to reassociate with the other AP, but leave the connection up the entire time. -- Peter |
From: Christoph H. <hc...@in...> - 2005-08-31 17:58:02
|
On Wed, Aug 31, 2005 at 07:08:02PM +0200, Jiri Benc wrote: > But is it really needed? Imagine the situation when computer is started > with unplugged ethernet cable which is plugged in later. I know, this is > rare, but - shouldn't be the right approach that DHCP is started by > hotplug when the carrier is detected? Yes. It's what happens on any sanely setup linux system (using ifplugd or something similar). |
From: Jiri B. <jb...@su...> - 2005-08-31 17:08:14
|
On Wed, 31 Aug 2005 11:57:15 -0400, Peter Jones wrote: > I don't think that's really right either. For one thing, things like > DHCP's timeout start counting at about the same time as "ifconfig up", > and association can take some time. You're right, thanks for pointing this out. > But why don't we want to add a call to do this? I'd agree that it > shouldn't be a WE call. There seemed to be general agreement at OLS > last month that we should really be using netlink for this stuff anyway, > and it doesn't seem like adding a netlink call is all that painful. This means that wireless link couldn't be established without previous call to "some-iwconfig-replacement wlan0 up". Seems to be a bit confusing to users - I guess it won't be rare that users will forget this step. Maybe it can be eliminated by big fat warning in the some-iwconfig-replacement tool when setting things like mode or SSID. But is it really needed? Imagine the situation when computer is started with unplugged ethernet cable which is plugged in later. I know, this is rare, but - shouldn't be the right approach that DHCP is started by hotplug when the carrier is detected? Of course, startup script probably needs to wait for DHCP on some interface (marked as "main" or something) to properly set hostname before booting can continue. With a call to start association, startup script have to perform that call, wait for association (probably netlink event) and then start DHCP. Without that call, startup script will bring interface up, wait for carrier (netlink event) and then start DHCP. Seems to be the same. Or am I missing something? -- Jiri Benc SUSE Labs |
From: Peter J. <pj...@re...> - 2005-08-31 15:57:27
|
On Wed, 2005-08-31 at 14:39 +0200, Jiri Benc wrote: > I don't agree with this scheme. Association should be started on > explicit userspace request (*). As we definitely don't want to add a new > WE (or some other) call to perform this, the only call we can use for > telling the driver "ok, now it's the time to associate" is ifconfig up. > So opening the card should follow its configuration. I don't think that's really right either. For one thing, things like DHCP's timeout start counting at about the same time as "ifconfig up", and association can take some time. But why don't we want to add a call to do this? I'd agree that it shouldn't be a WE call. There seemed to be general agreement at OLS last month that we should really be using netlink for this stuff anyway, and it doesn't seem like adding a netlink call is all that painful. -- Peter |
From: Jiri B. <jb...@su...> - 2005-08-31 12:39:09
|
On Sat, 27 Aug 2005 11:21:37 -0500, James Ketrenos wrote: > The order required of user space is: > > kernel hotplug hotplug script > ----------------------- -------------- ----------- > 1. module load > 2. netdev device registered > 3. new device > 4. ifconfig up > 5. open: load firmware, > 6. init device, etc. > 7. configure wireless > 8. scan > 9. associate > A. > link > > B. carrier detected > C. configure link > (dhcp) I don't agree with this scheme. Association should be started on explicit userspace request (*). As we definitely don't want to add a new WE (or some other) call to perform this, the only call we can use for telling the driver "ok, now it's the time to associate" is ifconfig up. So opening the card should follow its configuration. And yes, this brings up the problem with firmware loading. It should really be solved, but trying to solve it by requiring to bring the card up before it is configured is the bad way. Today, some cards require to be brought up before they are configured and some require it in the other order. Distributions have to deal with it if they want to support different devices. It definitely needs to be unified. And when the unification is performed, why not do this the right way? (*) Because it's not good idea to start association before wireless is fully configured. Trying to associate to some random AP because semi-entered configuration matches the AP settings is very unexpected behaviour. And there might arise some problems with allowed/forbidden channels as well. -- Jiri Benc SUSE Labs |
From: Stephen H. <she...@os...> - 2005-08-29 20:02:35
|
On Sun, 28 Aug 2005 10:51:34 -0700 Jouni Malinen <jkm...@cc...> wrote: > Debug variables and procfs dir should be "ieee80211", not "ipw". > > Signed-off-by: Jouni Malinen <jkm...@cc...> > Or better yet use module_param and sysfs to access and not /proc. |
From: Jeff G. <jg...@po...> - 2005-08-28 23:26:06
|
applied patches 1-5 |
From: Jouni M. <jkm...@cc...> - 2005-08-28 17:57:50
|
IEEE 802.11 code has no business touching payloads of EAPOL frames. There are some EAPOL structures defined for debugging and these were confusingly called EAP types which they are not. Let's just remove these before someone else starts using them in the kernel. Signed-off-by: Jouni Malinen <jkm...@cc...> Index: netdev-2.6/include/net/ieee80211.h =================================================================== --- netdev-2.6.orig/include/net/ieee80211.h +++ netdev-2.6/include/net/ieee80211.h @@ -56,35 +56,6 @@ struct ieee80211_hdr_3addr { __le16 seq_ctl; } __attribute__ ((packed)); -enum eap_type { - EAP_PACKET = 0, - EAPOL_START, - EAPOL_LOGOFF, - EAPOL_KEY, - EAPOL_ENCAP_ASF_ALERT -}; - -static const char *eap_types[] = { - [EAP_PACKET] = "EAP-Packet", - [EAPOL_START] = "EAPOL-Start", - [EAPOL_LOGOFF] = "EAPOL-Logoff", - [EAPOL_KEY] = "EAPOL-Key", - [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert" -}; - -static inline const char *eap_get_type(int type) -{ - return (type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type]; -} - -struct eapol { - u8 snap[6]; - __be16 ethertype; - u8 version; - u8 type; - __be16 length; -} __attribute__ ((packed)); - #define IEEE80211_1ADDR_LEN 10 #define IEEE80211_2ADDR_LEN 16 #define IEEE80211_3ADDR_LEN 24 @@ -202,7 +173,6 @@ const char *escape_essid(const char *ess #define IEEE80211_DL_STATE (1<<3) #define IEEE80211_DL_MGMT (1<<4) #define IEEE80211_DL_FRAG (1<<5) -#define IEEE80211_DL_EAP (1<<6) #define IEEE80211_DL_DROP (1<<7) #define IEEE80211_DL_TX (1<<8) @@ -217,7 +187,6 @@ const char *escape_essid(const char *ess #define IEEE80211_DEBUG_STATE(f, a...) IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a) #define IEEE80211_DEBUG_MGMT(f, a...) IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a) #define IEEE80211_DEBUG_FRAG(f, a...) IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a) -#define IEEE80211_DEBUG_EAP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_EAP, f, ## a) #define IEEE80211_DEBUG_DROP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a) #define IEEE80211_DEBUG_TX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a) #define IEEE80211_DEBUG_RX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a) Index: netdev-2.6/net/ieee80211/ieee80211_rx.c =================================================================== --- netdev-2.6.orig/net/ieee80211/ieee80211_rx.c +++ netdev-2.6/net/ieee80211/ieee80211_rx.c @@ -628,14 +628,8 @@ int ieee80211_rx(struct ieee80211_device if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep) { if (/*ieee->ieee802_1x &&*/ ieee80211_is_eapol_frame(ieee, skb)) { -#ifdef CONFIG_IEEE80211_DEBUG /* pass unencrypted EAPOL frames even if encryption is * configured */ - struct eapol *eap = (struct eapol *)(skb->data + - 24); - IEEE80211_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n", - eap_get_type(eap->type)); -#endif } else { IEEE80211_DEBUG_DROP( "encryption configured, but RX " @@ -645,16 +639,6 @@ int ieee80211_rx(struct ieee80211_device } } -#ifdef CONFIG_IEEE80211_DEBUG - if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && - ieee80211_is_eapol_frame(ieee, skb)) { - struct eapol *eap = (struct eapol *)(skb->data + - 24); - IEEE80211_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n", - eap_get_type(eap->type)); - } -#endif - if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep && !ieee80211_is_eapol_frame(ieee, skb)) { IEEE80211_DEBUG_DROP( Index: netdev-2.6/net/ieee80211/ieee80211_tx.c =================================================================== --- netdev-2.6.orig/net/ieee80211/ieee80211_tx.c +++ netdev-2.6/net/ieee80211/ieee80211_tx.c @@ -292,15 +292,6 @@ int ieee80211_xmit(struct sk_buff *skb, goto success; } -#ifdef CONFIG_IEEE80211_DEBUG - if (crypt && !encrypt && ether_type == ETH_P_PAE) { - struct eapol *eap = (struct eapol *)(skb->data + - sizeof(struct ethhdr) - SNAP_SIZE - sizeof(u16)); - IEEE80211_DEBUG_EAP("TX: IEEE 802.11 EAPOL frame: %s\n", - eap_get_type(eap->type)); - } -#endif - /* Save source and destination addresses */ memcpy(&dest, skb->data, ETH_ALEN); memcpy(&src, skb->data+ETH_ALEN, ETH_ALEN); -- -- Jouni Malinen PGP id EFC895FA |
From: Jouni M. <jkm...@cc...> - 2005-08-28 17:57:49
|
Debug variables and procfs dir should be "ieee80211", not "ipw". Signed-off-by: Jouni Malinen <jkm...@cc...> Index: netdev-2.6/include/net/ieee80211.h =================================================================== --- netdev-2.6.orig/include/net/ieee80211.h +++ netdev-2.6/include/net/ieee80211.h @@ -158,11 +158,11 @@ const char *escape_essid(const char *ess * * To add your debug level to the list of levels seen when you perform * - * % cat /proc/net/ipw/debug_level + * % cat /proc/net/ieee80211/debug_level * - * you simply need to add your entry to the ipw_debug_levels array. + * you simply need to add your entry to the ieee80211_debug_level array. * - * If you do not see debug_level in /proc/net/ipw then you do not have + * If you do not see debug_level in /proc/net/ieee80211 then you do not have * CONFIG_IEEE80211_DEBUG defined in your kernel configuration * */ -- -- Jouni Malinen PGP id EFC895FA |
From: Jouni M. <jkm...@cc...> - 2005-08-28 17:57:49
|
The first three patches are cleanup for ieee80211 (netdev-2.6, ieee80211 branch) and the last two are for hostap (netdev-2.6, ieee80211-wifi branch). Please apply to these branches. -- Jouni Malinen PGP id EFC895FA |
From: Jouni M. <jkm...@cc...> - 2005-08-28 17:57:49
|
No need to maintain support for WIRELESS_EXT < 17 since this kernel tree is already using WIRELESS_EXT 18. Signed-off-by: Jouni Malinen <jkm...@cc...> Index: netdev-2.6/include/net/ieee80211.h =================================================================== --- netdev-2.6.orig/include/net/ieee80211.h +++ netdev-2.6/include/net/ieee80211.h @@ -24,15 +24,6 @@ #include <linux/kernel.h> /* ARRAY_SIZE */ #include <linux/wireless.h> -#if WIRELESS_EXT < 17 -#define IW_QUAL_QUAL_INVALID 0x10 -#define IW_QUAL_LEVEL_INVALID 0x20 -#define IW_QUAL_NOISE_INVALID 0x40 -#define IW_QUAL_QUAL_UPDATED 0x1 -#define IW_QUAL_LEVEL_UPDATED 0x2 -#define IW_QUAL_NOISE_UPDATED 0x4 -#endif - #define IEEE80211_DATA_LEN 2304 /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section 6.2.1.1.2. -- -- Jouni Malinen PGP id EFC895FA |
From: Jouni M. <jkm...@cc...> - 2005-08-28 17:57:49
|
Version 0.4.4 of Host AP driver was released, so let's sync the version number in netdev-2.6 tree. Signed-off-by: Jouni Malinen <jkm...@cc...> Index: netdev-2.6/drivers/net/wireless/hostap/hostap_config.h =================================================================== --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_config.h +++ netdev-2.6/drivers/net/wireless/hostap/hostap_config.h @@ -1,7 +1,7 @@ #ifndef HOSTAP_CONFIG_H #define HOSTAP_CONFIG_H -#define PRISM2_VERSION "0.4.1-kernel" +#define PRISM2_VERSION "0.4.4-kernel" /* In the previous versions of Host AP driver, support for user space version * of IEEE 802.11 management (hostapd) used to be disabled in the default -- -- Jouni Malinen PGP id EFC895FA |
From: Jouni M. <jkm...@cc...> - 2005-08-28 17:57:49
|
hostap_cs: 0.4.1-kernel (Jouni Malinen <jkm...@cc...>) pcmcia: hostap_cs: invalid hash for product string "BUFFALO": is 0x1b01a57b, should be 0x2decece3 pcmcia: see Documentation/pcmcia/devicetable.txt for details pcmcia: hostap_cs: invalid hash for product string "WLI-CF-S11G": is 0xefd5102a, should be 0x82067c18 pcmcia: see Documentation/pcmcia/devicetable.txt for details This patch fixes them. Signed-off-by: Kalle Valo <Kal...@ik...> Signed-off-by: Jouni Malinen <jkm...@cc...> Index: netdev-2.6/drivers/net/wireless/hostap/hostap_cs.c =================================================================== --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_cs.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_cs.c @@ -987,7 +987,7 @@ static struct pcmcia_device_id hostap_cs "SMC", "SMC2632W", "Version 01.02", 0xc4f8b18b, 0x474a1f2a, 0x4b74baa0), PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-CF-S11G", - 0x1b01a57b, 0xefd5102a), + 0x2decece3, 0x82067c18), PCMCIA_DEVICE_PROD_ID12("Compaq", "WL200_11Mbps_Wireless_PCI_Card", 0x54f7c49c, 0x15a75e5b), PCMCIA_DEVICE_PROD_ID12("INTERSIL", "HFA384x/IEEE", -- -- Jouni Malinen PGP id EFC895FA |
From: Henrik B. A. <br...@ge...> - 2005-08-27 21:33:51
|
On Sat, 2005-08-27 at 23:13 +0200, Pavel Machek wrote: > Well, we can fix the distros :-). If you provide a patch, I can test if this is an issue with the networking scripts of Gentoo Linux - and if so, push a patch for our baselayout to fix this issue. Regards, Brix --=20 Henrik Brix Andersen <br...@ge...> Gentoo Metadistribution | Mobile computing herd |
From: Pavel M. <pa...@su...> - 2005-08-27 21:13:39
|
Hi! > >>Anyway, our rebasing from ieee80211 up to the latest development tip is > >>done across 29 commits, with a series size of 225k. > >> > > > >Are there any plans to fix "compiled into kernel" case? It works okay > >when modular, but when compiled into kernel, it fails to load > >firmware.... > > > I assume you are referring to ipw2{1,2}00 and not the ieee80211 >subsystem? Yes, I was talking ipw2200. > When last we had moved the firmware loader to outside of the netdev init > callback, we had problems with distros not bringing up the interface > correctly (it wasn't being opened until after carrier was detected... > which meant it couldn't be configured because it hadn't been brought up, > and so hadn't had the firmware loaded) Well, we can fix the distros :-). Could we at least mark CONFIG_IPW2200=Y as unsupported -- only allow N and M? Pavel -- if you have sharp zaurus hardware you don't need... you know my address |
From: James K. <jke...@li...> - 2005-08-27 16:21:45
|
Pavel Machek wrote: >Hi! > > >>Anyway, our rebasing from ieee80211 up to the latest development tip is >>done across 29 commits, with a series size of 225k. >> > >Are there any plans to fix "compiled into kernel" case? It works okay >when modular, but when compiled into kernel, it fails to load >firmware.... > I assume you are referring to ipw2{1,2}00 and not the ieee80211 subsystem? When last we had moved the firmware loader to outside of the netdev init callback, we had problems with distros not bringing up the interface correctly (it wasn't being opened until after carrier was detected... which meant it couldn't be configured because it hadn't been brought up, and so hadn't had the firmware loaded) We can put together a patch for ipw2200-1.0.7 / ipw2100-1.1.3 that changes this behavior in order to determine if there are still problems in user space. I would be hesitant to incorporate into upstream or anywhere that masses may use it until we have agreed on what the configuration flow for user space is for network devices. Once we have agreed what user space should do, we can break compatibility. The order required of user space is: kernel hotplug hotplug script ----------------------- -------------- ----------- 1. module load 2. netdev device registered 3. new device 4. ifconfig up 5. open: load firmware, 6. init device, etc. 7. configure wireless 8. scan 9. associate A. link B. carrier detected C. configure link (dhcp) When last we looked at this, step 4 was being handled by ifplugd only after IFF_RUNNING or carrier_detect indicated link, which with wireless is potentially not possible until after step 7. Changing the driver requires moving the firmware load path back to the open handler, and extracting the MAC detection code into the probe function (independent of fw loading) so that the MAC is available during the hotplug scripts for use with ifrename. Although I believe some hardware can't detect MAC until after the fw is loaded. So, we might want to require that hotplug scripts not attempt to rename the interface until after it has been opened. The rub there being that (IIRC) ifrename requires the interface to be down in order to rename it... James |
From: Pavel M. <pa...@su...> - 2005-08-27 10:18:52
|
Hi! > Anyway, our rebasing from ieee80211 up to the latest development tip is > done across 29 commits, with a series size of 225k. Are there any plans to fix "compiled into kernel" case? It works okay when modular, but when compiled into kernel, it fails to load firmware.... Pavel -- if you have sharp zaurus hardware you don't need... you know my address |
From: James K. <jke...@li...> - 2005-08-26 04:32:19
|
Adrian Bunk wrote: >"extern inline" doesn't make much sense. > > I've applied to your patch to ieee80211 GIT overlay at rsync://bughost.org/repos/ieee80211-rebase/ If you want to get the latest code from the overlay, you can do so by either dropping it into an existing netdev-2.6 tree or by pulling a full new tree. To drop into an existing netdev-2.6 tree: cd netdev-2.6 rsync -avpr rsync://bughost.org/repos/ieee80211-rebase/.git/objects/ .git/objects/ rsync -avpr rsync://bughost.org/repos/ieee80211-rebase/.git/refs/heads/master \ .git/refs/heads/ieee80211-rebase You can now 'cg-log -r ieee80211-rebase', etc. To pull the full tree: rsync -avpr rsync://bughost.org/repos/scripts/git-grab-overlay . chmod +x git-grab-overlay ./git-grab-overlay rsync://bughost.org/repos/ieee80211-rebase James |
From: James K. <jke...@li...> - 2005-08-26 02:14:24
|
Jeff Garzik wrote: > Jiri Benc wrote: > >> Our patches against latest ieee80211 branch can be found at >> http://kernel.org/pub/linux/kernel/people/jbenc/ > > Thanks for your patience. > > To answer Pavel's question from the other email: > > I was hoping that Intel would resend their patches, rediffed to the > latest ieee80211 branch. I didn't want to apply all these cleanups, > which would then force Intel to rediff _yet again_. When it rains it pours it seems... we finally had the time to split up the commit Jiri originally asked us to split up; in doing so we rebased the commit series against netdev-2.6#ieee80211 as of Aug 15th (commit 1b5cca3a88b7682d538d129c25f0e3092613a243) When we rebased, the first commit was a run scripts/Lindent and trimmed all trailing whitespace on include/net/ieee80211*.h and net/ieee80211/*.c. This makes the first patch in the series large, but it is purely a Lindent patch. Running it as the first step in the rebase helped resolve any conflicts later (if you're interested in the 'clean-rebase' script it will apply non Lindent'd patches back into a Lindented tree without Lindent caused conflicts). Anyway, our rebasing from ieee80211 up to the latest development tip is done across 29 commits, with a series size of 225k. We have an updated GIT overlay of the rebased ieee80211 at rsync://bughost.org/repos/ieee80211-rebase/.git/. If you just want to pull the objects/ tree, you can walk it via the commit 69b08411732dfc5a028ef19fc6c79b84302c4c30. NOTE: The GIT overlay referenced here is not a full archive. It only contains the objects required to move from the parent (netdev-2.6#ieee80211) to the master. Once pulled you can use many of the git commands, but others (like checkout) will likely fail. We are willing to keep a ieee80211 GIT tree up to date w/ everyone's patches that you can just periodically pull from if you'd like. We already have to maintain a separate tree anyway to enable updates and snapshots for the ipw2{1,2}00 project users. This is partially what is causing us pain right now; any set of patches we apply may later end up being conflicts when we try and merge back with netdev -- which means the merge rarely occurs. At the same time, we can't always wait for a patch to be incorporated into netdev-2.6#ieee80211 before we make it available to users. Anyway, here is the shortlist of the changes we have for ieee80211, available from the above rsync location. (As a side note, we're working on a similar set for the ipw2{1,2}00 drivers that catch them up to being compatible with this version of ieee80211, etc. That series is 52 patches, breaking in at just over 1M.) James --- cg-diff -r parent:master | diffstat -p1 --- include/net/ieee80211.h | 474 ++++++++++++++++------ include/net/ieee80211_crypt.h | 46 +- include/net/ieee80211_radiotap.h | 237 +++++++++++ net/ieee80211/ieee80211_crypt.c | 86 ++-- net/ieee80211/ieee80211_crypt_ccmp.c | 79 +-- net/ieee80211/ieee80211_crypt_tkip.c | 163 +++---- net/ieee80211/ieee80211_crypt_wep.c | 52 -- net/ieee80211/ieee80211_geo.c | 141 ++++++ net/ieee80211/ieee80211_module.c | 90 ++-- net/ieee80211/ieee80211_rx.c | 751 +++++++++++++++++++++++++---------- net/ieee80211/ieee80211_tx.c | 332 ++++++++++----- net/ieee80211/ieee80211_wx.c | 393 ++++++++++++++---- 12 files changed, 2092 insertions(+), 752 deletions(-) --- git --pretty=short parent..master | git shortlog --- Ivo van Doorn: This patch adds support for the creation of RTS packets when the James Ketrenos: Ran scripts/Lindent on ieee80211 files. Fixed some endian issues with 802.11 header usage in ieee80211_rx.c Incorporated Bill Moss' quality scaling algorithm into default wireless Added wireless spy support to Rx code path. Fixed a kernel oops on module unload by adding spin lock protection to Changed 802.11 headers to use ieee80211_info_element as zero sized Removed ieee80211_info_element_hdr structure as ieee80211_info_element Hardware crypto and fragmentation offload support added (Zhu Yi) Switched to sscanf as per friendly comment in store_debug_level. Fixed type-o of abg_ture -> abg_true. Renamed ieee80211_hdr to ieee80211_hdr_3addr and modified ieee80211_hdr Fixed a stray struct ieee80211_hdr usage. Added definitions of several information element IDs and the short_slot Added ieee80211_tx_frame to convert generic 802.11 data frames into Per the conversations with folks at OLS, the QoS layer in 802.11 Added ieee80211_geo to provide helper functions to drivers for Updated misc. copyright dates. Removed some #define WLAN_* constants that were previously removed but Update version ieee80211 stamp to 1.1.4-pre6 Liu Hong: Added WE-18 support to default wireless extension handler in ieee80211 This patch fixes several things: Mike Kershaw: Added ieee80211_radiotap.h to enhance statistic reporting to user space Mohamed Abbas: Add QoS (WME) support to the ieee80211 subsystem. Pedro Ramalhais: Fixed 64-bit compilation warning. Zhu Yi: Cleanup memcpy parameters. Fix time calculation. HZ is 1000 on 2.6 i386 kernel, but we don't Fix kernel Oops when module unload. Allow drivers to fix an issue when using wpa_supplicant with WEP. |
From: Jeff G. <jg...@po...> - 2005-08-15 04:36:54
|
Jouni Malinen wrote: > These patches are the not yet applied patches 8 and 9 from the previous > set. Old patch 8 was split into two and rediffed (ipw2200.c had > changed). The new patch 1 is for ieee80211 branch of netdev-2.6 and > patch 2 for ieee80211-wifi. These two need to be applied at the same > time. Patch 3 is otherwise separate from the previous two, but requires > 2 to apply without conflicts. Please apply to suitable branches in > netdev-2.6 and merge ieee80211 branch into ieee80211-wifi after this. Applied all three patches, then manually removed the last two uses of WLAN_CAPABILITY_BSS, and the definition itself. For the purposes of these devel branches, we ignore everything outside of the tree. Thanks, Jeff |
From: Jouni M. <jkm...@cc...> - 2005-08-15 04:13:07
|
Replace remaining WLAN_FC_* defines with the ones used in ieee80211 header file. This completes the move from hostap version of frame control field processing to ieee80211 version. Signed-off-by: Jouni Malinen <jkm...@cc...> Index: netdev-2.6/drivers/net/wireless/hostap/hostap_common.h =================================================================== --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_common.h +++ netdev-2.6/drivers/net/wireless/hostap/hostap_common.h @@ -9,16 +9,6 @@ /* IEEE 802.11 defines */ -#define WLAN_FC_PVER (BIT(1) | BIT(0)) -#define WLAN_FC_TODS BIT(8) -#define WLAN_FC_FROMDS BIT(9) -#define WLAN_FC_MOREFRAG BIT(10) -#define WLAN_FC_RETRY BIT(11) -#define WLAN_FC_PWRMGT BIT(12) -#define WLAN_FC_MOREDATA BIT(13) -#define WLAN_FC_ISWEP BIT(14) -#define WLAN_FC_ORDER BIT(15) - /* Information Element IDs */ #define WLAN_EID_SSID 0 #define WLAN_EID_SUPP_RATES 1 Index: netdev-2.6/drivers/net/wireless/hostap/hostap.c =================================================================== --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap.c @@ -597,8 +597,8 @@ void hostap_dump_rx_header(const char *n fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, __le16_to_cpu(rx->duration_id), __le16_to_cpu(rx->seq_ctrl), __le16_to_cpu(rx->data_len), - fc & WLAN_FC_TODS ? " [ToDS]" : "", - fc & WLAN_FC_FROMDS ? " [FromDS]" : ""); + fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", + fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : ""); printk(KERN_DEBUG " A1=" MACSTR " A2=" MACSTR " A3=" MACSTR " A4=" MACSTR "\n", @@ -626,8 +626,8 @@ void hostap_dump_tx_header(const char *n fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, __le16_to_cpu(tx->duration_id), __le16_to_cpu(tx->seq_ctrl), __le16_to_cpu(tx->data_len), - fc & WLAN_FC_TODS ? " [ToDS]" : "", - fc & WLAN_FC_FROMDS ? " [FromDS]" : ""); + fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", + fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : ""); printk(KERN_DEBUG " A1=" MACSTR " A2=" MACSTR " A3=" MACSTR " A4=" MACSTR "\n", @@ -668,7 +668,7 @@ int hostap_80211_get_hdrlen(u16 fc) switch (WLAN_FC_GET_TYPE(fc)) { case IEEE80211_FTYPE_DATA: - if ((fc & WLAN_FC_FROMDS) && (fc & WLAN_FC_TODS)) + if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) hdrlen = 30; /* Addr4 */ break; case IEEE80211_FTYPE_CTL: Index: netdev-2.6/drivers/net/wireless/hostap/hostap_80211_rx.c =================================================================== --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_80211_rx.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_80211_rx.c @@ -22,8 +22,8 @@ void hostap_dump_rx_80211(const char *na fc = le16_to_cpu(hdr->frame_ctl); printk(KERN_DEBUG " FC=0x%04x (type=%d:%d)%s%s", fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, - fc & WLAN_FC_TODS ? " [ToDS]" : "", - fc & WLAN_FC_FROMDS ? " [FromDS]" : ""); + fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", + fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : ""); if (skb->len < IEEE80211_DATA_HDR3_LEN) { printk("\n"); @@ -73,9 +73,9 @@ int prism2_rx_80211(struct net_device *d hdr = (struct ieee80211_hdr *) skb->data; fc = le16_to_cpu(hdr->frame_ctl); - if (type == PRISM2_RX_MGMT && (fc & WLAN_FC_PVER)) { + if (type == PRISM2_RX_MGMT && (fc & IEEE80211_FCTL_VERS)) { printk(KERN_DEBUG "%s: dropped management frame with header " - "version %d\n", dev->name, fc & WLAN_FC_PVER); + "version %d\n", dev->name, fc & IEEE80211_FCTL_VERS); dev_kfree_skb_any(skb); return 0; } @@ -525,9 +525,9 @@ hostap_rx_frame_wds(local_info_t *local, { /* FIX: is this really supposed to accept WDS frames only in Master * mode? What about Repeater or Managed with WDS frames? */ - if ((fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) != - (WLAN_FC_TODS | WLAN_FC_FROMDS) && - (local->iw_mode != IW_MODE_MASTER || !(fc & WLAN_FC_TODS))) + if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) != + (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS) && + (local->iw_mode != IW_MODE_MASTER || !(fc & IEEE80211_FCTL_TODS))) return 0; /* not a WDS frame */ /* Possible WDS frame: either IEEE 802.11 compliant (if FromDS) @@ -539,14 +539,15 @@ hostap_rx_frame_wds(local_info_t *local, /* RA (or BSSID) is not ours - drop */ PDEBUG(DEBUG_EXTRA, "%s: received WDS frame with " "not own or broadcast %s=" MACSTR "\n", - local->dev->name, fc & WLAN_FC_FROMDS ? "RA" : "BSSID", + local->dev->name, + fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID", MAC2STR(hdr->addr1)); return -1; } /* check if the frame came from a registered WDS connection */ *wds = prism2_rx_get_wds(local, hdr->addr2); - if (*wds == NULL && fc & WLAN_FC_FROMDS && + if (*wds == NULL && fc & IEEE80211_FCTL_FROMDS && (local->iw_mode != IW_MODE_INFRA || !(local->wds_type & HOSTAP_WDS_AP_CLIENT) || memcmp(hdr->addr2, local->bssid, ETH_ALEN) != 0)) { @@ -560,7 +561,7 @@ hostap_rx_frame_wds(local_info_t *local, return -1; } - if (*wds && !(fc & WLAN_FC_FROMDS) && local->ap && + if (*wds && !(fc & IEEE80211_FCTL_FROMDS) && local->ap && hostap_is_sta_assoc(local->ap, hdr->addr2)) { /* STA is actually associated with us even though it has a * registered WDS link. Assume it is in 'AP client' mode. @@ -588,11 +589,13 @@ static int hostap_is_eapol_frame(local_i fc = le16_to_cpu(hdr->frame_ctl); /* check that the frame is unicast frame to us */ - if ((fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) == WLAN_FC_TODS && + if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == + IEEE80211_FCTL_TODS && memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN) == 0 && memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) { /* ToDS frame with own addr BSSID and DA */ - } else if ((fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) == WLAN_FC_FROMDS && + } else if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == + IEEE80211_FCTL_FROMDS && memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN) == 0) { /* FromDS frame with own addr as DA */ } else @@ -770,7 +773,7 @@ void hostap_80211_rx(struct net_device * crypt->ops->decrypt_mpdu == NULL)) crypt = NULL; - if (!crypt && (fc & WLAN_FC_ISWEP)) { + if (!crypt && (fc & IEEE80211_FCTL_WEP)) { #if 0 /* This seems to be triggered by some (multicast?) * frames from other than current BSS, so just drop the @@ -788,7 +791,7 @@ void hostap_80211_rx(struct net_device * if (type != IEEE80211_FTYPE_DATA) { if (type == IEEE80211_FTYPE_MGMT && stype == IEEE80211_STYPE_AUTH && - fc & WLAN_FC_ISWEP && local->host_decrypt && + fc & IEEE80211_FCTL_WEP && local->host_decrypt && (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) { printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " @@ -809,16 +812,16 @@ void hostap_80211_rx(struct net_device * if (skb->len < IEEE80211_DATA_HDR3_LEN) goto rx_dropped; - switch (fc & (WLAN_FC_FROMDS | WLAN_FC_TODS)) { - case WLAN_FC_FROMDS: + switch (fc & (IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS)) { + case IEEE80211_FCTL_FROMDS: memcpy(dst, hdr->addr1, ETH_ALEN); memcpy(src, hdr->addr3, ETH_ALEN); break; - case WLAN_FC_TODS: + case IEEE80211_FCTL_TODS: memcpy(dst, hdr->addr3, ETH_ALEN); memcpy(src, hdr->addr2, ETH_ALEN); break; - case WLAN_FC_FROMDS | WLAN_FC_TODS: + case IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS: if (skb->len < IEEE80211_DATA_HDR4_LEN) goto rx_dropped; memcpy(dst, hdr->addr3, ETH_ALEN); @@ -838,7 +841,8 @@ void hostap_80211_rx(struct net_device * } if (local->iw_mode == IW_MODE_MASTER && !wds && - (fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) == WLAN_FC_FROMDS && + (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == + IEEE80211_FCTL_FROMDS && local->stadev && memcmp(hdr->addr2, local->assoc_ap_addr, ETH_ALEN) == 0) { /* Frame from BSSID of the AP for which we are a client */ @@ -882,22 +886,22 @@ void hostap_80211_rx(struct net_device * /* skb: hdr + (possibly fragmented, possibly encrypted) payload */ - if (local->host_decrypt && (fc & WLAN_FC_ISWEP) && + if (local->host_decrypt && (fc & IEEE80211_FCTL_WEP) && (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) goto rx_dropped; hdr = (struct ieee80211_hdr *) skb->data; /* skb: hdr + (possibly fragmented) plaintext payload */ - if (local->host_decrypt && (fc & WLAN_FC_ISWEP) && - (frag != 0 || (fc & WLAN_FC_MOREFRAG))) { + if (local->host_decrypt && (fc & IEEE80211_FCTL_WEP) && + (frag != 0 || (fc & IEEE80211_FCTL_MOREFRAGS))) { int flen; struct sk_buff *frag_skb = prism2_frag_cache_get(local, hdr); if (!frag_skb) { printk(KERN_DEBUG "%s: Rx cannot get skb from " "fragment cache (morefrag=%d seq=%u frag=%u)\n", - dev->name, (fc & WLAN_FC_MOREFRAG) != 0, + dev->name, (fc & IEEE80211_FCTL_MOREFRAGS) != 0, WLAN_GET_SEQ_SEQ(sc) >> 4, frag); goto rx_dropped; } @@ -927,7 +931,7 @@ void hostap_80211_rx(struct net_device * dev_kfree_skb(skb); skb = NULL; - if (fc & WLAN_FC_MOREFRAG) { + if (fc & IEEE80211_FCTL_MOREFRAGS) { /* more fragments expected - leave the skb in fragment * cache for now; it will be delivered to upper layers * after all fragments have been received */ @@ -944,12 +948,12 @@ void hostap_80211_rx(struct net_device * /* skb: hdr + (possible reassembled) full MSDU payload; possibly still * encrypted/authenticated */ - if (local->host_decrypt && (fc & WLAN_FC_ISWEP) && + if (local->host_decrypt && (fc & IEEE80211_FCTL_WEP) && hostap_rx_frame_decrypt_msdu(local, skb, keyidx, crypt)) goto rx_dropped; hdr = (struct ieee80211_hdr *) skb->data; - if (crypt && !(fc & WLAN_FC_ISWEP) && !local->open_wep) { + if (crypt && !(fc & IEEE80211_FCTL_WEP) && !local->open_wep) { if (local->ieee_802_1x && hostap_is_eapol_frame(local, skb)) { /* pass unencrypted EAPOL frames even if encryption is @@ -964,7 +968,7 @@ void hostap_80211_rx(struct net_device * } } - if (local->drop_unencrypted && !(fc & WLAN_FC_ISWEP) && + if (local->drop_unencrypted && !(fc & IEEE80211_FCTL_WEP) && !hostap_is_eapol_frame(local, skb)) { if (net_ratelimit()) { printk(KERN_DEBUG "%s: dropped unencrypted RX data " @@ -1023,7 +1027,8 @@ void hostap_80211_rx(struct net_device * memcpy(skb_push(skb, ETH_ALEN), dst, ETH_ALEN); } - if (wds && ((fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) == WLAN_FC_TODS) && + if (wds && ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == + IEEE80211_FCTL_TODS) && skb->len >= ETH_HLEN + ETH_ALEN) { /* Non-standard frame: get addr4 from its bogus location after * the payload */ Index: netdev-2.6/drivers/net/wireless/hostap/hostap_80211_tx.c =================================================================== --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_80211_tx.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_80211_tx.c @@ -14,8 +14,8 @@ void hostap_dump_tx_80211(const char *na fc = le16_to_cpu(hdr->frame_ctl); printk(KERN_DEBUG " FC=0x%04x (type=%d:%d)%s%s", fc, WLAN_FC_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4, - fc & WLAN_FC_TODS ? " [ToDS]" : "", - fc & WLAN_FC_FROMDS ? " [FromDS]" : ""); + fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", + fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : ""); if (skb->len < IEEE80211_DATA_HDR3_LEN) { printk("\n"); @@ -128,7 +128,7 @@ int hostap_data_start_xmit(struct sk_buf * frame format */ if (use_wds == WDS_COMPLIANT_FRAME) { - fc |= WLAN_FC_FROMDS | WLAN_FC_TODS; + fc |= IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS; /* From&To DS: Addr1 = RA, Addr2 = TA, Addr3 = DA, * Addr4 = SA */ memcpy(&hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); @@ -136,7 +136,7 @@ int hostap_data_start_xmit(struct sk_buf } else { /* bogus 4-addr format to workaround Prism2 station * f/w bug */ - fc |= WLAN_FC_TODS; + fc |= IEEE80211_FCTL_TODS; /* From DS: Addr1 = DA (used as RA), * Addr2 = BSSID (used as TA), Addr3 = SA (used as DA), */ @@ -161,13 +161,13 @@ int hostap_data_start_xmit(struct sk_buf memcpy(&hdr.addr2, dev->dev_addr, ETH_ALEN); memcpy(&hdr.addr3, skb->data, ETH_ALEN); } else if (local->iw_mode == IW_MODE_MASTER && !to_assoc_ap) { - fc |= WLAN_FC_FROMDS; + fc |= IEEE80211_FCTL_FROMDS; /* From DS: Addr1 = DA, Addr2 = BSSID, Addr3 = SA */ memcpy(&hdr.addr1, skb->data, ETH_ALEN); memcpy(&hdr.addr2, dev->dev_addr, ETH_ALEN); memcpy(&hdr.addr3, skb->data + ETH_ALEN, ETH_ALEN); } else if (local->iw_mode == IW_MODE_INFRA || to_assoc_ap) { - fc |= WLAN_FC_TODS; + fc |= IEEE80211_FCTL_TODS; /* To DS: Addr1 = BSSID, Addr2 = SA, Addr3 = DA */ memcpy(&hdr.addr1, to_assoc_ap ? local->assoc_ap_addr : local->bssid, ETH_ALEN); @@ -439,12 +439,12 @@ int hostap_master_start_xmit(struct sk_b /* Request TX callback if protocol version is 2 in 802.11 header; * this version 2 is a special case used between hostapd and kernel * driver */ - if (((fc & WLAN_FC_PVER) == BIT(1)) && + if (((fc & IEEE80211_FCTL_VERS) == BIT(1)) && local->ap && local->ap->tx_callback_idx && meta->tx_cb_idx == 0) { meta->tx_cb_idx = local->ap->tx_callback_idx; /* remove special version from the frame header */ - fc &= ~WLAN_FC_PVER; + fc &= ~IEEE80211_FCTL_VERS; hdr->frame_ctl = cpu_to_le16(fc); } @@ -454,7 +454,7 @@ int hostap_master_start_xmit(struct sk_b } if (local->ieee_802_1x && meta->ethertype == ETH_P_PAE && tx.crypt && - !(fc & WLAN_FC_ISWEP)) { + !(fc & IEEE80211_FCTL_VERS)) { no_encrypt = 1; PDEBUG(DEBUG_EXTRA2, "%s: TX: IEEE 802.1X - passing " "unencrypted EAPOL frame\n", dev->name); @@ -466,7 +466,7 @@ int hostap_master_start_xmit(struct sk_b else if ((tx.crypt || local->crypt[local->tx_keyidx]) && !no_encrypt) { /* Add ISWEP flag both for firmware and host based encryption */ - fc |= WLAN_FC_ISWEP; + fc |= IEEE80211_FCTL_WEP; hdr->frame_ctl = cpu_to_le16(fc); } else if (local->drop_unencrypted && WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA && Index: netdev-2.6/drivers/net/wireless/hostap/hostap_ap.c =================================================================== --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_ap.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_ap.c @@ -604,7 +604,7 @@ static void hostap_ap_tx_cb(struct sk_bu /* Pass the TX callback frame to the hostapd; use 802.11 header version * 1 to indicate failure (no ACK) and 2 success (frame ACKed) */ - fc &= ~WLAN_FC_PVER; + fc &= ~IEEE80211_FCTL_VERS; fc |= ok ? BIT(1) : BIT(0); hdr->frame_ctl = cpu_to_le16(fc); @@ -956,7 +956,7 @@ static void prism2_send_mgmt(struct net_ memcpy(hdr->addr1, addr, ETH_ALEN); /* DA / RA */ if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA) { - fc |= WLAN_FC_FROMDS; + fc |= IEEE80211_FCTL_FROMDS; memcpy(hdr->addr2, dev->dev_addr, ETH_ALEN); /* BSSID */ memcpy(hdr->addr3, dev->dev_addr, ETH_ALEN); /* SA */ } else if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_CTL) { @@ -1436,7 +1436,7 @@ static void handle_authen(local_info_t * challenge == NULL || memcmp(sta->u.sta.challenge, challenge, WLAN_AUTH_CHALLENGE_LEN) != 0 || - !(fc & WLAN_FC_ISWEP)) { + !(fc & IEEE80211_FCTL_WEP)) { txt = "challenge response incorrect"; resp = WLAN_STATUS_CHALLENGE_FAIL; goto fail; @@ -1871,7 +1871,7 @@ static void handle_pspoll(local_info_t * PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=" MACSTR ", TA=" MACSTR " PWRMGT=%d\n", MAC2STR(hdr->addr1), MAC2STR(hdr->addr2), - !!(le16_to_cpu(hdr->frame_ctl) & WLAN_FC_PWRMGT)); + !!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM)); if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=" MACSTR @@ -2150,7 +2150,8 @@ static void handle_ap_item(local_info_t if (!local->hostapd && type == IEEE80211_FTYPE_DATA) { PDEBUG(DEBUG_AP, "handle_ap_item - data frame\n"); - if (!(fc & WLAN_FC_TODS) || (fc & WLAN_FC_FROMDS)) { + if (!(fc & IEEE80211_FCTL_TODS) || + (fc & IEEE80211_FCTL_FROMDS)) { if (stype == IEEE80211_STYPE_NULLFUNC) { /* no ToDS nullfunc seems to be used to check * AP association; so send reject message to @@ -2746,7 +2747,8 @@ ap_tx_ret hostap_handle_sta_tx(local_inf if (meta->flags & HOSTAP_TX_FLAGS_ADD_MOREDATA) { /* indicate to STA that more frames follow */ - hdr->frame_ctl |= __constant_cpu_to_le16(WLAN_FC_MOREDATA); + hdr->frame_ctl |= + __constant_cpu_to_le16(IEEE80211_FCTL_MOREDATA); } if (meta->flags & HOSTAP_TX_FLAGS_BUFFERED_FRAME) { @@ -2905,7 +2907,7 @@ int hostap_update_sta_ps(local_info_t *l return -1; fc = le16_to_cpu(hdr->frame_ctl); - hostap_update_sta_ps2(local, sta, fc & WLAN_FC_PWRMGT, + hostap_update_sta_ps2(local, sta, fc & IEEE80211_FCTL_PM, WLAN_FC_GET_TYPE(fc), WLAN_FC_GET_STYPE(fc)); atomic_dec(&sta->users); @@ -2946,7 +2948,7 @@ ap_rx_ret hostap_handle_sta_rx(local_inf ret = AP_RX_CONTINUE; - if (fc & WLAN_FC_TODS) { + if (fc & IEEE80211_FCTL_TODS) { if (!wds && (sta == NULL || !(sta->flags & WLAN_STA_ASSOC))) { if (local->hostapd) { prism2_rx_80211(local->apdev, skb, rx_stats, @@ -2964,7 +2966,7 @@ ap_rx_ret hostap_handle_sta_rx(local_inf ret = AP_RX_EXIT; goto out; } - } else if (fc & WLAN_FC_FROMDS) { + } else if (fc & IEEE80211_FCTL_FROMDS) { if (!wds) { /* FromDS frame - not for us; probably * broadcast/multicast in another BSS - drop */ @@ -3019,7 +3021,7 @@ ap_rx_ret hostap_handle_sta_rx(local_inf } if (sta) { - hostap_update_sta_ps2(local, sta, fc & WLAN_FC_PWRMGT, + hostap_update_sta_ps2(local, sta, fc & IEEE80211_FCTL_PM, type, stype); sta->rx_packets++; @@ -3028,7 +3030,7 @@ ap_rx_ret hostap_handle_sta_rx(local_inf } if (local->ap->nullfunc_ack && stype == IEEE80211_STYPE_NULLFUNC && - fc & WLAN_FC_TODS) { + fc & IEEE80211_FCTL_TODS) { if (local->hostapd) { prism2_rx_80211(local->apdev, skb, rx_stats, PRISM2_RX_NULLFUNC_ACK); Index: netdev-2.6/drivers/net/wireless/hostap/hostap_hw.c =================================================================== --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_hw.c +++ netdev-2.6/drivers/net/wireless/hostap/hostap_hw.c @@ -1844,7 +1844,8 @@ static int prism2_tx_80211(struct sk_buf memcpy(&txdesc.frame_control, skb->data, hdr_len); fc = le16_to_cpu(txdesc.frame_control); if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA && - (fc & WLAN_FC_FROMDS) && (fc & WLAN_FC_TODS) && skb->len >= 30) { + (fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS) && + skb->len >= 30) { /* Addr4 */ memcpy(txdesc.addr4, skb->data + hdr_len, ETH_ALEN); hdr_len += ETH_ALEN; @@ -2399,8 +2400,8 @@ static void prism2_txexc(local_info_t *l WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_CTL ? "Ctrl" : "", WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA ? "Data" : "", WLAN_FC_GET_STYPE(fc) >> 4, - fc & WLAN_FC_TODS ? " ToDS" : "", - fc & WLAN_FC_FROMDS ? " FromDS" : ""); + fc & IEEE80211_FCTL_TODS ? " ToDS" : "", + fc & IEEE80211_FCTL_FROMDS ? " FromDS" : ""); PDEBUG(DEBUG_EXTRA, " A1=" MACSTR " A2=" MACSTR " A3=" MACSTR " A4=" MACSTR "\n", MAC2STR(txdesc.addr1), MAC2STR(txdesc.addr2), -- -- Jouni Malinen PGP id EFC895FA |
From: Jouni M. <jkm...@cc...> - 2005-08-15 04:13:06
|
Remove backwards compatibility define for WLAN_CAPABILITY_ESS now that net/ieee80211.h defines this. Signed-off-by: Jouni Malinen <jkm...@cc...> Index: netdev-2.6/drivers/net/wireless/hostap/hostap_common.h =================================================================== --- netdev-2.6.orig/drivers/net/wireless/hostap/hostap_common.h +++ netdev-2.6/drivers/net/wireless/hostap/hostap_common.h @@ -19,9 +19,6 @@ #define WLAN_FC_ISWEP BIT(14) #define WLAN_FC_ORDER BIT(15) -#define WLAN_CAPABILITY_ESS WLAN_CAPABILITY_BSS - - /* Information Element IDs */ #define WLAN_EID_SSID 0 #define WLAN_EID_SUPP_RATES 1 -- -- Jouni Malinen PGP id EFC895FA |
From: Jouni M. <jkm...@cc...> - 2005-08-15 04:13:06
|
These patches are the not yet applied patches 8 and 9 from the previous set. Old patch 8 was split into two and rediffed (ipw2200.c had changed). The new patch 1 is for ieee80211 branch of netdev-2.6 and patch 2 for ieee80211-wifi. These two need to be applied at the same time. Patch 3 is otherwise separate from the previous two, but requires 2 to apply without conflicts. Please apply to suitable branches in netdev-2.6 and merge ieee80211 branch into ieee80211-wifi after this. -- Jouni Malinen PGP id EFC895FA |
From: Jouni M. <jkm...@cc...> - 2005-08-15 04:13:06
|
IEEE 802.11 has a capability field flag called ESS, but ieee80211 had renamed this to BSS for some reason. hostap has been using WLAN_CAPABILITY_ESS and since that matches with the standard, lets use it as the name for this define. Add WLAN_CAPABILITY_BSS as a backwards compatibility name for the same bit since ieee80211 and ipw2200 are using this and there are versions outside kernel tree that expect to find this define name. Signed-off-by: Jouni Malinen <jkm...@cc...> Index: netdev-2.6/include/net/ieee80211.h =================================================================== --- netdev-2.6.orig/include/net/ieee80211.h +++ netdev-2.6/include/net/ieee80211.h @@ -264,7 +264,8 @@ struct ieee80211_snap_hdr { #define WLAN_AUTH_CHALLENGE_LEN 128 -#define WLAN_CAPABILITY_BSS (1<<0) +#define WLAN_CAPABILITY_ESS (1<<0) +#define WLAN_CAPABILITY_BSS WLAN_CAPABILITY_ESS #define WLAN_CAPABILITY_IBSS (1<<1) #define WLAN_CAPABILITY_CF_POLLABLE (1<<2) #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) Index: netdev-2.6/drivers/net/wireless/ipw2200.c =================================================================== --- netdev-2.6.orig/drivers/net/wireless/ipw2200.c +++ netdev-2.6/drivers/net/wireless/ipw2200.c @@ -4190,7 +4190,7 @@ static int ipw_best_network( /* Verify that this network's capability is compatible with the * current mode (AdHoc or Infrastructure) */ if ((priv->ieee->iw_mode == IW_MODE_INFRA && - !(network->capability & WLAN_CAPABILITY_BSS)) || + !(network->capability & WLAN_CAPABILITY_ESS)) || (priv->ieee->iw_mode == IW_MODE_ADHOC && !(network->capability & WLAN_CAPABILITY_IBSS))) { IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded due to " -- -- Jouni Malinen PGP id EFC895FA |