cascardo/linux.git
16 years ago[NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found
Jesper Juhl [Fri, 18 Apr 2008 06:22:54 +0000 (23:22 -0700)]
[NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found

dev_get_by_index() may return NULL if nothing is found. In
net/netlabel/netlabel_unlabeled.c::netlbl_unlabel_staticlist_gen() the
function is called, but the return value is never checked. If it returns
NULL then we'll deref a NULL pointer on the very next line.
I checked the callers, and I don't think this can actually happen today,
but code changes over time and in the future it might happen and it does
no harm to be defensive and check for the failure, so that if/when it
happens we'll fail gracefully instead of crashing.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED]: Fix datalen check in tcf_simp_init().
Patrick McHardy [Fri, 18 Apr 2008 06:19:55 +0000 (23:19 -0700)]
[PKT_SCHED]: Fix datalen check in tcf_simp_init().

datalen is unsigned so it can never be less than zero,
but that's ok because the attribute passed to nla_len()
has been validated and therefore a negative return
value is impossible.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[INET]: Uninline the __inet_inherit_port call.
Pavel Emelyanov [Fri, 18 Apr 2008 06:18:15 +0000 (23:18 -0700)]
[INET]: Uninline the __inet_inherit_port call.

This deblats ~200 bytes when ipv6 and dccp are 'y'.

Besides, this will ease compilation issues for patches
I'm working on to make inet hash tables more scalable
wrt net namespaces.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[INET]: Drop the inet_inherit_port() call.
Pavel Emelyanov [Fri, 18 Apr 2008 06:17:34 +0000 (23:17 -0700)]
[INET]: Drop the inet_inherit_port() call.

As I can see from the code, two places (tcp_v6_syn_recv_sock and
dccp_v6_request_recv_sock) that call this one already run with
BHs disabled, so it's safe to call __inet_inherit_port there.

Besides (in case I missed smth with code review) the calltrace
tcp_v6_syn_recv_sock
 `- tcp_v4_syn_recv_sock
     `- __inet_inherit_port
and the similar for DCCP are valid, but assumes BHs to be disabled.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoSCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
Gui Jianfeng [Thu, 17 Apr 2008 21:22:18 +0000 (14:22 -0700)]
SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.

According to RFC4960 7.2.2,
When all of the data transmitted by the sender has
been acknowledged by the recerver, partial_bytes_acked is initialized to 0.

This patch conforms to rfc requirement.
Without this fix, cwnd might be error incremented.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'upstream-net26' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Thu, 17 Apr 2008 21:13:13 +0000 (14:13 -0700)]
Merge branch 'upstream-net26' of /linux/kernel/git/jgarzik/netdev-2.6

16 years ago[netdrvr] forcedeth: internal simplifications; changelog removal
Jeff Garzik [Tue, 16 Oct 2007 05:40:30 +0000 (01:40 -0400)]
[netdrvr] forcedeth: internal simplifications; changelog removal

* remove changelog from source; its kept in git repository

* consolidate descriptor version tests using nv_optimized()

* consolidate NIC DMA start, stop and drain into
  nv_start_txrx(), nv_stop_txrx(), nv_drain_txrx()

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agophylib: factor out get_phy_id from within get_phy_device
Paul Gortmaker [Tue, 15 Apr 2008 16:49:21 +0000 (12:49 -0400)]
phylib: factor out get_phy_id from within get_phy_device

We were already doing what amounts to a get_phy_id from within
get_phy_device, and rather than duplicate this for the TBIPA
probing, we might as well just factor it out and make it available
instead.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoPHY: add BCM5464 support to broadcom PHY driver
Paul Gortmaker [Tue, 15 Apr 2008 03:35:41 +0000 (23:35 -0400)]
PHY: add BCM5464 support to broadcom PHY driver

The BCM5464 can be used with the current broadcom PHY driver
by just adding the appropriate chip ID and using the existing
support within.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agocxgb3: Fix __must_check warning with dev_dbg.
Dan Noe [Sun, 13 Apr 2008 02:34:38 +0000 (22:34 -0400)]
cxgb3: Fix __must_check warning with dev_dbg.

Fix the warning:
drivers/net/cxgb3/cxgb3_main.c: In function ‘offload_open’:
drivers/net/cxgb3/cxgb3_main.c:936: warning: ignoring return value of
 ‘sysfs_create_group’, declared with attribute warn_unused_result

Now the return value is checked; if sysfs_create_group() returns failure,
a warning is printed using dev_dbg, and the code continues as before.  Use
of dev_dbg ensures printk is not needlessly included unless desired for
debugging.

Signed-off-by: Dan Noe <dpn@isomerica.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotc35815: Statistics cleanup
Atsushi Nemoto [Sat, 12 Apr 2008 15:11:46 +0000 (00:11 +0900)]
tc35815: Statistics cleanup

On Sat, 12 Apr 2008 05:00:49 -0400, Jeff Garzik <jeff@garzik.org> wrote:
> applied 1-6

Thanks.

Could you apply this too, or hopufully fold into Andy Fleming's "phy:
Change mii_bus id field to a string" patch (commit c69fedae) ?

------------------------------------------------------
Subject: [PATCH] tc35815: build fix

Fix build failure caused by Andy Fleming's "phy: Change mii_bus id
field to a string" patch.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agonatsemi: fix MMIO for PPC 44x platforms
Sergei Shtylyov [Sat, 12 Apr 2008 16:58:30 +0000 (20:58 +0400)]
natsemi: fix MMIO for PPC 44x platforms

The driver stores the PCI resource address into 'unsigned long' variable before
calling ioremap()  on it. This warrants a kernel oops when the registers are
accessed on PPC 44x platforms which (being 32-bit) have PCI memory space mapped
beyond 4 GB.

The arch/ppc/ kernel has a fixup in ioremap() that creates an illusion of the
PCI memory resources are mapped below 4 GB, but arch/powerpc/ code got rid of
this trick, having instead CONFIG_RESOURCES_64BIT enabled.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Thu, 17 Apr 2008 02:37:51 +0000 (19:37 -0700)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6.26

16 years ago[TIPC]: Cleanup of TIPC reference table code
Allan Stephens [Thu, 17 Apr 2008 01:22:20 +0000 (18:22 -0700)]
[TIPC]: Cleanup of TIPC reference table code

This patch is a largely cosmetic cleanup of the TIPC reference
table code.
- The object reference field in each table entry is now single
  32-bit integer instead of a union of two 32-bit integers.
- Variable naming has been made more consistent.
- Error message output has been made more consistent.
- Useless #includes have been eliminated.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Optimized initialization of TIPC reference table
Allan Stephens [Thu, 17 Apr 2008 01:21:47 +0000 (18:21 -0700)]
[TIPC]: Optimized initialization of TIPC reference table

This patch modifies TIPC's reference table code to delay initializing
table entries until they are actually needed by applications.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Remove inlining of reference table locking routines
Allan Stephens [Thu, 17 Apr 2008 01:21:16 +0000 (18:21 -0700)]
[TIPC]: Remove inlining of reference table locking routines

This patch converts the TIPC reference table locking routines
into non-inlined routines, since they are mainly called from
non-performance critical areas of TIPC and the added code
footprint incurred through inlining can no longer be justified.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoe1000: convert uint16_t style integers to u16
Joe Perches [Thu, 3 Apr 2008 17:06:32 +0000 (10:06 -0700)]
e1000: convert uint16_t style integers to u16

Conglomerate from 4 separate patches from Joe.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoixgb: convert uint16_t style integers to u16
Joe Perches [Thu, 3 Apr 2008 17:06:25 +0000 (10:06 -0700)]
ixgb: convert uint16_t style integers to u16

Conglomerate of 4 separate patches by Joe.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosb1000.c: make const arrays static
Denys Vlasenko [Sun, 30 Mar 2008 23:13:00 +0000 (01:13 +0200)]
sb1000.c: make const arrays static

This patch replaces automatic constant arrays a-la

    const unsigned char Command0[6] = {0x80, 0x16, 0x00, 0x00, 0x00, 0x00};

with static ones. Size difference for 32bit x86:

text  data   bss     dec     hex filename
5418   129     0    5547    15ab linux-2.6.inline-ALLYES/drivers/net/sb1000.o
5396   129     0    5525    1595 linux-2.6.followup-ALLYES/drivers/net/sb1000.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosb1000.c: stop inlining largish static functions
Denys Vlasenko [Sun, 30 Mar 2008 23:02:43 +0000 (01:02 +0200)]
sb1000.c: stop inlining largish static functions

drivers/net/sb1000.c has lots of inlined static functions.

Mst of them are used at initialization, wait for some
hardware register to change (wait using yield, sleep etc),
or do slow port-based I/O. Inlining thse "for speed" makes no sense.

This patch removes "inline" from biggest static function
(regardless of number of callsites - gcc nowadays auto-inlines
statics with one callsite).

Size difference for 32bit x86:

text   data    bss    dec    hex filename
6299    129      0   6428   191c linux-2.6-ALLYES/drivers/net/sb1000.o
5418    129      0   5547   15ab linux-2.6.inline-ALLYES/drivers/net/sb1000.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago#if 0 netxen_nic_link_ok()
Adrian Bunk [Sun, 30 Mar 2008 23:22:14 +0000 (02:22 +0300)]
#if 0 netxen_nic_link_ok()

This patch #if 0's the no longer used netxen_nic_link_ok().

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agomake netxen_workq static
Adrian Bunk [Sun, 30 Mar 2008 23:22:18 +0000 (02:22 +0300)]
make netxen_workq static

netxen_workq can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: keep ip-address after LAN_OFFLINE failure
Ursula Braun [Tue, 1 Apr 2008 08:27:00 +0000 (10:27 +0200)]
qeth: keep ip-address after LAN_OFFLINE failure

Problem:     If setting of an ip-address fails with LAN_OFFLINE,
             qeth does not save the ip-address in its internal
             list of set ip-addresses. qeth recovers after a
             following STARTLAN event, but cannot set the unsaved
             ip-address.
Solution:    save the ip-address in the qeth-maintained list of
             ip-addresses after a LAN_OFFLINE failure for SETIP.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: core code should alloc headroom for LLC protocol
Frank Blaschka [Tue, 1 Apr 2008 08:26:59 +0000 (10:26 +0200)]
qeth: core code should alloc headroom for LLC protocol

Allocate headroom for TR_HLEN but using only ETH_HLEN causes rx
performance degradation. Allocate ETH_HLEN for ethernet and
TR_HLEN for token ring (layer 3 mode).

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: improving debug message handling
Peter Tiedemann [Tue, 1 Apr 2008 08:26:58 +0000 (10:26 +0200)]
qeth: improving debug message handling

Improving debug message handling, moving ipa into messages from kernel
to dbf, some cleanups and typo fixes.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: layer 3 do not allow to change mac address
Frank Blaschka [Tue, 1 Apr 2008 08:26:57 +0000 (10:26 +0200)]
qeth: layer 3 do not allow to change mac address

hw does not allow to change the mac address.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: CCL-sequence numbers required for protocol ETH_P_802_2 only
Ursula Braun [Tue, 1 Apr 2008 08:26:56 +0000 (10:26 +0200)]
qeth: CCL-sequence numbers required for protocol ETH_P_802_2 only

Symptom:     slow CCL response time
Problem:     non-ETH_P_802_2 packets are not delivered to NDH for
             CCL. But CCL detects missing sequence numbers, which
             cause a serious performance problem with CCL.
Solution:    assign sequence numbers only to 802.2 packets.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: set lan_online flag after a received STARTLAN
Ursula Braun [Tue, 1 Apr 2008 08:26:55 +0000 (10:26 +0200)]
qeth: set lan_online flag after a received STARTLAN

Problem:     A STARTLAN command from the adapter may arrive while a
             qeth recovery is currently running with a failed qeth
             STARTLAN. Usually qeth schedules a recovery when
             receiving a STARTLAN command from the adapter. But
             another recovery scheduled while a recovery is already
             running never starts. Thus the qeth-administered
             lan_online flag remains zero in this scenario, even
             though the adapter-STARTLAN has happened.
Solution:    Set lan_online flag for a received STARTLAN from the
             adapter in case scheduled recovery does not start.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: allow qdio queue element addresses > 2GB
Ursula Braun [Tue, 1 Apr 2008 08:26:54 +0000 (10:26 +0200)]
qeth: allow qdio queue element addresses > 2GB

OSA-adapters do not have an address limitation for the qdio queue
structures except the MAX storage level of the current processor.
And due to a recent z/VM APAR there is no longer a restriction to
allocate qdio structures below 2 GB.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqeth: improve ip_list administration after deregister failures
Ursula Braun [Tue, 1 Apr 2008 08:26:53 +0000 (10:26 +0200)]
qeth: improve ip_list administration after deregister failures

1. ip_list handling after deregister failure of multicast address:
   If error code "MC Address not found" is returned do not re-add
   multicast address to ip_list.
   For other error codes readd multicast address at the end of
   function qeth_delete_all_mc.
2. ip_list handling after deregister failure or normal ip address:
   If error code "IP Address not found" is returned do not re-add
   multicast address to ip list.
   This is especially important in IP address takeover scenarios,
   to enable re-takeover of a taken over IP address.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: reformat register test code, fix some minor initialization
Bruce Allan [Wed, 2 Apr 2008 20:48:23 +0000 (13:48 -0700)]
e1000e: reformat register test code, fix some minor initialization

The register tests should be run with all the proper flags enabled
to maximize the test coverage code and make sure we are as close
as we can get to testing regular traffic.

Reformat the code for readability. Minor cleanups in the descriptor
ring setup.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: rename a few functions
Jeff Kirsher [Wed, 2 Apr 2008 20:48:18 +0000 (13:48 -0700)]
e1000e: rename a few functions

Several minor cosmetic function renames.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: Make arrays out of these Rx/Tx registers
Jeff Kirsher [Wed, 2 Apr 2008 20:48:13 +0000 (13:48 -0700)]
e1000e: Make arrays out of these Rx/Tx registers

With multiple queues coming into the code these base control
registers need to be made into arrays.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: limit EEPROM size accesses
Jeff Kirsher [Wed, 2 Apr 2008 20:48:07 +0000 (13:48 -0700)]
e1000e: limit EEPROM size accesses

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosc92031: use netdev_alloc_skb
Stephen Hemminger [Wed, 2 Apr 2008 17:13:12 +0000 (10:13 -0700)]
sc92031: use netdev_alloc_skb

Use netdev_alloc_skb since it handles any NUMA node memory localtion issues
and sets skb->dev. Since device driver was not setting skb->dev, I bet
filter rules based on device would not work.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosc92031: start transmit return value bugfix
Stephen Hemminger [Wed, 2 Apr 2008 17:11:11 +0000 (10:11 -0700)]
sc92031: start transmit return value bugfix

Any negative return value from start_xmit is interpreted as NETDEV_TX_LOCK
which is not what this driver wants. It should return 0 (NETDEV_TX_OK)
when it consumes a packet.

Also, use skb_padto() as the generic way to pad small frames.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosc92031: use net_device stats
Stephen Hemminger [Wed, 2 Apr 2008 17:11:20 +0000 (10:11 -0700)]
sc92031: use net_device stats

Statistics structure is available for use in net_device structure.
Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] tulip: Better MWI workaround for 21143 rev 65 chip errata
Peter Horton [Tue, 25 Mar 2008 11:39:09 +0000 (12:39 +0100)]
[netdrvr] tulip: Better MWI workaround for 21143 rev 65 chip errata

