GitHub/LineageOS/android_kernel_motorola_exynos9610.git
14 years agobnx2: Flush the register writes which setup the MSI-X table
Benjamin Li [Fri, 8 Jan 2010 08:51:21 +0000 (00:51 -0800)]
bnx2: Flush the register writes which setup the MSI-X table

The MSI-X table size needs to be properly set before pci_enable_msix()
is called.  But on certain machines, the writes are delayed and the
MSI-X table size is incorrectly read.  By reading the
BNX2_PCI_MSIX_CONTROL register, the writes are flushed and now
ensure that the MSI-X table is set correctly before MSI-X
is enable on the device.

This patch was originally diagnosed and authored by
Kalyan Ram Chintalapati <kalyanc@vmware.com>.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Kalyan Ram Chintalapati <kalyanc@vmware.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: implements ethtool function to read eeprom data.
Sarveshwar Bandi [Fri, 8 Jan 2010 08:07:27 +0000 (00:07 -0800)]
be2net: implements ethtool function to read eeprom data.

The patch implements a firmware command to fetch the eeprom data.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/: use DEFINE_PCI_DEVICE_TABLE()
Alexey Dobriyan [Thu, 7 Jan 2010 11:58:11 +0000 (11:58 +0000)]
drivers/net/: use DEFINE_PCI_DEVICE_TABLE()

Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section
in every case.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: update the driver's module version
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:23 +0000 (23:07 +0000)]
stmmac: update the driver's module version

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: improve Kconfig help
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:22 +0000 (23:07 +0000)]
stmmac: improve Kconfig help

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: include netdevice.h into the common.h header
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:21 +0000 (23:07 +0000)]
stmmac: include netdevice.h into the common.h header

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: rename the gmac as dwmac1000 and split core and dma parts
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:20 +0000 (23:07 +0000)]
stmmac: rename the gmac as dwmac1000 and split core and dma parts

Use dwmac1000 naming instead of gmac.
The patch also splits the gmac.c file in two new ones:
dwmac1000_core.c and dwmac1000_dma.c.
This could actually help on some architectures where different
DMA engines are used.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: rename mac100 as dwmac100 and fix spare coding style
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:19 +0000 (23:07 +0000)]
stmmac: rename mac100 as dwmac100 and fix spare coding style

This patch renames the mac100.[ch] as dwmac100.[ch]; this
looks more specific and appropriate for these chip series.
The patch also fixes some spare coding style issues.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: move the dma out from the main
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:18 +0000 (23:07 +0000)]
stmmac: move the dma out from the main

This patch moves the dma related functions (interrupt, start, stop etc.)
out from the main driver code. This will help to support new DMA
engines.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: reorganise class operations.
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:17 +0000 (23:07 +0000)]
stmmac: reorganise class operations.

This patch reorganises the internal stmmac ops structure.
The stmmac_ops has been splitted into other three structures named:
 stmmac_ops
 stmmac_dma_ops
 stmmac_desc_ops

This makes the code more clear and also helps the next work to
make the driver more generic.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: do not call fix_mac_speed if NULL
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:16 +0000 (23:07 +0000)]
stmmac: do not call fix_mac_speed if NULL

On some platforms, fix_mac_speed is used for
configuring some sysconf registers according
to the working speed.
This patch fixes the fix_mac_speed invocation
that cannot be done if it is a NULL pointer.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: perform hw bus configuration
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:15 +0000 (23:07 +0000)]
stmmac: perform hw bus configuration

On some platforms it can be required a different
configuration of the bus. This can be done
by invoking the bus_setup. It is defined
for all the platforms that needs this kind of
configuration.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: rewiew platform data
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:14 +0000 (23:07 +0000)]
stmmac: rewiew platform data

This patch rewiews and reorganises all the data
come from the platform removing any dependency
from the stm code.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: add the new Header file for stmmac platform data
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:13 +0000 (23:07 +0000)]
stmmac: add the new Header file for stmmac platform data

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: convert unicast addr list to list_head
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:12 +0000 (23:07 +0000)]
stmmac: convert unicast addr list to list_head

This patch converts unicast address list to standard list_head using
previously introduced struct netdev_hw_addr.

