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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:07 +0000 (15:41 +0200)]
wl1271: Change booleans in struct wl1271 into a flags bitmask
For cleaner implementation, change the bunch of booleans in the struct wl1271
structure into a flags bitmask.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:06 +0000 (15:41 +0200)]
wl1271: Fix supported rate management
Previously, only basic rates were used for data transmission - resulting in
reduced transfer rates. This patch takes enables the firmware to take advantage
of the full set of data rates supported by the AP.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:05 +0000 (15:41 +0200)]
wl1271: Change rates configured for templates
Previously a "firmware chooses" value was used for the rates of all control
message templates set to the firmware. This resulted in a too high rate to be
chosen to transmit those messages. Change this by configuring a fixed low rate
for the templates.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:04 +0000 (15:41 +0200)]
wl1271: Add rudimentary ad-hoc support
This patch adds rudimentary a-hoc support for the driver. It will allow
setting up ad-hoc, and for other devices to scan and join. The beacon and probe
response template setting is slightly dirty, and need to be properly
implemented with support from mac80211. Also, the SSID is not configured to the
firmware - the FW will not be able to respond to probe requests autonomously.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:03 +0000 (15:41 +0200)]
wl1271: Remove beacon-loss-ind from PSM entry failure handling
Remove the beacon-loss indication to stack from PSM entry failure handling -
this will cause more problems than it will solve due to the design of the
mac80211.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:02 +0000 (15:41 +0200)]
wl1271: Add pre-power-on sleep
This patch adds a short delay before powering on the wl1271. Normally, it is
not needed, but if the wl1271 has been powered off shortly before, for reliable
firmware-booting this small stabilization delay is required.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:01 +0000 (15:41 +0200)]
wl1271: Implement chipset boot retry
The wl1271 has a hardware bug which causes it to randomly (very infrequently)
to fail powering up properly. This patch implements retry for the chipset boot
sequence, to work around the hardware problem.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:41:00 +0000 (15:41 +0200)]
wl1271: prevent power save entry while not associated
The mac80211 sometimes requests power save entry while not associated - this
will cause problems, so prevent it if not associated. Go to powersave once
association is complete.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:40:59 +0000 (15:40 +0200)]
wl1271: Fix event acknowledging functionality
In reference source, events are acknowledged separately - fix the driver to
do the same.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:40:58 +0000 (15:40 +0200)]
wl1271: Use slow rates for association messages
While not associated, default the data rates to 1 and 2mbps, so that only
those rates will be used for association related message transfer. Once
associated, configure the full rate-set supported by the AP.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:40:57 +0000 (15:40 +0200)]
wl1271: Remove smart reflex ACX
Remove the smart-reflex ACX - the associated parameters are now configured
in the radio parameters config.
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>
Juuso Oikarinen [Fri, 11 Dec 2009 13:40:56 +0000 (15:40 +0200)]
wl1271: Configure smart-reflex paramter values.
Configure correct values to be used with the smart-reflex configuration of the
firmware.
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>
Luciano Coelho [Fri, 11 Dec 2009 13:40:55 +0000 (15:40 +0200)]
wl1271: use channel 1 when configuring the data path
In the data path configuration, one of the parameters is the channel. We
have been setting it to wl->channel, which is not correct in this case. This
channel has nothing to do with the channel we're currently tuned to, since it
is only used for calibration during this phase. Hardcoded the channel to 1,
according to the reference driver.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:54 +0000 (15:40 +0200)]
wl1271: some new configuration values according to new reference
In the new reference driver, some of the firmware configuration values have
been changed. This patch changes them in the wl1271 driver accordingly.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:53 +0000 (15:40 +0200)]
wl1271: upload only the first 468 bytes from the NVS file
We were uploading the whole NVS file, but that is wrong, because the same
file also contains the initialization values. For the latest firmwares, we
should upload only the initial 468 bytes from the file.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:52 +0000 (15:40 +0200)]
wl1271: add gpio_power file in debugfs to power the chip on and off
Some debugging tools require the chip to be powered on before they can work.
With these tools, we shouldn't upload the firmware nor boot the firmware
ourselves, so this debufs file is provided. It always contains the gpio
power setting (0 = off, 1 = on). To change the power setting, just write 0
or 1 to the file.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:51 +0000 (15:40 +0200)]
wl1271: fix one typo in the rx_rssi_and_proc_compens values
There was a typo in one of the values in the rx_rssi_and_proc_compens elemt
of the Radio Parameters struct.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:50 +0000 (15:40 +0200)]
wl1271: implement dco itrim parameters setting
Newer firmwares require the dco itrim parameters to be set during
initialization. This patch implements the new ACX function and calls it.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:49 +0000 (15:40 +0200)]
wl1271: use the correct macro when setting the basic rates
We were using CONF_TX_RATE_MASK_ALL when calling wl1271_acx_rate_policies()
during init. We should use WL1271_DEFAULT_BASIC_RATE_SET instead. The
values are the same, but the latter is just the correct macro to use.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:48 +0000 (15:40 +0200)]
wl1271: set null data template when BSSID is known
The call to wl1271_cmd_build_null_data() was missing when we got associated,
this was causing PS to fail. This patch adds the call and now PS seems to
work.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:47 +0000 (15:40 +0200)]
wl1271: check result code from the join command
We were not checking the return value from the call to wl1271_cmd_join().
Added a check to make things more reliable.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:46 +0000 (15:40 +0200)]
wl1271: limit TX power to 25dBm for every channel
The wl1271 firmware supports maximun 25.5dBm, so the driver was returning
-EINVALID to anything above that. This patch uses the channel max_power
option to limit the TX power to 25dBm.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:45 +0000 (15:40 +0200)]
wl1271: remove workaround for disconnection
Now we're using a the idle information coming from mac80211 to decide when to
disconnect. If we have joined (ie. we're listening to a channel), whenever
the interface goes to idle, we will issue a disconnect command. So the
workaround to send a disconnect command before joining is not needed anymore.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 11 Dec 2009 13:40:44 +0000 (15:40 +0200)]
wl1271: use join command with dummy BSSID
When we need to change the channel before association, we have to send a join
command with a valid BSSID. With this patch we use
0baddeadbeef as the
BSSID. There are ongoing discussions with TI to get this done in a cleaner
way.
When we go back to idle, we issue a CMD_DISCONNECT to make sure the firmware
stops listening to the channel and cleans things up internally.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>