This patch works around the MWI bug on the DC21143 rev 65 Tulip by
ensuring that the receive buffers don't end on a cache line boundary
(as documented in the errata).

This patch is required for the MIPS based Cobalt Qube/RaQ as
supporting the extra PCI commands seems to reduce the chance of a hard
lockup between the Tulip and the PCI bridge.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] tulip/winbond-840: don't let tulip.h symbol stomp ours
Jeff Garzik [Thu, 17 Apr 2008 00:37:24 +0000 (20:37 -0400)]
[netdrvr] tulip/winbond-840: don't let tulip.h symbol stomp ours

winbond-840 shares tulip.h with the tulip driver, because they share
many (but not all) of the same register definitions.

This is useful for the register definitions, but not helpful when it
comes to symbols that are shared among the tulip driver's C modules,
but not meant to be shared outside that one driver.

Thus, PKT_BUF_SZ is a symbol internal to tulip, but it was intruding
upon a similar symbol in winbond-840's namespace.  This was not a
problem as long as the two symbols had the same value, but upcoming
patches result in differing symbol values.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agodrivers/net/bonding/bond_main.c - remove unnecessary #define
Joe Perches [Thu, 10 Apr 2008 21:39:30 +0000 (14:39 -0700)]
drivers/net/bonding/bond_main.c - remove unnecessary #define

