Commit graph

88221 commits

Author SHA1 Message Date
Emmanuel Grumbach 5d2cdcd4e8 mac80211: get a TKIP phase key from skb
This patch makes mac80211 able to compute a TKIP key from an skb.
The requested key can be a phase 1 or a phase 2 key.
This is useful for drivers who need to provide tkip key to their
HW to enable HW encryption.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:52 -04:00
Emmanuel Grumbach 17e476b8db iwlwifi-2.6: RX status translation to old scheme
This patch adds translation for the RX status of an incoming packet.
The incoming status has to be translated to the old scheme in order to know
if the decryption has been done, MIC failure has occured, TTAK is valid etc...
This translation is mandatory for all RX packets when using 5300 and for
all HT packets using 4965.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:52 -04:00
Emmanuel Grumbach deb09c435e iwlwifi-2.6: Cleans up set_key flow
This patch cleans up the set_key flow. Rxon with hw encryption bit set is
not sent upon each call to set_key. Separation is made between global key
(WEP) and dynamic key (TKIP + CCMP and WEP in some cases).

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:52 -04:00
Assaf Krauss bf85ea4fbe iwlwifi: Probe Flow - Extracting hw and priv init
1. Extracting hw and priv initialization from probe function.
2. Moving some initialization functions to core module.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:51 -04:00
Assaf Krauss 1d0a082d38 iwlwifi: Probe Flow - Performing allocation in a separate function
Performing allocation in a separate function (previously handled in
'probe')

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:51 -04:00
Assaf Krauss 00acbc9135 iwlwifi: Packing all 4965 parameters
This patch defines a package struct for iwlwifi parameters, and uses a
single instance of this struct to group all iwl4965 module parameters
together.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:51 -04:00
Assaf Krauss 316c30d9dd iwlwifi: Re-ordering probe flow (4965)
This patch re-orders the iwl4965_pci_probe function.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:50 -04:00
Reinette Chatre 99f7d39bb0 iwlwifi: remove macros containing offsets from eeprom struct
A user needing to access these fields can use offsetof() for
access. The comments still contain the offset to assist with
debugging.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:50 -04:00
Holger Schurig ff829ae016 libertas: store rssi as an u32
Don't store an (hardware base) u8 value in bss_descriptor, but just an
unsigned int (RSSI is really unsigned). Compilers generate more efficent
code for ints than for bytes.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:50 -04:00
Holger Schurig e98a88dd33 libertas: remove lots of unused stuff
This removes many unused function parameters as well as some not-implemented
functions, e.g. CMD_802_11_GET_STATS. The silly lbs_set_cmd_ctrl_node()
function is now also gone.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:49 -04:00
Holger Schurig d4ff0ef635 libertas: misc power saving adjusts
* firmware for the CF card supports power saving
* the driver currenly only accept "iwconfig ethX power on|off", so
  I fixed what the range wext ioctl reports.
* initialize value/flags in lbs_get_power()
* get rid of unused parameter psmode in lbs_ps_confirm_sleep()
* some minor debug output tweaks

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:49 -04:00
Holger Schurig c49c3b77c8 libertas: convert GET_LOG to a direct command
Now uses __lbs_cmd() to get the "log" (it's actually more a snapshot of
various counters, not a sequential log). Besides the "mechanical" convertion
the patch add the following logical changes:

* Removes the priv->logmsg variable, it was only used in one place anyway,
  also don't blindly get the counters when associating. Getting the
  counters then the user asks via WEXT for them is good enought.
* don't set wstats.discard.fragment with log.rxfrag, because the latter is
  a counter for successfully received packets, not for fragmented packets.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:48 -04:00
Holger Schurig c97329e21f libertas: fix scheduling while atomic bug in CMD_MAC_CONTROL
The old code incorrectly used lbs_cmd_with_response() and now uses
lbs_cmd_async().

While there I noticed that there is no real useful return values for
asynchronous command functions, so I made the function "void".

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:48 -04:00
Holger Schurig 8db4a2b986 libertas: make a handy lbs_cmd_async() command
This uses a static lbs_cmd_async_callback function, which is a
noop. Just setting the callback argument to __lbs_cmd_async()
to NULL won't work, because then the cmdnode wouldn't be
released.

This also makes __lbs_cmd_async() a static method, which is
now only used by lbs_cmd() and lbs_cmd_async().

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:48 -04:00
Tomas Winkler 712b6cf57a iwlwifi: Add debugfs to iwl core
This patch adds debugfs support to iwl core
currently only iwl4965 is supported

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:47 -04:00
Tomas Winkler 19758bef09 iwlwifi: Add TX/RX statistcs to driver
This patch supports collecting of TX and RX statistics in the driver.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:47 -04:00
Tomas Winkler c79dd5b5bc iwlwifi: rename struct iwl4965_priv to struct iwl_priv
This patch renames iwl4965_priv to iwl_priv. iwl_priv  will
be shared by more hw.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:47 -04:00
Tomas Winkler 0a6857e70d iwlwifi: rename iwl-4965-debug.h back to iwl-debug.h
This patch removes iwl-4965-debug.h to iwl-debug.h
It will be used by more NICs

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:46 -04:00
Max Stepanov 8236e183fc iwlwifi: Bug fix, CCMP with HW encryption with AGG
This patch fixes a bug in security. Enables CCMP HW encryption with
aggregations.

