bonding: change bond_create_proc_entry() to return void
The function bond_create_proc_entry is currently of type int.
Two versions of this function exist:
The one in the ifdef CONFIG_PROC_FS branch always return 0.
The one in the else branch (which is empty) return nothing.
When CONFIG_PROC_FS is undef, this cause the following warning:
drivers/net/bonding/bond_main.c: In function `bond_create_proc_entry':
drivers/net/bonding/bond_main.c:3393: warning: control reaches end of
non-void function
No caller of this function use the returned value.
So change the returned type from int to void and remove the
useless return 0; .
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Reported-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Mon, 12 Oct 2009 09:27:07 +0000 (09:27 +0000)]
sfc: 10Xpress: Initialise pause advertising flags
The mdio module now handles reconfiguration of pause advertising
through ethtool, but not initialisation. Add the necessary
initialisation to tenxpress_phy_init().
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Mon, 12 Oct 2009 09:26:17 +0000 (09:26 +0000)]
mdio: Advertise pause (flow control) settings even if autoneg is off
Currently, if pause autoneg is off we do not set either pause
advertising flag. If autonegotiation of speed and duplex settings is
enabled, there is no way for the link partner to distinguish this from
our refusing to use pause frames.
We should instead set the advertising flags according to the forced
mode so that the link partner can follow our lead. This is consistent
with the behaviour of other drivers.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Vorontsov [Mon, 12 Oct 2009 06:00:42 +0000 (06:00 +0000)]
gianfar: Add support for hibernation
Thanks to various cleanups and refactorings this is now straightforward:
convert the gianfar driver to dev_pm_ops, plus add ->restore() callback
that will fully reinitialize MAC internal registers and BDs.
Note that I kept legacy suspend/resume callbacks so that this patch
doesn't depend on PowerPC changes (i.e. dev_pm_ops support for OF
platform drivers).
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Vorontsov [Mon, 12 Oct 2009 06:00:39 +0000 (06:00 +0000)]
gianfar: Factor out gfar_init_bds() from gfar_alloc_skb_resources()
After hibernation we want to just reinitialize BDs, no need to allocate
anything. So, factor out BDs initialization code from
gfar_alloc_skb_resourses().
Also, teach gfar_init_bds() to reuse already allocated RX SKBs, i.e.
just call gfar_init_rxbdp() if a SKB was already allocated and mapped.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Vorontsov [Mon, 12 Oct 2009 06:00:36 +0000 (06:00 +0000)]
gianfar: Move tbase/rbase initialization to gfar_init_mac()
For hibernation we want to call gfar_init_mac() without need to
free/allocate_skb_resources sequence, so save the DMA address into a
private struct, and move tbase/rbase initialization to gfar_init_mac().
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Vorontsov [Mon, 12 Oct 2009 06:00:33 +0000 (06:00 +0000)]
gianfar: Don't needlessly set the wrap bit for the last RX BD
startup_gfar() sets the wrap bit for the last rxbd just after
gfar_new_rxbdp() call, which is issued for all rxbds. And
gfar_new_rxbdp() has the following check already:
Anton Vorontsov [Mon, 12 Oct 2009 06:00:30 +0000 (06:00 +0000)]
gianfar: Simplify skb resources freeing code
Remove dma_free_coherent() from stop_gfar() and gfar_start() calls,
place it into free_skb_resources(). That makes SKB resources management
more understandable, plus free_skb_resources() will be used as a cleanup
routine for gfar_alloc_skb_resources() that will be implemented soon.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Vorontsov [Mon, 12 Oct 2009 06:00:26 +0000 (06:00 +0000)]
gianfar: Some cleanups for startup_gfar()
We're going to split the startup_gfar() into 3 separate functions,
so let's cleanup the code a little bit so that cosmetic changes
won't distract attention from logical ones.
- Remove needless casts (e.g. (struct sk_buff **)kmalloc());
- Turn 'unsigned long vaddr;' into 'void *vaddr', to avoid casting;
- Add new 'struct device *dev' variable as a shorthand for
'&priv->ofdev->dev' that is used all over the place, also rename
'struct net_device *dev' to 'struct net_device *ndev';
- Turn printk(KERN_ERR ...) to pr_err(...), which is shorter;
- Don't return bogus -1 (i.e. -EPERM) when request_irq() fails;
- Turn '&priv->regs->' to just '®s->'.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Meaning receive multiple messages, reducing the number of syscalls and
net stack entry/exit operations.
Next patches will introduce mechanisms where protocols that want to
optimize this operation will provide an unlocked_recvmsg operation.
This takes into account comments made by:
. Paul Moore: sock_recvmsg is called only for the first datagram,
sock_recvmsg_nosec is used for the rest.
. Caitlin Bestler: recvmmsg now has a struct timespec timeout, that
works in the same fashion as the ppoll one.
If the underlying protocol returns a datagram with MSG_OOB set, this
will make recvmmsg return right away with as many datagrams (+ the OOB
one) it has received so far.
. Rémi Denis-Courmont & Steven Whitehouse: If we receive N < vlen
datagrams and then recvmsg returns an error, recvmmsg will return
the successfully received datagrams, store the error and return it
in the next call.
This paves the way for a subsequent optimization, sk_prot->unlocked_recvmsg,
where we will be able to acquire the lock only at batch start and end, not at
every underlying recvmsg call.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Neil Horman [Mon, 12 Oct 2009 20:26:31 +0000 (13:26 -0700)]
net: Generalize socket rx gap / receive queue overflow cmsg
Create a new socket level option to report number of queue overflows
Recently I augmented the AF_PACKET protocol to report the number of frames lost
on the socket receive queue between any two enqueued frames. This value was
exported via a SOL_PACKET level cmsg. AFter I completed that work it was
requested that this feature be generalized so that any datagram oriented socket
could make use of this option. As such I've created this patch, It creates a
new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a
SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue
overflowed between any two given frames. It also augments the AF_PACKET
protocol to take advantage of this new feature (as it previously did not touch
sk->sk_drops, which this patch uses to record the overflow count). Tested
successfully by me.
Notes:
1) Unlike my previous patch, this patch simply records the sk_drops value, which
is not a number of drops between packets, but rather a total number of drops.
Deltas must be computed in user space.
2) While this patch currently works with datagram oriented protocols, it will
also be accepted by non-datagram oriented protocols. I'm not sure if thats
agreeable to everyone, but my argument in favor of doing so is that, for those
protocols which aren't applicable to this option, sk_drops will always be zero,
and reporting no drops on a receive queue that isn't used for those
non-participating protocols seems reasonable to me. This also saves us having
to code in a per-protocol opt in mechanism.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sat, 10 Oct 2009 13:46:59 +0000 (13:46 +0000)]
cnic: Add main functions to support bnx2x devices.
Add iSCSI support for bnx2x devices.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sat, 10 Oct 2009 13:46:56 +0000 (13:46 +0000)]
bnx2x: Add main CNIC interface functions.
Add the main CNIC registration, callback, MAC addr. setup functions.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sat, 10 Oct 2009 13:46:55 +0000 (13:46 +0000)]
bnx2x: Add hw init code to support iSCSI.
Add code to initialize hardware blocks used for iSCSI.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sat, 10 Oct 2009 13:46:54 +0000 (13:46 +0000)]
bnx2x: Refactor MAC address setup code.
For iSCSI MAC address setup in later patches.
Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sat, 10 Oct 2009 13:46:53 +0000 (13:46 +0000)]
bnx2x: Refactor bnx2x_sp_post().
Some of the SPQ (slow-path queue) operations will be used
by the cnic code in later patches.
Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg [Fri, 9 Oct 2009 16:17:05 +0000 (18:17 +0200)]
wireless: make wireless drivers select core
It is somewhat non-sensical to allow selecting wireless
drivers without showing wireless core code options, and
since the wext refactoring this has made it possible to
generate configurations that will not build. Avoid this
and make wireless drivers select the wireless options.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
libertas: remove double assignment of dev->netdev_ops
This came in through the patch titled:
libertas: first stab at cfg80211 support
I only noticed it because it breaks compat-wireless :)
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k: use right parameter for MODULE_PARM_DESC() for debug
Reported-by: sujith.manoharan@atheros.com Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Don Skidmore [Thu, 8 Oct 2009 15:36:22 +0000 (15:36 +0000)]
ixgbe: Fix KR to KX fail over for Mezzanine cards
This patch allows the recently added backplane device IDs that support KR
to fail over to KX during link setup. This is accomplished by the new MAC
link setup function ixgbe_setup_mac_link_smartspeed(). Comments were also
updated to better document the reason for the delays chosen for KX, KX4, BX,
BX4 and KR connections.
Signed-off-by: Don Skidmore <don.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Don Skidmore [Thu, 8 Oct 2009 15:35:58 +0000 (15:35 +0000)]
ixgbe: add support for 82599 based Express Module X520-P2
This patch will add the device ID for the 82599-based Ethernet
Express Module X520-P2 SFI card.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Mitchell [Thu, 8 Oct 2009 06:32:21 +0000 (06:32 +0000)]
ibm_newemac: Added 16K Tx FIFO size support for EMAC4
Some of the EMAC V4 implementations support 16K Tx FIFOs. This
patch adds support for this functionality and fixes typos in the
Tx FIFO size error messages.
Signed-off-by: Dave Mitchell <dmitchell@appliedmicro.com> Acked-by: Prodyut Hazarika <phazarika@appliedmicro.com> Acked-by: Victor Gallardo <vgallardo@appliedmicro.com> Acked-by: Loc Ho <lho@appliedmicro.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 8 Oct 2009 09:54:43 +0000 (09:54 +0000)]
qlge: Add disable/enable firmare irqs to handler.
This was accidentally omitted from one of the previous patches for firmware event
handling. The handler needs to the enable firmware irq mask when it's done
processing or it may not get any more events interrupts.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 8 Oct 2009 09:54:41 +0000 (09:54 +0000)]
qlge: Fix chip reset process.
Add wait for NIC fifo and MGMNT fifo to empty before applying reset.
Otherwise broken frames can be processed by management processor and
cause it to hang.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 8 Oct 2009 09:54:39 +0000 (09:54 +0000)]
qlge: Fix frame routing for multicast frames.
Broadcast/multicast should always be routed to the default (zeroeth) rx
ring. Broadcast frames are already routed correctly. This fixes
routing for multicast frames.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 8 Oct 2009 09:54:38 +0000 (09:54 +0000)]
qlge: Fix frame routing issue related to bonding.
Currently frames are routed based on their type and MAC address. This
patch adds the port number on which the frame arrived to the routing.
This prevents problems in the case where both interfaces have the same MAC address in
a routing configuration.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
When the IPV6 conf is used, the function sysctl_set_parent is called and the
array addrconf_sysctl is used as a parameter of the function.
The above patch added new conf "force_tllao" into the array addrconf_sysctl,
but the size of the array was not modified, the static allocated size is
DEVCONF_MAX + 1 but the real size is DEVCONF_MAX + 2, so the problem is
that the function sysctl_set_parent accessed wrong address.
And the information of IPV6 in .config is as following.
IPV6 in .config:
CONFIG_IPV6=m
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_ROUTE_INFO=y
CONFIG_IPV6_OPTIMISTIC_DAD=y
CONFIG_IPV6_MIP6=m
CONFIG_IPV6_SIT=m
# CONFIG_IPV6_SIT_6RD is not set
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=m
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
CONFIG_IPV6_MROUTE=y
CONFIG_IPV6_PIMSM_V2=y
# CONFIG_IP_VS_IPV6 is not set
CONFIG_NF_CONNTRACK_IPV6=m
CONFIG_IP6_NF_MATCH_IPV6HEADER=m
I confirmed this patch fixes this problem.
Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg [Thu, 8 Oct 2009 19:02:02 +0000 (21:02 +0200)]
cfg80211: fix netns error unwinding bug
The error unwinding code in set_netns has a bug
that will make it run into a BUG_ON if passed a
bad wiphy index, fix by not trying to unlock a
wiphy that doesn't exist.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jiri Pirko [Thu, 8 Oct 2009 08:21:46 +0000 (01:21 -0700)]
netlink: fix typo in initialization
Commit 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 ("[NETLINK]: Missing
initializations in dumped data") introduced a typo in
initialization. This patch fixes this.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anant Gole [Wed, 7 Oct 2009 02:59:47 +0000 (02:59 +0000)]
can: add TI CAN (HECC) driver
TI HECC (High End CAN Controller) module is found on many TI devices. It
has 32 hardware mailboxes with full implementation of CAN protocol 2.0B
with bus speeds up to 1Mbps. Specifications of the module are available
on TI web <http://www.ti.com>
Signed-off-by: Anant Gole <anantgole@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Wed, 7 Oct 2009 02:43:49 +0000 (02:43 +0000)]
ixgbe: Use the instance of net_device_stats from net_device.
Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
net: Make UFO on master device independent of attached devices
Now that software UFO is supported, UFO can be enabled on master
devices like bridge, bond even though the attached device doesn't
support this feature in hardware.
This allows UFO to be used between KVM host and guest even when a
physical interface attached to the bridge doesn't support UFO.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Wed, 7 Oct 2009 00:37:59 +0000 (00:37 +0000)]
udp: dynamically size hash tables at boot time
UDP_HTABLE_SIZE was initialy defined to 128, which is a bit small for
several setups.
4000 active UDP sockets -> 32 sockets per chain in average. An
incoming frame has to lookup all sockets to find best match, so long
chains hurt latency.
Instead of a fixed size hash table that cant be perfect for every
needs, let UDP stack choose its table size at boot time like tcp/ip
route, using alloc_large_system_hash() helper
Add an optional boot parameter, uhash_entries=x so that an admin can
force a size between 256 and 65536 if needed, like thash_entries and
rhash_entries.
dmesg logs two new lines :
[ 0.647039] UDP hash table entries: 512 (order: 0, 4096 bytes)
[ 0.647099] UDP Lite hash table entries: 512 (order: 0, 4096 bytes)
Maximal size on 64bit arches would be 65536 slots, ie 1 MBytes for non
debugging spinlocks.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
The variable old_active is first set to bond->curr_active_slave.
Then, it is unconditionally set to new_active, without being used in between.
The first assignment, having no side effect, is useless.
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Brian Haley [Wed, 7 Oct 2009 20:57:10 +0000 (13:57 -0700)]
IPv6: Fix 6RD build error
Fix build error introduced in commit fa857afcf - ipv6 sit: 6rd
(IPv6 Rapid Deployment) Support. Struct in6_addr is the issue.
I'm only seeing this on x86_64 systems, not on 32-bit with same
IPv6 config options, so it could be there's a missing forward
declaration somewhere, but including the correct header file
fixes the problem too.
CC [M] net/ipv6/ip6_tunnel.o
In file included from net/ipv6/ip6_tunnel.c:31:
include/linux/if_tunnel.h:59: error: field ‘prefix’ has incomplete type
make[2]: *** [net/ipv6/ip6_tunnel.o] Error 1
make[1]: *** [net/ipv6] Error 2
Signed-off-by: Brian Haley <brian.haley@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Gerrit Renker [Mon, 5 Oct 2009 00:53:13 +0000 (00:53 +0000)]
dccp ccid-3: Remove CCID naming redundancy 2/2
This continues the previous patch, by applying the same change to CCID-3.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Gerrit Renker [Mon, 5 Oct 2009 00:53:12 +0000 (00:53 +0000)]
dccp ccid-2: Remove CCID naming redundancy 1/2
This removes a redundancy in the CCID half-connection (hc) naming scheme:
* instead of 'hctx->tx_...', write 'hc->tx_...';
* instead of 'hcrx->rx_...', write 'hc->rx_...';
which works because the 'type' of the half-connection is encoded in the
'rx_' / 'tx_' prefixes.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Gerrit Renker [Mon, 5 Oct 2009 00:53:11 +0000 (00:53 +0000)]
dccp ccid-3: Overhaul CCID naming convention 2/2
This implements the new naming scheme also for CCID-3.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Gerrit Renker [Mon, 5 Oct 2009 00:53:10 +0000 (00:53 +0000)]
dccp ccid-2: Overhaul CCID naming convention 1/2
This patch starts a less problematic naming convention for CCID structs.
The old naming convention used 'hc{tx,rx}->ccid?hc{tx,rx}->...' as
recurring prefixes, which made the code
* hard to write (not easy to fit into 80 characters);
* hard to read (most of the space is occupied by prefixes).
The new naming scheme:
* struct entries for the TX socket are prefixed by 'tx_';
* and those for the RX socket are prefixed by 'rx_'.
The identifiers then remain distinguishable when grep-ing through the tree:
(a) RX/TX sockets are distinguished by the naming scheme,
(b) individual CCIDs are distinguished by filename (ccid{2,3,4}.{c,h}).
This first patch implements the scheme for CCID-2.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
libertas: Use lbs_is_cmd_allowed() check in command handling routines.
lbs_is_cmd_allowed() check is added in __lbs_cmd_async() and
lbs_prepare_and_send_command(). The check is removed from other places.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k: add a helper to clean the core driver upon module unload
The core driver needs to be stopped and then as a last step the
hardware needs to be stopped and its structure free'd. We do this
by moving the core driver cleanup to a new helper ath_clean_core()
and have ath_cleanup() call it. Only as a last step does
ath_cleanup() now free the hw.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
debugfs uses the hardware for several debugfs files as such the
hardware must be initialized and available prior to its usage. The
same applies to when we free the hw structs -- free debufs file
entries prior to free'ing the hardware.
Reported-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath5k: enable Power-Save Polls by setting the association ID
mac80211 has long provided us the association ID. This isn't useful except
for Power-Save polling which now gets enabled. We can now poll for our
pending frames on the AP during power save.
You can review the details of Power-Save on the wireless wiki:
ath5k: simplify passed params to ath5k_hw_set_associd()
We have access to common->curbssid and common->curaid so just
use those. Note that common->curaid is always 0 so this keeps
our current behaviour of always using 0 for now. Once we fix
storing the association ID passed by mac80211 this will
require no changes here.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>