bond_main.c already #includes <linux/seq_file.h>

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agophy: Clean up header style
Andy Fleming [Thu, 10 Apr 2008 00:38:27 +0000 (19:38 -0500)]
phy: Clean up header style

Multi-line comments weren't all CodingStyle compliant

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agophy: Change mii_bus id field to a string
Andy Fleming [Thu, 10 Apr 2008 00:38:13 +0000 (19:38 -0500)]
phy: Change mii_bus id field to a string

Having the id field be an int was making more complex bus topologies
excessively difficult.  For now, just convert it to a string, and
change all instances of "bus->id = val" to
snprintf(id, MII_BUS_ID_LEN, "%x", val).

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agogianfar: Support NAPI for TX Frames
Dai Haruki [Thu, 10 Apr 2008 00:37:51 +0000 (19:37 -0500)]
gianfar: Support NAPI for TX Frames

Poll the completed TX frames in gfar_poll().  This prevents the tx
completion interrupt from interfering with processing of received
frames.

We also disable hardware rx coalescing when NAPI is enabled.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agospidernet: revise link status logging
Ishizaki Kou [Fri, 11 Apr 2008 03:33:53 +0000 (12:33 +0900)]
spidernet: revise link status logging

This patch revises the logging for link informations of spidernet.

  - The link down message is too verbose because auto-negotiation timeout
    occurs periodically while an ethernet cable is not connected.
  - We want to see the link result, and we think it should be displayed.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agospidernet: fix error interrupt handling