Signed-off-by: Max Stepanov <max.stepanov@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:46 -04:00
Holger Schurig 56ca84c61b libertas: remove some unused commands
Neither CMD_802_11_PAIRWISE_TSC nor CMD_802_11_GROUP_TSC is used or
documented. It might have something to do with TKIP sequence counters,
but that's just an educated guess. Remove all occurences of them.

CMD_CODE_DNLD is also neither used nor documented.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:45 -04:00
Holger Schurig d9e9778c2a libertas: rename packetfilter to mac_control
The CMD_MAC_CONTROL can be used for other things than just filtering
packets, e.g. to enable and disable WMM. This uses the same term mac_control
for the define, the function and the shadow value in struct lbs_private.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:45 -04:00
Holger Schurig 835d3ac5e8 libertas: convert CMD_MAC_CONTROL to a direct command
convert CMD_MAC_CONTROL to a direct command

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25 16:41:45 -04:00
YOSHIFUJI Hideaki 878628fbf2 [NET] NETNS: Omit namespace comparision without CONFIG_NET_NS.
Introduce an inline net_eq() to compare two namespaces.
Without CONFIG_NET_NS, since no namespace other than &init_net
exists, it is always 1.

We do not need to convert 1) inline vs inline and
2) inline vs &init_net comparisons.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-26 04:40:00 +09:00
YOSHIFUJI Hideaki 57da52c1e6 [NET] NETNS: Omit neigh_parms->net and pneigh_entry->net without CONFIG_NET_NS.
Introduce neigh_parms/pneigh_entry inlines: neigh_parms_net(), pneigh_net().
Without CONFIG_NET_NS, no namespace other than &init_net exists.
Let's explicitly define them to help compiler optimizations.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-26 04:39:58 +09:00
YOSHIFUJI Hideaki 1218854afa [NET] NETNS: Omit seq_net_private->net without CONFIG_NET_NS.
Without CONFIG_NET_NS, no namespace other than &init_net exists,
no need to store net in seq_net_private.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-26 04:39:56 +09:00
YOSHIFUJI Hideaki 3b1e0a655f [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS.
Introduce per-sock inlines: sock_net(), sock_net_set()
and per-inet_timewait_sock inlines: twsk_net(), twsk_net_set().
Without CONFIG_NET_NS, no namespace other than &init_net exists.
Let's explicitly define them to help compiler optimizations.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-26 04:39:55 +09:00
YOSHIFUJI Hideaki c346dca108 [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.
Introduce per-net_device inlines: dev_net(), dev_net_set().
Without CONFIG_NET_NS, no namespace other than &init_net exists.
Let's explicitly define them to help compiler optimizations.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-26 04:39:53 +09:00
YOSHIFUJI Hideaki 7cbca67c07 [IPV6]: Support Source Address Selection API (RFC5014).
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:24:01 +09:00
YOSHIFUJI Hideaki 1d5d236d30 [IPV6]: Use bitfields for hop_limit and mcast_hops.
Save some bits for future extensions.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:24:01 +09:00
YOSHIFUJI Hideaki 6b75d09081 [IPV6]: Optimize hop-limit determination.
Last part of hop-limit determination is always:
    hoplimit = dst_metric(dst, RTAX_HOPLIMIT);
    if (hoplimit < 0)
        hoplimit = ipv6_get_hoplimit(dst->dev).

Let's consolidate it as ip6_dst_hoplimit(dst).

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:24:00 +09:00
YOSHIFUJI Hideaki 4725474584 [IPV6]: Convert cork.hop_limit and cork.tclass into u8 instead of int.
Values of those fields are always between 0 and 255 (inclusive),
so use u8 and save some memory on 32bit systems.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:23:59 +09:00
YOSHIFUJI Hideaki c8cdaf998d [IPV4,IPV6]: Share cork.rt between IPv4 and IPv6.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:23:59 +09:00
YOSHIFUJI Hideaki a9b05723ff [IPV6] ADDRCONF: Clean-up ipv6_dev_get_saddr().
old:
|    text	   data	    bss	    dec	    hex	filename
|   28599	   1416	     96	  30111	   759f	net/ipv6/addrconf.o

new:
|    text	   data	    bss	    dec	    hex	filename
|   28007	   1416	     96	  29519	   734f	net/ipv6/addrconf.o

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:23:58 +09:00
YOSHIFUJI Hideaki 9bb182a700 [XFRM] MIP6: Fix address keys for routing search.
Each MIPv6 XFRM state (DSTOPT/RH2) holds either destination or source
address to be mangled in the IPv6 header (that is "CoA").
On Inter-MN communication after both nodes binds each other,
they use route optimized traffic two MIPv6 states applied, and
both source and destination address in the IPv6 header
are replaced by the states respectively.
The packet format is correct, however, next-hop routing search
are not.
This patch fixes it by remembering address pairs for later states.

Based on patch from Masahide NAKAMURA <nakam@linux-ipv6.org>.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:23:57 +09:00
YOSHIFUJI Hideaki df8ea19b5d [XFRM] IPV6: Optimize __xfrm_tunnel_alloc_spi().
| % size old/net/ipv6/xfrm6_tunnel.o new/net/ipv6/xfrm6_tunnel.o
|    text	   data	    bss	    dec	    hex	filename
|    1606	     40	   2080	   3726	    e8e	old/net/ipv6/xfrm6_tunnel.o
|    1574	     40	   2080	   3694	    e6e	new/net/ipv6/xfrm6_tunnel.o

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:23:57 +09:00
YOSHIFUJI Hideaki a002c6fd71 [XFRM] IPV6: Optimize xfrm6_input_addr().
| % size old/net/ipv6/xfrm6_input.o new/net/ipv6/xfrm6_input.o
|    text	   data	    bss	    dec	    hex	filename
|    1026	      0	      0	   1026	    402	old/net/ipv6/xfrm6_input.o
|     947	      0	      0	    947	    3b3	new/net/ipv6/xfrm6_input.o

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:23:56 +09:00
YOSHIFUJI Hideaki 3b6cdf94cd [XFRM] IPV6: Use distribution counting sort for xfrm_state/xfrm_tmpl chain.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-03-25 10:23:56 +09:00
Michael Buesch 7a193a5df7 b43: Remove irqs_disabled() sanity checks
Remove all irqs_disabled() sanity checks, as they are not safe on
a RT-enabled kernel and will trigger bogus warnings.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24 19:25:09 -04:00
Michael Buesch ffa9256aaa b43: Fix DMA mapping leakage
This fixes a DMA mapping leakage in the case where we reject a DMA
buffer because of its address.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24 19:25:09 -04:00
Reinette Chatre c83dbf687f iwlwifi: fix __devexit_p points to __devexit functions
The iwlxxxx_pci_remove functions are not needed when drivers are not
compiled as modules - they can thus be discarded at kernel link time.
This is already captured by having them as __devexit_p in the pci_driver
struct - these are supposed to be pointers to __devexit functions, but was not.
This is now fixed.

This problem was reported by Toralf Forster when testing the compilation of
2.6.25-rc6.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: Toralf Forster <toralf.foerster@gmx.de>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24 19:25:08 -04:00
Reinette Chatre c2c25fb814 MAINTAINERS: update iwlwifi git url
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24 19:25:08 -04:00
John W. Linville 9fe0a8c838 arlan: fix warning when PROC_FS=n
drivers/net/wireless/arlan-proc.c:1216: warning: 'arlan_root_table' defined but not used

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24 19:25:08 -04:00
Rick Farrington a9f46786ec iwlwifi: mac start synchronization issue
This patch fixes a synchronization problem on the 4965 and 3945 with the
mac start callback routine.  The problem is that this function exits BEFORE the
'xxx_alive_start' has completed.  This can lead to a problem if a
subsequent MAC callback attempts to issue a firmware command.

Signed-off-by: Rick Farrington <rickdic@hotmail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24 19:25:08 -04:00
Al Viro ea995abfed wavelan_cs arm fix
Even when all fields are unsigned char, struct still might have
alignment > 1.  Does so on arm, unless you explicitly say that
it's packed...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24 19:25:07 -04:00
Masakazu Mokuno 0a74892b6d rt2x00: Add id for Corega CG-WLUSB2GPX
This adds the id for Corega CG-WLUSB2GPX.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24 19:25:07 -04:00
Pascal Terjan 7c44b6e922 iwlwifi: fix a typo in Kconfig message
Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-24 19:25:07 -04:00
Denis V. Lunev 92f1fecb45 [NETNS]: Enable TCP/UDP/ICMP inside namespace.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-24 15:34:06 -07:00
Denis V. Lunev 2342fd7e14 [NETNS]: Allow to create sockets in non-initial namespace.
Allow to create sockets in the namespace if the protocol ok with this.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-24 15:33:42 -07:00
Denis V. Lunev f145049a06 [NETNS]: Drop packets in the non-initial namespace on the per/protocol basis.
IP layer now can handle multiple namespaces normally. So, process such
packets normally and drop them only if the transport layer is not
aware about namespaces.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-24 15:33:00 -07:00
Denis V. Lunev 0be43f82c4 [NETNS]: Process netfilter hooks in initial namespace only.
There were no packets in the namespace other than initial
previously. This will be changed in the neareast future. Netfilters
are not namespace aware and should be processed in the initial
namespace only for now.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-24 15:32:09 -07:00