Note: this patch also removes a debug printk used for displaying the
mac addresses. Indeed, it's is possible to dump the registers with
ethtool.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostmmac: use MII_BUS_ID_SIZE instead of BUS_ID_SIZE
Giuseppe CAVALLARO [Wed, 6 Jan 2010 23:07:11 +0000 (23:07 +0000)]
stmmac: use MII_BUS_ID_SIZE instead of BUS_ID_SIZE

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/skfp/skfddi.c: use %pMF to show MAC address
hartleys [Thu, 7 Jan 2010 13:27:46 +0000 (13:27 +0000)]
drivers/net/skfp/skfddi.c: use %pMF to show MAC address

Use the %pMF kernel extension to display the MAC address.

The address will still be displayed in the FDDI Canonical format.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/defxx.c: use %pMF to show MAC address
hartleys [Thu, 7 Jan 2010 13:24:19 +0000 (13:24 +0000)]
drivers/net/defxx.c: use %pMF to show MAC address

Use the %pMF kernel extension to display the MAC address.

The address will still be displayed in the FDDI Canonical format.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agolib/vsprintf.c: Add %pMF to format FDDI bit reversed MAC addresses
Joe Perches [Thu, 7 Jan 2010 11:43:50 +0000 (11:43 +0000)]
lib/vsprintf.c: Add %pMF to format FDDI bit reversed MAC addresses

On Mon, 2010-01-04 at 23:43 +0000, Maciej W. Rozycki wrote:
> The example below shows an address, and the sequence of bits or symbols
> that would be transmitted when the address is used in the Source Address
> or Destination Address fields on the MAC header.  The transmission line
> shows the address bits in the order transmitted, from left to right.  For
> IEEE 802 LANs these correspond to actual bits on the medium.  The FDDI
> symbols line shows how the FDDI PHY sends the address bits as encoded
> symbols.
>
>         MSB:            35:7B:12:00:00:01
>         Canonical:      AC-DE-48-00-00-80
>         Transmission:   00110101 01111011 00010010 00000000 00000000 00000001
>         FDDI Symbols:   35 7B 12 00 00 01"
>
> Please note that this address has its group bit clear.
>
>  This notation is also defined in the "FDDI MEDIA ACCESS CONTROL-2
> (MAC-2)" (X3T9/92-120) document although that book does not have a need
> to use the MSB form and it's skipped.

Adds 6 bytes to object size for x86

New:
$ size lib/vsprintf.o
   text    data     bss     dec     hex filename
   8664       0       2    8666    21da lib/vsprintf.o
$ size lib/vsprintf.o
   text    data     bss     dec     hex filename
   8658       0       2    8660    21d4 lib/vsprintf.o

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/message/i2o/i2o_proc.c: use %pM to show MAC address
H Hartley Sweeten [Thu, 7 Jan 2010 09:18:23 +0000 (01:18 -0800)]
drivers/message/i2o/i2o_proc.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/infiniband/hw/cxgb3/iwch_cm.c: use %pM to show MAC address
H Hartley Sweeten [Thu, 7 Jan 2010 09:17:27 +0000 (01:17 -0800)]
drivers/infiniband/hw/cxgb3/iwch_cm.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wimax/i2400m/driver.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 07:00:57 +0000 (07:00 +0000)]
drivers/net/wimax/i2400m/driver.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/qlge/qlge_main.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:58:12 +0000 (06:58 +0000)]
drivers/net/qlge/qlge_main.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/atl1e/atl1e_main.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:55:40 +0000 (06:55 +0000)]
drivers/net/atl1e/atl1e_main.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wimax/i2400m/fw.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 07:01:54 +0000 (07:01 +0000)]
drivers/net/wimax/i2400m/fw.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/atl1c/atl1c_main.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:54:01 +0000 (06:54 +0000)]
drivers/net/atl1c/atl1c_main.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/vxge/vxge-main.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:59:23 +0000 (06:59 +0000)]
drivers/net/vxge/vxge-main.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/media/dvb/dvb-core/dvb_net.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:45:21 +0000 (06:45 +0000)]
drivers/media/dvb/dvb-core/dvb_net.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address and mask.

The only difference in the output is that the output is shown in
the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/atm/lanai.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:26:49 +0000 (06:26 +0000)]
drivers/atm/lanai.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/atm/fore200e.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:22:20 +0000 (06:22 +0000)]
drivers/atm/fore200e.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/firmware/iscsi_ibft.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:37:43 +0000 (06:37 +0000)]
drivers/firmware/iscsi_ibft.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Also, remove the 'mac' variable and use nic->mac directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Peter Jones <pjones@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/atm/idt77252.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:24:23 +0000 (06:24 +0000)]
drivers/atm/idt77252.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/ixgbe/ixgbe_common.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:56:52 +0000 (06:56 +0000)]
drivers/net/ixgbe/ixgbe_common.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/atm/nicstar.c: use %pM to show MAC address
hartleys [Tue, 5 Jan 2010 06:28:08 +0000 (06:28 +0000)]
drivers/atm/nicstar.c: use %pM to show MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Make it easier to parse /proc/net/dev contents.
Jesper Dangaard Brouer [Tue, 5 Jan 2010 05:50:52 +0000 (05:50 +0000)]
net: Make it easier to parse /proc/net/dev contents.