Ishizaki Kou [Fri, 11 Apr 2008 03:32:30 +0000 (12:32 +0900)]
spidernet: fix error interrupt handling

In addition to the value of GHIINT0STS, spidernet interrupt handler
should check the values of GHIINT1STS/GHIINT2STS registers at the
beginning of spider_net_interrupt() so as not to drop error
interrupts.

GHIINT1STS/GHIINT2STS registers indicates some of erroneous conditions
in spidernet, and a few bits of GHIINT0STS register reflects these
conditions. But GHIINT0MSK masks these bits, so you should check these
conditions by reading GHIINT1STS/GHIINT2STS registers directly.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agospidernet: change interrupt masks
Ishizaki Kou [Fri, 11 Apr 2008 03:30:46 +0000 (12:30 +0900)]
spidernet: change interrupt masks

This patch changes spidernet interrupt masks.

 - unmask GDAINVAINT. There is an operation to do by spidernet
   interrupt handler.
 - mask some interrupts. There are no operations in the interrupt handler.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agospidernet: increase auto-negotiation timeout to 5 seconds
Ishizaki Kou [Fri, 11 Apr 2008 03:29:20 +0000 (12:29 +0900)]
spidernet: increase auto-negotiation timeout to 5 seconds

This patch extends the timeout for spidernet auto-negotiation.
Auto-negotiation often fails to finish in 2 seconds.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agospidernet: add missing initialization
Ishizaki Kou [Fri, 11 Apr 2008 03:27:34 +0000 (12:27 +0900)]
spidernet: add missing initialization

This patch fixes initialization of "aneg_count" and "medium" fields in
spider_net_card to make spidernet driver correctly sets "link status".

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotc35815: Whitespace cleanup
Atsushi Nemoto [Thu, 10 Apr 2008 15:25:31 +0000 (00:25 +0900)]
tc35815: Whitespace cleanup

Cosmetic TAB/whitespace cleanups and some style cleanups.  No
functional changes.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotc35815: Use generic PHY layer
Atsushi Nemoto [Fri, 11 Apr 2008 15:47:46 +0000 (00:47 +0900)]
tc35815: Use generic PHY layer

Convert the tc35815 driver to use the generic PHY layer in
drivers/net/phy.  Also rename 'boardtype' to 'chiptype' which hould be
more appropriate.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotc35815: Use managed pci iomap helper
Atsushi Nemoto [Thu, 10 Apr 2008 15:24:45 +0000 (00:24 +0900)]
tc35815: Use managed pci iomap helper

Use managed pci functions and kill unnecessary volatiles.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotc35815: Use netdev_priv()
Atsushi Nemoto [Thu, 10 Apr 2008 15:24:36 +0000 (00:24 +0900)]
tc35815: Use netdev_priv()

Use netdev_priv() instead of dev->priv.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotc35815: Use print_mac() helper
Atsushi Nemoto [Thu, 10 Apr 2008 15:24:24 +0000 (00:24 +0900)]
tc35815: Use print_mac() helper

Use print_mac() and DECLARE_MAC_BUF().

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotc35815: Statistics cleanup
Atsushi Nemoto [Thu, 10 Apr 2008 15:24:12 +0000 (00:24 +0900)]
tc35815: Statistics cleanup

Use struct net_device_stats embedded in struct net_device.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agomv643xx_eth: update copyright
Lennert Buytenhek [Tue, 18 Mar 2008 18:40:14 +0000 (11:40 -0700)]
mv643xx_eth: update copyright

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
16 years agomv643xx_eth: only print banner once
Lennert Buytenhek [Tue, 18 Mar 2008 18:39:14 +0000 (11:39 -0700)]
mv643xx_eth: only print banner once

When there are multiple mv643xx_eth silicon blocks in the system,
don't print an initialisation message for each and every one of
them.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
16 years agomv643xx_eth: pass port identifier to register accessors
Lennert Buytenhek [Tue, 18 Mar 2008 18:38:05 +0000 (11:38 -0700)]
mv643xx_eth: pass port identifier to register accessors

Pass a struct mv643xx_private * to the register accessor functions,
as a preparation for having multiple mv643xx_eth silicon blocks.

(Since this causes some 80 column straddling, and the mv_ prefix
is useless anyway, rename mv_read to rdl and mv_write to wrl to
compensate.)

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
16 years agomv643xx_eth: report netdev name in all printks
Lennert Buytenhek [Tue, 18 Mar 2008 18:37:19 +0000 (11:37 -0700)]
mv643xx_eth: report netdev name in all printks

In error and warning printks, always report the netdevice name
instead of the port index (the latter has no meaning when there
are multiple mv643xx_eth silicon blocks in the system.)

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
16 years agomv643xx_eth: identify ports by struct mv643xx_private *
Lennert Buytenhek [Tue, 18 Mar 2008 18:36:08 +0000 (11:36 -0700)]
mv643xx_eth: identify ports by struct mv643xx_private *

Instead of identifying individual mv643xx ethernet ports by only
their port number, identify them by their struct mv643xx_private *,
as just a port number has no meaning when there are multiple
mv643xx_eth silicon blocks in the system.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
16 years agomv643xx_eth: various cleanups
Lennert Buytenhek [Tue, 18 Mar 2008 18:34:34 +0000 (11:34 -0700)]
mv643xx_eth: various cleanups

- Remove unused MV643XX_DEFAULT_[RT]X_QUEUE_SIZE definitions.
- Remove ETH_TARGET enum -- it isn't used anywhere in the driver,
  and isn't even valid for non-mv643xx chip models, as those use
  different MBUS target IDs.
- Clean up comment and control flow in mv643xx_eth_change_mtu().
- Use mp->dev instead of mp->mii.dev in mv643xx_eth_tx_timeout_task().
- Make mv643xx_eth_free_tx_descs() static.
- Remove overzealous NULL check in mv643xx_eth_start_xmit().
- Use symbolic NETDEV_TX_* constants in mv643xx_eth_start_xmit().

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
16 years agomv643xx_eth: mp->tx_desc_count needs spinlock protection
Lennert Buytenhek [Tue, 18 Mar 2008 18:32:41 +0000 (11:32 -0700)]
mv643xx_eth: mp->tx_desc_count needs spinlock protection

mv643xx_eth_start_xmit() should check mp->tx_desc_count only
inside the mp->lock spinlock.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
16 years agomac80211: rework scanning to account for probe response/beacon difference
Johannes Berg [Wed, 16 Apr 2008 15:43:20 +0000 (17:43 +0200)]
mac80211: rework scanning to account for probe response/beacon difference