The contents of /proc/net/dev is annoying to parse, because
it changes whether there is a space after the "ethX:" or not.
It depends upon the size of the "Receive bytes" counter,
if the number is below 7 digits, then there is whitespaces
else if the number is 8 digits or above there is no space
between the ":" and the number.

This patch changes the output to assure there is always a space
between the ":" and the number.  Given that all existing userspace
application already need to handle the whitespaces, I see
no breakage of existing tools.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: RFC3069, private VLAN proxy arp support
Jesper Dangaard Brouer [Tue, 5 Jan 2010 05:50:47 +0000 (05:50 +0000)]
net: RFC3069, private VLAN proxy arp support

This is to be used together with switch technologies, like RFC3069,
that where the individual ports are not allowed to communicate with
each other, but they are allowed to talk to the upstream router.  As
described in RFC 3069, it is possible to allow these hosts to
communicate through the upstream router by proxy_arp'ing.

This patch basically allow proxy arp replies back to the same
interface (from which the ARP request/solicitation was received).

Tunable per device via proc "proxy_arp_pvlan":
  /proc/sys/net/ipv4/conf/*/proxy_arp_pvlan

This switch technology is known by different vendor names:
 - In RFC 3069 it is called VLAN Aggregation.
 - Cisco and Allied Telesyn call it Private VLAN.
 - Hewlett-Packard call it Source-Port filtering or port-isolation.
 - Ericsson call it MAC-Forced Forwarding (RFC Draft).

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agofix bonding: allow arp_ip_targets on separate vlans to use arp validation
Andy Gospodarek [Wed, 6 Jan 2010 12:56:37 +0000 (12:56 +0000)]
fix bonding: allow arp_ip_targets on separate vlans to use arp validation

On Wed, Jan 06, 2010 at 10:10:03PM +0100, Eric Dumazet wrote:
> Le 06/01/2010 19:38, Eric Dumazet a Ã©crit :
> >
> > (net-next-2.6 doesnt work well on my bond/vlan setup, I suspect I need a bisection)
>
> David, I had to revert 1f3c8804acba841b5573b953f5560d2683d2db0d
> (bonding: allow arp_ip_targets on separate vlans to use arp validation)
>
> Or else, my vlan devices dont work (unfortunatly I dont have much time
> these days to debug the thing)
>
> My config :
>
>               +---------+
> vlan.103 -----+ bond0   +--- eth1 (bnx2)
>               |         +
> vlan.825 -----+         +--- eth2 (tg3)
>               +---------+
>
> $ cat /proc/net/bonding/bond0
> Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
>
> Bonding Mode: fault-tolerance (active-backup)
> Primary Slave: None
> Currently Active Slave: eth2
> MII Status: up
> MII Polling Interval (ms): 100
> Up Delay (ms): 0
> Down Delay (ms): 0
>
> Slave Interface: eth1  (bnx2)
> MII Status: down
> Link Failure Count: 1
> Permanent HW addr: 00:1e:0b:ec:d3:d2
>
> Slave Interface: eth2   (tg3)
> MII Status: up
> Link Failure Count: 0
> Permanent HW addr: 00:1e:0b:92:78:50
>

This patch fixes up a problem with found with commit
1f3c8804acba841b5573b953f5560d2683d2db0d.  The original change
overloaded null_or_orig, but doing that prevented any packet handlers
that were not tied to a specific device (i.e. ptype->dev == NULL) from
ever receiving any frames.

The null_or_orig variable cannot be overloaded, and must be kept as NULL
to prevent the frame from being ignored by packet handlers designed to
accept frames on any interface.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago8139too: make PCI device ids constant
Márton Németh [Mon, 4 Jan 2010 13:03:02 +0000 (13:03 +0000)]
8139too: make PCI device ids constant

The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it is worth to make pci_device_id also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I1, I2, x;
@@
struct I1 {
  ...
  const struct I2 *x;
  ...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
  .x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
// </smpl>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: reject unsupported sendmsg/recvmsg flags
Rémi Denis-Courmont [Mon, 4 Jan 2010 02:02:49 +0000 (02:02 +0000)]
Phonet: reject unsupported sendmsg/recvmsg flags

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: zero-copy GPRS TX
Rémi Denis-Courmont [Mon, 4 Jan 2010 02:02:48 +0000 (02:02 +0000)]
Phonet: zero-copy GPRS TX

Send aligned pipe payload if requested to do so. Then, the socket buffer
needs not be fragmented anymore.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: zero-copy aligned GPRS RX
Rémi Denis-Courmont [Mon, 4 Jan 2010 02:02:47 +0000 (02:02 +0000)]
Phonet: zero-copy aligned GPRS RX

Newer Nokia cellular modems can use aligned payload for their GPRS pipe.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/mac8390.c: Add mac8390_init function
Joe Perches [Mon, 4 Jan 2010 11:53:03 +0000 (11:53 +0000)]
drivers/net/mac8390.c: Add mac8390_init function

Reduce indentation, make code a little neater.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/mac8390.c: Checkpatch cleanups
Joe Perches [Mon, 4 Jan 2010 11:53:02 +0000 (11:53 +0000)]
drivers/net/mac8390.c: Checkpatch cleanups

Use #include <linux/ not #include <asm/
Add spaces after arguments
Comment neatening
Make a couple of arrays static const
Align function arguments
Wrap text at 80 columns where reasonable
Cuddle brace else

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/mac8390.c: Convert printk(KERN_<level> to pr_<level>(
Joe Perches [Mon, 4 Jan 2010 11:53:01 +0000 (11:53 +0000)]
drivers/net/mac8390.c: Convert printk(KERN_<level> to pr_<level>(

Use printk_once
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Convert printks without KERN_<level> to pr_info and pr_cont

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/mac8390.c: Remove useless memcpy casting
Joe Perches [Mon, 4 Jan 2010 11:53:00 +0000 (11:53 +0000)]
drivers/net/mac8390.c: Remove useless memcpy casting

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/mac8390.c: Indent case labels
Joe Perches [Mon, 4 Jan 2010 11:52:59 +0000 (11:52 +0000)]
drivers/net/mac8390.c: Indent case labels

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agophy: SMSC device Energy Detect power-down mode
Giuseppe Cavallaro [Thu, 7 Jan 2010 04:35:14 +0000 (20:35 -0800)]
phy: SMSC device Energy Detect power-down mode

SMSC Ethernet Transceivers (LAN88710, LAN8710, LAN8720, LAN8187,
LAN8700, LAN83C185) provide a mechanism to conserve power when
the device is not connected to an active link partner
(Energy Detect Mode).
So this patch enables the Energy Detect power-down mode
for these Transceivers.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add napi gro frags interface.
Ron Mercer [Sat, 2 Jan 2010 10:37:44 +0000 (10:37 +0000)]
qlge: Add napi gro frags interface.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add RX frame handlers for non-split frames.
Ron Mercer [Sat, 2 Jan 2010 10:37:43 +0000 (10:37 +0000)]
qlge: Add RX frame handlers for non-split frames.

New handlers are added here to handle:
1) Small frames (<256 bytes) in a single small buffer.  Allocate a new
skb and copy the frame.

2) Large frame (>256 bytes) in a page chunk. Allocate an skb, tack it on frags,
post to napi_gro_receive().

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Turn on RX header split based on platform.
Ron Mercer [Sat, 2 Jan 2010 10:37:42 +0000 (10:37 +0000)]
qlge: Turn on RX header split based on platform.

Using 4-byte aligned headers is problematic for some architectures.
Since qlge uses 4-byte aligned rx buffers we split headers for these
architectures into a separate buffer and then recopy to align on 2-byte boundary.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: Lock transmit queue while disabling device
Mike McCormack [Thu, 31 Dec 2009 00:55:31 +0000 (00:55 +0000)]
sky2: Lock transmit queue while disabling device

netif_device_detach() does not take the tx_lock, so it's possible that
a call to sky2_xmit_frame is still in progress after
netif_device_detach() is complete.

Take netif_tx_lock() to make sure all transmits have stopped while
we're disabling the devices and that no other CPU is still
transmitting a frame after we've disabling the device.

Proposed fix for "sky2 panic under load" reported by Berck E. Nash.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: Refactor sky2_get_regs into two functions
Mike McCormack [Thu, 31 Dec 2009 00:49:43 +0000 (00:49 +0000)]
sky2: Refactor sky2_get_regs into two functions

Separate code deciding which registers can be accessed out of
sky2_get_regs in preparation for adding more conditions into it.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaxnet_cs: remove unnecessary spin_unlock_irqrestore
Ken Kawasaki [Mon, 28 Dec 2009 15:17:24 +0000 (15:17 +0000)]
axnet_cs: remove unnecessary spin_unlock_irqrestore

axnet_cs:
    remove unnecessary spin_unlock_irqrestore,spin_lock_irqsave.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotipc: use kconfig to limit numeric ranges
Amerigo Wang [Thu, 24 Dec 2009 17:26:48 +0000 (17:26 +0000)]
tipc: use kconfig to limit numeric ranges

We can rely on kconfig to limit these numbers,
no need to limit them at compile time/run time.

Users who modify these numbers manually should
be responsible for themself. :)

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Per Liden <per.liden@ericsson.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Allan Stephens <allan.stephens@windriver.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan/netlink: add CAN_CTRLMODE_ONE_SHOT
Marc Kleine-Budde [Wed, 23 Dec 2009 01:27:48 +0000 (01:27 +0000)]
can/netlink: add CAN_CTRLMODE_ONE_SHOT

This patch adds the flag CAN_CTRLMODE_ONE_SHOT. It is used as mask
or flag in the "struct can_ctrlmode".

It allows userspace via netlink to set a CAN controller into the special
"one-shot" mode. In this mode, if supported by the CAN controller, it
tries only once to deliver a CAN frame and aborts it if an error
(e.g.: arbitration lost) happens.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: Speed up CAN frame receiption by using ml_priv
Oliver Hartkopp [Fri, 25 Dec 2009 06:47:47 +0000 (06:47 +0000)]
can: Speed up CAN frame receiption by using ml_priv

this patch removes the hlist that contains the CAN receiver filter lists.
It uses the 'midlayer private' pointer ml_priv and links the filters directly
to the CAN netdevice, which allows to omit the walk through the complete CAN
devices hlist for each received CAN frame.

This patch is tested and does not remove any locking.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/cxgb3: Use kzalloc for allocating only one thing
Julia Lawall [Fri, 18 Dec 2009 21:16:52 +0000 (21:16 +0000)]
drivers/net/cxgb3: Use kzalloc for allocating only one thing

Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: allow arp_ip_targets on separate vlans to use arp validation
Andy Gospodarek [Mon, 14 Dec 2009 10:48:58 +0000 (10:48 +0000)]
bonding: allow arp_ip_targets on separate vlans to use arp validation

This allows a bond device to specify an arp_ip_target as a host that is
not on the same vlan as the base bond device and still use arp
validation.  A configuration like this, now works:

BONDING_OPTS="mode=active-backup arp_interval=1000 arp_ip_target=10.0.100.1 arp_validate=3"

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
    link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
    link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
8: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
    link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::213:21ff:febe:33e9/64 scope link
       valid_lft forever preferred_lft forever
9: bond0.100@bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
    link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
    inet 10.0.100.2/24 brd 10.0.100.255 scope global bond0.100
    inet6 fe80::213:21ff:febe:33e9/64 scope link
       valid_lft forever preferred_lft forever

Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
ARP Polling Interval (ms): 1000
ARP IP target/s (n.n.n.n form): 10.0.100.1

Slave Interface: eth1
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:40:05:30:ff:30

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:13:21:be:33:e9

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 30 Dec 2009 21:51:29 +0000 (13:51 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
John W. Linville [Wed, 30 Dec 2009 20:25:08 +0000 (15:25 -0500)]
Merge git://git./linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/libertas/scan.c

14 years agoSubject: drivers/net/sh_eth.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:10:35 +0000 (20:10 -0800)]
Subject: drivers/net/sh_eth.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/r8169.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:10:01 +0000 (20:10 -0800)]
drivers/net/r8169.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/octeon/octeon_mgmt.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:09:07 +0000 (20:09 -0800)]
drivers/net/octeon/octeon_mgmt.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/smc911x.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:08:09 +0000 (20:08 -0800)]
drivers/net/smc911x.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/sunvnet.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:07:27 +0000 (20:07 -0800)]
drivers/net/sunvnet.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/usb/catc.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:06:45 +0000 (20:06 -0800)]
drivers/net/usb/catc.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/s390/net/qeth_l2_main.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:05:37 +0000 (20:05 -0800)]
drivers/s390/net/qeth_l2_main.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/xilinx_emaclite.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:04:53 +0000 (20:04 -0800)]
drivers/net/xilinx_emaclite.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/via-velocity.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:04:14 +0000 (20:04 -0800)]
drivers/net/via-velocity.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/usb/rtl8150.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:03:28 +0000 (20:03 -0800)]
drivers/net/usb/rtl8150.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/igbvf/netdev.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:02:29 +0000 (20:02 -0800)]
drivers/net/igbvf/netdev.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/lib82596.c: use %pM to shown MAC address
H Hartley Sweeten [Wed, 30 Dec 2009 04:01:46 +0000 (20:01 -0800)]
drivers/net/lib82596.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

The only difference in the output is that the MAC address is
shown in the usual colon-separated hex notation instead of
space-separated.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoRevert "b43: Enforce DMA descriptor memory constraints"
John W. Linville [Tue, 29 Dec 2009 19:07:42 +0000 (14:07 -0500)]
Revert "b43: Enforce DMA descriptor memory constraints"

This reverts commit 9bd568a50c446433038dec2a5186c5c57c3dbd23.

That commit is shown to cause allocation failures during initialization
on some machines.

http://bugzilla.kernel.org/show_bug.cgi?id=14844

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: annotate sleeping driver ops
Kalle Valo [Wed, 23 Dec 2009 12:15:47 +0000 (13:15 +0100)]
mac80211: annotate sleeping driver ops

To make it easier to notice cases of calling sleeping ops in atomic context,
annotate driver-ops.h with appropiate might_sleep() calls. At the same time,
also document in mac80211.h the op functions with missing contexts.

mac80211 doesn't seem to use get_tx_stats anywhere currently. Just to be on
the safe side, I documented it to be atomic, but hopefully the op can be
removed in the future.

Compile-tested only.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove requeue from work
Johannes Berg [Wed, 23 Dec 2009 12:15:46 +0000 (13:15 +0100)]
mac80211: remove requeue from work

There's no need to be requeueing the work struct
since we check for the scan after removing items
due to possible timeouts.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove struct ieee80211_if_init_conf
Johannes Berg [Wed, 23 Dec 2009 12:15:45 +0000 (13:15 +0100)]
mac80211: remove struct ieee80211_if_init_conf

All its members (vif, mac_addr, type) are now available
in the vif struct directly, so we can pass that instead
of the conf struct. I generated this patch (except the
mac80211 and header file changes) with this semantic
patch:

@@
identifier conf, fn, hw;
type tp;
@@
tp fn(struct ieee80211_hw *hw,
-struct ieee80211_if_init_conf *conf)
+struct ieee80211_vif *vif)
{
<...
(
-conf->type
+vif->type
|
-conf->mac_addr
+vif->addr
|
-conf->vif
+vif
)
...>
}

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211/cfg80211: add station events
Johannes Berg [Wed, 23 Dec 2009 12:15:44 +0000 (13:15 +0100)]
mac80211/cfg80211: add station events

When, for instance, a new IBSS peer is found, userspace
wants to be notified. Add events for all new stations
that mac80211 learns about.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: make off-channel work generic
Johannes Berg [Wed, 23 Dec 2009 12:15:43 +0000 (13:15 +0100)]
mac80211: make off-channel work generic

This changes mac80211 to allow being off-channel for
any type of work, not just the 'remain-on-channel'
work. This also helps fast transition to a BSS on a
different channel.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: support remain-on-channel command
Johannes Berg [Wed, 23 Dec 2009 12:15:42 +0000 (13:15 +0100)]
mac80211: support remain-on-channel command

This implements the new remain-on-channel cfg80211
command in mac80211, extending the work interface.

Also change the work purge code to be able to clean
up events properly (pretending they timed out.)

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: add remain-on-channel command
Jouni Malinen [Wed, 23 Dec 2009 12:15:41 +0000 (13:15 +0100)]
cfg80211: add remain-on-channel command

Add new commands for requesting the driver to remain awake
on a specified channel for the specified amount of time
(and another command to cancel such an operation). This
can be used to implement userspace-controlled off-channel
operations, like Public Action frame exchange on another
channel than the operation channel.

The off-channel operation should behave similarly to scan,
i.e. the local station (if associated) moves into power
save mode to request the AP to buffer frames for it and
then moves to the other channel to allow the off-channel
operation to be completed. The duration parameter can be
used to request enough time to receive a response from
the target station.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Generalize off-channel operation helpers from scan code
Jouni Malinen [Wed, 23 Dec 2009 12:15:40 +0000 (13:15 +0100)]
mac80211: Generalize off-channel operation helpers from scan code

The off-channel operations for going into power save mode (station
mode) or stop beaconing (AP/IBSS) are not limited to scanning. Move
these into a separate file and allow them to be used for other
purposes, too.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: proper bss private data handling
Johannes Berg [Wed, 23 Dec 2009 12:15:39 +0000 (13:15 +0100)]
mac80211: proper bss private data handling

cfg80211 offers private data for each BSS struct,
which mac80211 uses. However, mac80211 uses internal
and external (cfg80211) BSS pointers interchangeably
and has a hack to put the cfg80211 bss struct into
the private struct.

Remove this hack, properly converting between the
pointers wherever necessary.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: split up and insert custom IEs correctly
Johannes Berg [Wed, 23 Dec 2009 12:15:38 +0000 (13:15 +0100)]
mac80211: split up and insert custom IEs correctly

Currently, we insert all user-specified IEs before the HT
IE for association, and after the HT IE for probe requests.
For association, that's correct only if the user-specified
IEs are RSN only, incorrect in all other cases including
WPA. Change this to split apart the user-specified IEs in
two places for association: before the HT IE (e.g. RSN),
after the HT IE (generally empty right now I think?) and
after WMM (all other vendor-specific IEs). For probes,
split the IEs in different places to be correct according
to the spec.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: refactor association
Johannes Berg [Wed, 23 Dec 2009 12:15:37 +0000 (13:15 +0100)]
mac80211: refactor association

Refactor the code to reserve an skb of the right size
(instead of hoping 200 bytes are enough forever), and
also put HT IE generation into an own function.

Additionally, put the HT IE before the vendor-specific
WMM IE. This still leaves things not quite ordered
correctly, due to user-specified IEs, add a note about
that for now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: rewrite a few work messages
Johannes Berg [Wed, 23 Dec 2009 12:15:36 +0000 (13:15 +0100)]
mac80211: rewrite a few work messages

The station we're authenticating/associating with
may not always be an AP in the sense that word is
mostly understood, so print only the MAC address
of the peer instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: generalise work handling
Johannes Berg [Wed, 23 Dec 2009 12:15:35 +0000 (13:15 +0100)]
mac80211: generalise work handling

In order to use auth/assoc for different purposes
other than MLME, it needs to be split up. For other
purposes, a generic work handling (potentially on
another channel) will be useful.

To achieve that, this patch moves much of the MLME
work handling out of mlme into a new work API. The
API can currently handle probing a specific AP,
authentication and association. The MLME previously
handled probe/authentication as one step and will
continue to do so, but they are separate in the new
work handling.

Work items are RCU-managed to be able to check for
existence of an item for a specific frame in the RX
path, but they can be re-used which the MLME right
now will do for its combined probe/auth step.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: generalise management work a bit
Johannes Berg [Wed, 23 Dec 2009 12:15:34 +0000 (13:15 +0100)]
mac80211: generalise management work a bit

As a first step of generalising management work,
this renames a few things and puts more information
directly into the struct so that auth/assoc need
not access the BSS pointer as often -- in fact it
can be removed from auth completely. Also since the
previous patch made sure a new work item is used
for association, we can make the different data a
union.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: let cfg80211 manage auth state
Johannes Berg [Wed, 23 Dec 2009 12:15:33 +0000 (13:15 +0100)]
mac80211: let cfg80211 manage auth state

mac80211 currently hangs on to the auth state by
keeping it on the work list. That can lead to
confusing behaviour like rejecting scans while
authenticated to any AP (but not yet associated.)
It also means that it needs to keep track of the
work struct while associated for when it gets
disassociated (or disassociates.)

Change this to free the work struct after the
authentication completed successfully and
allocate a new one for associating, thereby
letting cfg80211 manage the auth state. Another
change necessary for this is to tell cfg80211
about all unicast deauth frames sent to mac80211
since now it can no longer check the auth state,
but that check was racy anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: introduce flush operation
Johannes Berg [Wed, 23 Dec 2009 12:15:32 +0000 (13:15 +0100)]
mac80211: introduce flush operation

We've long lacked a good confirmation that frames
have really gone out, e.g. before going off-channel
for a scan. Add a flush() operation that drivers
can implement to provide that confirmation, and use
it in a few places:
 * before scanning sends the nullfunc frames
 * after scanning sends the nullfunc frames, if any
 * when going idle, to send any pending frames

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add ieee80211_sdata_running
Johannes Berg [Wed, 23 Dec 2009 12:15:31 +0000 (13:15 +0100)]
mac80211: add ieee80211_sdata_running

Instead of always using netif_running(sdata->dev)
use ieee80211_sdata_running(sdata) now which is
just an inline containing netif_running() for now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agortl8187: remove priv->mode
John W. Linville [Tue, 22 Dec 2009 23:13:05 +0000 (18:13 -0500)]
rtl8187: remove priv->mode

It is checked in add_interface, but there it is easily replaced with
a check of priv->vif.  If that information should become necessary,
it is available in vif->type anyway.

It is also checked in led_turn_on and led_turn_off, where I made the
substitutions as described above.  Of course, these checks seem to
have been incorrect since the driver was using NL80211_IFTYPE_MONITOR
to indicate no interface rather than NL80211_IFTYPE_UNSPECIFIED.
Anyway, I think these checks may be extraneous...?

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agortl8180: remove priv->mode
John W. Linville [Tue, 22 Dec 2009 23:13:04 +0000 (18:13 -0500)]
rtl8180: remove priv->mode

It is only checked in add_interface, and there it is easily replaced
with a check of priv->vif.  If that information should become necessary,
it is available in vif->type anyway.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Cleanup chip handling helper functions.
Gertjan van Wingerde [Tue, 22 Dec 2009 23:03:25 +0000 (00:03 +0100)]
rt2x00: Cleanup chip handling helper functions.

Let each of them take a struct rt2x00_dev pointer as argument instead of
a mixture of struct rt2x00_chip and struct rt2x00_dev pointers.
Preparation for further clean ups in the rt2x00 chip handling, especially
for rt2800 devices.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: convert RT2800PCI_PCI and RT2800PCI_SOC Kconfig symbols to booleans.
Gertjan van Wingerde [Tue, 22 Dec 2009 23:03:24 +0000 (00:03 +0100)]
rt2x00: convert RT2800PCI_PCI and RT2800PCI_SOC Kconfig symbols to booleans.

There is no need for Kconfig symbols RT2800PCI_PCI and RT2800PCI_SOC to be
tristates, as they are only used to check whether RT2800 PCI or SOC support
is to be compiled in.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Let rt2800lib check CONFIG_RT2X00_LIB_USB instead of CONFIG_RT2800USB
Gertjan van Wingerde [Tue, 22 Dec 2009 23:03:23 +0000 (00:03 +0100)]
rt2x00: Let rt2800lib check CONFIG_RT2X00_LIB_USB instead of CONFIG_RT2800USB

rt2800lib currently checks whether RT2800USB is enabled in the configuration.
Strictly speaking this is not necessary, it only needs to know whether the
generic rt2x00usb library functions are available. Therefore check for
RT2X00_LIB_USB instead.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix checks for rt2800 SOC support.
Gertjan van Wingerde [Tue, 22 Dec 2009 23:03:22 +0000 (00:03 +0100)]
rt2x00: Fix checks for rt2800 SOC support.

Fix checking for SOC support in rt2800pci. The wrong config (an unexisting
one) was checked.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: remove CONFIG_WIRELESS_OLD_REGULATORY
John W. Linville [Fri, 18 Dec 2009 22:59:02 +0000 (17:59 -0500)]
wireless: remove CONFIG_WIRELESS_OLD_REGULATORY

This is no longer needed with the availability of
CONFIG_CFG80211_INTERNAL_REGDB.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Prevent performing "join" before association
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:10 +0000 (15:41 +0200)]
wl1271: Prevent performing "join" before association

There is a minor bug in the code causing a "join" to be performed before
there is an intention to associate. Fix this.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Check vif for NULL when indicating beacon-loss
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:09 +0000 (15:41 +0200)]
wl1271: Check vif for NULL when indicating beacon-loss

Because the interface is started and the vif are created and destroyed
separately, there is a slim possibility beacon-loss indications occur while
there is no vif - causing a kernel-oops unless checked.

Add checking for the vif.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Add support for acx_pm_config
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:08 +0000 (15:41 +0200)]
wl1271: Add support for acx_pm_config

This acx configures host clock parameters in correspondence with the clock
request line - the settling time of the clock, and whether fast wake-up is
supported.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>