This patch reworks the scanning code (ieee80211_rx_bss_info) to take
more parameters from beacons and keep a BSS info structure alive when
only beacons for it are received. This fixes a problem with iwlwifi
drivers (where we don't understand the root cause of the problem yet)
and another driver for some broken hardware (which cannot send probe
requests unless associated, so can't always actively scan.)

Signed-off-by: Bill Moss <bmoss@clemson.edu>
[jmberg: reformatted comments, make probe_resp a bool]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Misc fixes/cleanups
Nick Kossifidis [Wed, 16 Apr 2008 15:49:02 +0000 (18:49 +0300)]
ath5k: Misc fixes/cleanups

*Handle MIB interrupts and pass low level stats to mac80211
*Add Power On Self Test function
*Update to match recent dumps
*Let RF2425 attach so we can further test it
*Remove unused files regdom.c and regdom.h

base.c
Changes-licensed-under: 3-clause-BSD

rest
Changes-licensed-under: ISC

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Add RF2425 initvals
Nick Kossifidis [Wed, 16 Apr 2008 15:42:48 +0000 (18:42 +0300)]
ath5k: Add RF2425 initvals

*Add RF2425 initvals (still no rx/tx)

This was on my laptop for a long time so it has to go out even if
it still doesn't work, i hope i'll get my hands on an eeepc so i can
work this out.

base.c
Changes-licensed-under: 3-clause-BSD

rest
Changes-licensed-under: ISC

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Use HW acceleration decryption by default
Emmanuel Grumbach [Tue, 15 Apr 2008 23:01:47 +0000 (16:01 -0700)]
iwlwifi: Use HW acceleration decryption by default

This patch reverses the hw_crypto logic and makes HW crypto a default.
Giving swcrypto=1 as parameter to the module disables HW crypto.

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>
16 years agoiwlwifi: fix unload warning and error
Mohamed Abbas [Tue, 15 Apr 2008 23:01:46 +0000 (16:01 -0700)]
iwlwifi: fix unload warning and error

This patch fix the error we get when unload the driver, No space for Tx.
The cause of this problem is related to receiving late SW rfkill from
rfkill subsystem during the driver teardown causing this error.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: arrange max number of Tx queues
Ron Rindjunsky [Tue, 15 Apr 2008 23:01:45 +0000 (16:01 -0700)]
iwlwifi: arrange max number of Tx queues

This patch increases the max possible number of Tx queues, but leaves
current used number of queues as HW dependent

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Fix TKIP update key and get_free_ucode_key
Emmanuel Grumbach [Tue, 15 Apr 2008 23:01:44 +0000 (16:01 -0700)]
iwlwifi: Fix TKIP update key and get_free_ucode_key

This patch fixes a bug in update_tkip_key: only one key needs to be
allocated in uCode, every time it is updated, the old one will be
overwritten

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>
16 years agoiwlwifi: move rxon associated command to hcmd
Tomas Winkler [Tue, 15 Apr 2008 23:01:43 +0000 (16:01 -0700)]
iwlwifi: move rxon associated command to hcmd

This patch run rxon associated command from hcmd handler

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>
16 years agoiwlwifi: introduce host commands callbacks
Tomas Winkler [Tue, 15 Apr 2008 23:01:42 +0000 (16:01 -0700)]
iwlwifi: introduce host commands callbacks

This patch adds place holder for host command handlers
for supporting different implementations per 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>
16 years agoiwlwifi: move HW device registration
Ron Rindjunsky [Tue, 15 Apr 2008 23:01:41 +0000 (16:01 -0700)]
iwlwifi: move HW device registration

This patch moves the HW device registration from the iwl-4965.c file, which
implies a HW specific support, to a more general location.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: move the creation of LQ host command to iwlcore
Tomas Winkler [Tue, 15 Apr 2008 23:01:40 +0000 (16:01 -0700)]
iwlwifi: move the creation of LQ host command to iwlcore

This patch moves creation of LQ host command to iwlcore
from previous location in rate scaling.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: support different num of tx and rx antennas
Tomas Winkler [Tue, 15 Apr 2008 23:01:39 +0000 (16:01 -0700)]
iwlwifi: support different num of tx and rx antennas

This patch adds infrastructure for supporting different
number of tx and rx antennas

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>
16 years agoiwlwifi: hw_setting cleanup
Tomas Winkler [Tue, 15 Apr 2008 23:01:38 +0000 (16:01 -0700)]
iwlwifi: hw_setting cleanup

1. This patch renames hw_setting to hw_params
2. Align names of the structure and variables
3. set_hw_params is called from libs_ops

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>
16 years agoiwlwifi: remove the statistics work
Emmanuel Grumbach [Tue, 15 Apr 2008 23:01:37 +0000 (16:01 -0700)]
iwlwifi: remove the statistics work

This patch does 3 things

1) It removes the statistics work. The request statistics command is
sent in ASYNC mode in this flow, the mutex is uneeded, so the request
statistics function can't go to sleep. No need for a workqueue anymore.

2) iwl4965_send_statistics_request has been renamed to
iwl_send_statistics_request and moved to iwl-core.c

3) A request for statistics is sent in alive_notify, the makes the uCode
sends statistics notification periodically starting from association.

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>
16 years agob43: Add fastpath to b43_mac_suspend()
Michael Buesch [Tue, 15 Apr 2008 19:13:36 +0000 (21:13 +0200)]
b43: Add fastpath to b43_mac_suspend()

This adds a fastpath for the common workloads to the
MAC suspend flushing.
In common workloads the FIFO flush will take between 100 and
200 microseconds. So we want to avoid calling msleep() in the
common case, as it will waste over 800 microseconds + scheduler
overhead.

This fastpath will hit in workloads where only small chunks
of data are transmitted (downloading a file) or when a TX rate bigger
or equal to 24MBit/s is used when transmitting lots of stuff (iperf).
So in the commonly used workloads it will basically always hit.

In case the fastpath is not hit, there's no real performance or latency
disadvantage from that.

And yes, I measured this. So this is not one of these
bad Programmer Likeliness Assumptions that are always wrong. ;)

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: move shared pointers to iwl_priv
Tomas Winkler [Tue, 15 Apr 2008 04:16:14 +0000 (21:16 -0700)]
iwlwifi: move shared pointers to iwl_priv

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>
16 years agoiwlwifi: perform bss_info_changed post association work right away
Reinette Chatre [Tue, 15 Apr 2008 04:16:13 +0000 (21:16 -0700)]
iwlwifi: perform bss_info_changed post association work right away

Do not use workqueue for bss_info_changed post association work.
When driver is notified of association the upper layer will be notified
right after that the association is complete. Doing the post association
work in a workqueue introduces a race condition where the upper layer may
want to make use of the association, but it is not yet complete.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: make Makefile more concise
Reinette Chatre [Tue, 15 Apr 2008 04:16:12 +0000 (21:16 -0700)]
iwlwifi: make Makefile more concise

Also change CONFIG_IWLCORE_RFKILL to CONFIG_IWLWIFI_RFKILL to
be more consistent with other config variables.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwl4965: make iwl4965_send_rxon_assoc asynchronous
Reinette Chatre [Tue, 15 Apr 2008 04:16:11 +0000 (21:16 -0700)]
iwl4965: make iwl4965_send_rxon_assoc asynchronous

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Fix byte count table for fragmented packets
Tomas Winkler [Tue, 15 Apr 2008 04:16:10 +0000 (21:16 -0700)]
iwlwifi: Fix byte count table for fragmented packets

This patch fix byte count table update. Table must be updated for each
fragment

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>
16 years agoiwlwifi: moves security functions to iwl-sta.c
Emmanuel Grumbach [Tue, 15 Apr 2008 04:16:09 +0000 (21:16 -0700)]
iwlwifi: moves security functions to iwl-sta.c

This patch moves security related functions to iwl-sta.c.
Note that iwl4965_mac_update_tkip_key is still in iwl4965-base.c since it
is a mac80211 handler.

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>
16 years agoiwlwifi: maintain uCode key table state
Emmanuel Grumbach [Tue, 15 Apr 2008 04:16:08 +0000 (21:16 -0700)]
iwlwifi: maintain uCode key table state

This patch fix book keeping of key table in the driver
to be synchronized with uCode

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>
16 years agoiwlwifi: add 1X HW WEP support
Emmanuel Grumbach [Tue, 15 Apr 2008 04:16:07 +0000 (21:16 -0700)]
iwlwifi: add 1X HW WEP support

This patch adds support for HW encryption/decryption in 1X WEP.

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>
16 years agoiwlwifi: default WEP HW encryption
Emmanuel Grumbach [Tue, 15 Apr 2008 04:16:06 +0000 (21:16 -0700)]
iwlwifi: default WEP HW encryption

This patch adds HW encryption support in default WEP mode.
When no key mapping key/pairwise key is used. The key is broadcast key
is used as default/global/static key.
This code assumes that group cast key is added after pairwise key.

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>
16 years agoiwlwifi: add default WEP key host command
Emmanuel Grumbach [Tue, 15 Apr 2008 04:16:05 +0000 (21:16 -0700)]
iwlwifi: add default WEP key host command

This patch adds declaration for static WEP host command. This command will
be used for default WEP group keys when no key mapping keys are used.

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>
16 years agoiwlwifi: replace sprintf with scnprintf for debugfs output
Abhijeet Kolekar [Tue, 15 Apr 2008 04:16:04 +0000 (21:16 -0700)]
iwlwifi: replace sprintf with scnprintf for debugfs output

The buffersize allocated is not accurate.
Writing to these buffers with scnprintf is safer.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: generalize iwlwifi init flow
Tomas Winkler [Tue, 15 Apr 2008 04:16:03 +0000 (21:16 -0700)]
iwlwifi: generalize iwlwifi init flow

This patch creates handlers to support
iwlwifi init flow for multiple HWs

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: allow WDS mode
Johannes Berg [Mon, 14 Apr 2008 13:37:03 +0000 (15:37 +0200)]
mac80211: allow WDS mode

This allows creating interfaces in WDS mode or switching
existing ones into WDS mode (both via cfg80211 and wext.)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43legacy: fix TBTT and PU timings
Stefano Brivio [Sun, 13 Apr 2008 22:57:03 +0000 (00:57 +0200)]
b43legacy: fix TBTT and PU timings

This fixes some timings for pre-TBTT and synthetic PU.
The patch by Michael Buesch has been ported to b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix key todo list order
Johannes Berg [Sun, 13 Apr 2008 08:43:50 +0000 (10:43 +0200)]
mac80211: fix key todo list order

When we add multiple todo entries, we rely on them being executed
mostly in the right order, especially when a key is being replaced.
But when a default key is replaced, the todo list order will differ
from the order when the key being replaced is not a default key, so
problems will happen. Hence, just move each todo item to the end of
the list when it is added so we can in the other code ensure that
hw accel for a key will be disabled before it is enabled for the
replacement.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix spinlock recursion
Johannes Berg [Fri, 11 Apr 2008 19:40:35 +0000 (21:40 +0200)]
mac80211: fix spinlock recursion

When STAs are expired, we need to hold the sta_lock. Using
the same lock for keys too would then mean we'd need another
key free function, and that'll just lead to confusion, so just
use a new spinlock for all key lists.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoproc: switch /proc/driver/ray_cs/ray_cs to seq_file interface
Alexey Dobriyan [Thu, 10 Apr 2008 21:34:35 +0000 (14:34 -0700)]
proc: switch /proc/driver/ray_cs/ray_cs to seq_file interface

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: no BSS changes to driver from beacons processed during scanning
Reinette Chatre [Wed, 9 Apr 2008 23:56:15 +0000 (16:56 -0700)]
mac80211: no BSS changes to driver from beacons processed during scanning

There is no need to send BSS changes to driver from beacons processed
during scanning. We are more interested in beacons from an AP with which
we are associated - these will still be used to send updates to driver as
the beacons are received without scanning.

This change·removes the requirement that bss_info_changed needs to be atomic.
The beacons received during scanning are processed from a tasklet, but if we
do not call bss_info_changed for these beacons there is no need for it to be
atomic. This function (bss_info_changed) is called either from workqueue or
ioctl in all other instances.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: un-garbage various command structs
Holger Schurig [Wed, 9 Apr 2008 08:23:31 +0000 (10:23 +0200)]
libertas: un-garbage various command structs

Some command structs contain reserved or unused fields, which the driver
send uninitialized down to the card.

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>
16 years agolibertas: convert libertas driver to use an event/cmdresp queue
Holger Schurig [Tue, 1 Apr 2008 12:50:43 +0000 (14:50 +0200)]
libertas: convert libertas driver to use an event/cmdresp queue

This patch (co-developed by Dan Williams and Holger Schurig) uses a kfifo
object for events and a swapping buffer scheme for the command response to
preserve the zero-copy semantics of the CF driver and keep memory usage low.
The main thread should only ever touch the buffer indexed by priv->resp_idx,
while the interface code is free to write to the second buffer, then swap
priv->resp_idx under the driver spinlock.  The firmware specs only permit
one in-flight command, so there will only ever be one command response to
process at a time.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: further RCU fixes
Johannes Berg [Thu, 10 Apr 2008 13:36:09 +0000 (15:36 +0200)]
mac80211: further RCU fixes

There were a few more instances of sta_info_get calls not being
protected by RCU, fix them.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Only free skb when beacon_update fails
Ivo van Doorn [Wed, 9 Apr 2008 18:46:27 +0000 (20:46 +0200)]
rt2x00: Only free skb when beacon_update fails

In rt2x00lib_intf_scheduled_iter() we use the hw->beacon_update()
callback function. This means that it should behave similarly as mac80211
when that uses the function.

This means that the skb should only be freed when beacon_update() has failed,
otherwise the driver is the owner and is responsible for freeing the buffer.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix key hwaccel race
Johannes Berg [Wed, 9 Apr 2008 14:45:37 +0000 (16:45 +0200)]
mac80211: fix key hwaccel race

The previous key locking patch left a small race: it would be possible
to add a key and take the interface down before the key todo is run so
that hwaccel for that key is enabled on an interface that is down. Avoid
this by running the todo list when an interface is brought up or down.

This patch also fixes a small bug: before this change, a few functions
used the key list without the lock that protects it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agossb-pcicore: Remove b44 TPS flag workaround
Michael Buesch [Tue, 8 Apr 2008 08:31:22 +0000 (10:31 +0200)]
ssb-pcicore: Remove b44 TPS flag workaround

Now that we fixed the TPS flag assignment in commit
b63009b456c8d9abe684bdf8d4bd8f27eb040019
we don't need the workaround for the bcm44xx chip anymore.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>