Some platforms do not allow to put HSI block into low-power
mode when FIFO is not empty. The patch flushes (by reading)
FIFO at wake down sequence. Asynchronous read and write is
implemented for that. As a side effect this will also greatly
improve performance.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Tarnyagin [Thu, 13 Oct 2011 11:29:24 +0000 (11:29 +0000)]
caif-hsi: Fix for wakeup condition problem
Under stressed conditions a race could happen when del_timer_sync() was called
from softirq context at the same time when mod_timer_pending() for the same
timer was called from the workqueue. This leaded to a state mismatch in the
CAIF HSI driver and following unexpected link wakeup procedure.
The fix puts del_timer_sync() and mod_timer_pending() calls under a spin lock
to protect against the race condition.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Steffen Klassert [Tue, 11 Oct 2011 01:44:30 +0000 (01:44 +0000)]
xfrm6: Don't call icmpv6_send on local error
Calling icmpv6_send() on a local message size error leads to
an incorrect update of the path mtu. So use xfrm6_local_rxpmtu()
to notify about the pmtu if the IPV6_DONTFRAG socket option is
set on an udp or raw socket, according RFC 3542 and use
ipv6_local_error() otherwise.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Steffen Klassert [Tue, 11 Oct 2011 01:43:33 +0000 (01:43 +0000)]
ipv6: Fix IPsec slowpath fragmentation problem
ip6_append_data() builds packets based on the mtu from dst_mtu(rt->dst.path).
On IPsec the effective mtu is lower because we need to add the protocol
headers and trailers later when we do the IPsec transformations. So after
the IPsec transformations the packet might be too big, which leads to a
slowpath fragmentation then. This patch fixes this by building the packets
based on the lower IPsec mtu from dst_mtu(&rt->dst) and adapts the exthdr
handling to this.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
John Fastabend [Mon, 10 Oct 2011 09:16:41 +0000 (09:16 +0000)]
net: allow vlan traffic to be received under bond
The following configuration used to work as I expected. At least
we could use the fcoe interfaces to do MPIO and the bond0 iface
to do load balancing or failover.
This worked because of a change we added to allow inactive slaves
to rx 'exact' matches. This functionality was kept intact with the
rx_handler mechanism. However now the vlan interface attached to the
active slave never receives traffic because the bonding rx_handler
updates the skb->dev and goto's another_round. Previously, the
vlan_do_receive() logic was called before the bonding rx_handler.
Now by the time vlan_do_receive calls vlan_find_dev() the
skb->dev is set to bond0 and it is clear no vlan is attached
to this iface. The vlan lookup fails.
This patch moves the VLAN check above the rx_handler. A VLAN
tagged frame is now routed to the eth2.228-fcoe iface in the
above schematic. Untagged frames continue to the bond0 as
normal. This case also remains intact,
eth2 --> bond0 --> vlan.228
Here the skb is VLAN tagged but the vlan lookup fails on eth2
causing the bonding rx_handler to be called. On the second
pass the vlan lookup is on the bond0 iface and completes as
expected.
Putting a VLAN.228 on both the bond0 and eth2 device will
result in eth2.228 receiving the skb. I don't think this is
completely unexpected and was the result prior to the rx_handler
result.
Note, the same setup is also used for other storage traffic that
MPIO is used with eg. iSCSI and similar setups can be contrived
without storage protocols.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Jesse Gross <jesse@nicira.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Tested-by: Hans Schillstrom <hams.schillstrom@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Kirsher [Fri, 7 Oct 2011 22:07:44 +0000 (22:07 +0000)]
cs89x0: Move the driver into the Cirrus dir
The cs89x0 driver was initial placed in the apple/ when it
should have been placed in the cirrus/. This resolves the
issue by moving the dirver and fixing up the respective
Kconfig(s) and Makefile(s).
Thanks to Sascha for reporting the issue.
-v2 Fix a config error that was introduced with v1 by removing
the dependency on MACE for NET_VENDOR_APPLE.
CC: Russell Nelson <nelson@crynwr.com> CC: Andrew Morton <akpm@linux-foundation.org> Reported-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Thu, 6 Oct 2011 10:28:31 +0000 (10:28 +0000)]
macvlan: handle fragmented multicast frames
Fragmented multicast frames are delivered to a single macvlan port,
because ip defrag logic considers other samples are redundant.
Implement a defrag step before trying to send the multicast frame.
Reported-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Emil Tantilov [Thu, 29 Sep 2011 05:01:29 +0000 (05:01 +0000)]
ixgbe: change the eeprom version reported by ethtool
Use 32bit value starting at offset 0x2d for displaying the firmware
version in ethtool. This should work for all current ixgbe HW
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
The BerliOS project, which currently hosts our mailinglist, will
close with the end of the year. Now take the chance and remove all
occurrences of the mailinglist address from the source files.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
MAINTAINERS: can: the mailinglist moved to vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:12 +0000 (05:31 +0000)]
ehea: Remove unused tcp_end field in send WQ
The tcp_end field is not actually used by the hardware, so there
is no need to set it.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:11 +0000 (05:31 +0000)]
ehea: Add GRO support
Add GRO support to the ehea driver.
v3:
[cascardo] no need to enable GRO, since it's enabled by default
[cascardo] vgrp was removed in the vlan cleanup
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:10 +0000 (05:31 +0000)]
ehea: Remove LRO support
In preparation for adding GRO to ehea, remove LRO.
v3:
[cascardo] fixed conflict with vlan cleanup
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:09 +0000 (05:31 +0000)]
ehea: Add 64bit statistics
Switch to using ndo_get_stats64 to get 64bit statistics.
v3:
[cascardo] use rtnl_link_stats64 as port stats
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:08 +0000 (05:31 +0000)]
ehea: Remove some unused definitions
The queue macros are many levels deep and it makes it harder to
work your way through them when many of the versions are unused.
Remove the unused versions.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:07 +0000 (05:31 +0000)]
ehea: Simplify type 3 transmit routine
If a nonlinear skb fits within the immediate area, use skb_copy_bits
instead of copying the frags by hand.
v3:
[cascardo] fixed conflict with use of skb frag API
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:06 +0000 (05:31 +0000)]
ehea: Merge swqe2 TSO and non TSO paths
write_swqe2_TSO and write_swqe2_nonTSO are almost identical.
For TSO we have to set the TSO and mss bits in the wqe and we only
put the header in the immediate area, no data. Collapse both
functions into write_swqe2_immediate.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:05 +0000 (05:31 +0000)]
ehea: Simplify ehea_xmit2 and ehea_xmit3
Based on a patch from Michael Ellerman, clean up a significant
portion of the transmit path. There was a lot of duplication here.
Even worse, we were always checksumming tx packets and ignoring the
skb->ip_summed field.
Also remove NETIF_F_FRAGLIST from dev->features, I'm not sure why
it was enabled.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:04 +0000 (05:31 +0000)]
ehea: Allocate large enough skbs to avoid partial cacheline DMA writes
The ehea adapter has a mode where it will avoid partial cacheline DMA
writes on receive by always padding packets to fall on a cacheline
boundary.
Unfortunately we currently aren't allocating enough space for a full
ethernet MTU packet to be rounded up, so this optimisation doesn't hit.
It's unfortunate that the next largest packet size exposed by the
hypervisor interface is 2kB, meaning our skb allocation comes out of a
4kB SLAB. However the performance increase due to this optimisation is
quite large and my TCP stream numbers increase from 900MB to 1000MB/sec.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:03 +0000 (05:31 +0000)]
ehea: Add vlan_features
We weren't enabling any VLAN features so we missed out on checksum
offload and TSO when using VLANs. Enable them.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:02 +0000 (05:31 +0000)]
ehea: Dont check NETIF_F_TSO in TX path
It seems like the ehea xmit routine and an ethtool change of TSO
mode could race, resulting in corrupt packets. Checking gso_size
is enough and we can use the helper function.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:01 +0000 (05:31 +0000)]
ehea: Remove num_tx_qps module option
The num_tx_qps module option allows a user to configure a different
number of tx and rx queues. Now the networking stack is multiqueue
aware it makes little sense just to enable the tx queues and not the
rx queues so remove the option.
v3:
[cascardo] fixed conflict with get_stats change
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:31:00 +0000 (05:31 +0000)]
ehea: Remove force_irq logic in napi poll routine
commit 18604c548545 (ehea: NAPI multi queue TX/RX path for SMP) added
driver specific logic for exiting napi mode. I'm not sure what it was
trying to solve and it should be up to the network stack to decide when
we are done polling so remove it.
v3:
[cascardo] Fixed extra parentheses.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:30:59 +0000 (05:30 +0000)]
ehea: Update multiqueue support
The ehea driver had some multiqueue support but was missing the last
few years of networking stack improvements:
- Use skb_record_rx_queue to record which queue an skb came in on.
- Remove the driver specific netif_queue lock and use the networking
stack transmit lock instead.
- Remove the driver specific transmit queue hashing and use
skb_get_queue_mapping instead.
- Use netif_tx_{start|stop|wake}_queue where appropriate. We can also
remove pr->queue_stopped and just check the queue status directly.
- Print all 16 queues in the ethtool stats.
We now enable multiqueue by default since it is a clear win on all my
testing so far.
v3:
[cascardo] fixed use_mcs parameter description
[cascardo] set ehea_ethtool_stats_keys as const
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Fri, 14 Oct 2011 05:30:58 +0000 (05:30 +0000)]
ehea: Remove NETIF_F_LLTX
Remove the deprecated NETIF_F_LLTX feature. Since the network stack
now provides the locking we can remove the driver specific
pr->xmit_lock.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Emil Tantilov [Thu, 6 Oct 2011 08:57:04 +0000 (08:57 +0000)]
ixgbe: allow eeprom writes via ethtool
Implement support for ethtool -E
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Emil Tantilov [Tue, 11 Oct 2011 08:24:57 +0000 (08:24 +0000)]
ixgbe: fix endianess when writing driver version to firmware
This patch makes sure that register writes are in little endian and
also converts the reads back to big-endian.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Greg Rose [Fri, 14 Oct 2011 02:57:14 +0000 (02:57 +0000)]
igb: Check if subordinate VFs are assigned to virtual machines
Kvm and the Xen pci-back driver will set a flag in the virtual function
pci device dev_flags when the VF is assigned to a guest VM. Before
destroying subordinate VFs check to see if the flag is set and if so
skip the call to pci_disable_sriov() to avoid system crashes.
Copy the maintainer for the Xen pci-back driver. Also CC'ing
maintainers of all drivers found to call pci_disable_sriov().
V2 - Fix uninitialized variable warning
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Sathya Perla <sathya.perla@emulex.com> Cc: Dimitris Michailidis <dm@chelsio.com> Cc: Jon Mason <jdmason@kudzu.us> Cc: James Smart <james.smart@emulex.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Michał Mirosław [Tue, 30 Aug 2011 17:07:11 +0000 (17:07 +0000)]
igbvf: convert to ndo_fix_features
Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM.
Removing this needs deeper surgery.
Things noticed:
- HW VLAN acceleration probably can be toggled, but it's left as is
- the resets on RX csum offload change can probably be avoided
- there is A LOT of copy-and-pasted code here
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jacob Keller [Wed, 12 Oct 2011 00:51:54 +0000 (00:51 +0000)]
igb: enable l4 timestamping for v2 event packets
When enabling hardware timestamping for ptp v2 event packets, the
software does not setup the queue for l4 packets, although layer 4
packets are valid for v2. This patch adds the flag which enables
setting up a queue and enabling udp packet timestamping.
Signed-off-by: Jacob E Keller <jacob.e.keller@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Greg Rose [Sat, 8 Oct 2011 03:05:24 +0000 (03:05 +0000)]
if_link: Add additional parameter to IFLA_VF_INFO for spoof checking
Add configuration setting for drivers to turn spoof checking on or off
for discrete VFs.
v2 - Fix indentation problem, wrap the ifla_vf_info structure in
#ifdef __KERNEL__ to prevent user space from accessing and
change function paramater for the spoof check setting netdev
op from u8 to bool.
v3 - Preset spoof check setting to -1 so that user space tools such
as ip can detect that the driver didn't report a spoofcheck
setting. Prevents incorrect display of spoof check settings
for drivers that don't report it.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Commit 67fd4fcb (e1000e: convert to stats64) added the ability to update
statistics more accurately and on-demand through the net_device_ops
.ndo_get_stats64 hook, but introduced a locking bug on 82577/8/9 when
linked at half-duplex (seen on kernels with CONFIG_DEBUG_ATOMIC_SLEEP=y and
CONFIG_PROVE_LOCKING=y). The commit introduced code paths that caused a
mutex to be locked in atomic contexts, e.g. an rcu_read_lock is held when
irqbalance reads the stats from /sys/class/net/ethX/statistics causing the
mutex to be locked to read the Phy half-duplex statistics registers.
The mutex was originally introduced to prevent concurrent accesses of
resources (the NVM and Phy) shared by the driver, firmware and hardware
a few years back when there was an issue with the NVM getting corrupted.
It was later split into two mutexes - one for the NVM and one for the Phy
when it was determined the NVM, unlike the Phy, should not be protected by
the software/firmware/hardware semaphore (arbitration of which is done in
part with the SWFLAG bit in the EXTCNF_CTRL register). This latter
semaphore should be sufficient to prevent resource contention of the Phy in
the driver (i.e. the mutex for Phy accesses is not needed), but to be sure
the mutex is replaced with an atomic bit flag which will warn if any
contention is possible.
Also add additional debug output to help determine when the sw/fw/hw
semaphore is owned by the firmware or hardware.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Reported-by: Francois Romieu <romieu@fr.zoreil.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Daniel Drake [Fri, 14 Oct 2011 11:05:26 +0000 (12:05 +0100)]
libertas: fix changing interface type when interface is down
The recent changes to only power the device when the interface up
introduced a bug: changing interface type, legal when the interface
is down, performs device I/O.
Fix this functionality by validating and recording the interface
type when the change is requested, but only applying the change
if/when the interface is brought up.
Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 13 Oct 2011 14:30:39 +0000 (16:30 +0200)]
nl80211: Add sta_flags to the station info
Reuse the already existing struct nl80211_sta_flag_update to specify
both, a flag mask and the flag set itself. This means
nl80211_sta_flag_update is now used for setting station flags and also
for getting station flags.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The AR946/8x chips are 2x2 Dual band with BT support. In order
to avoid misleading with other chips and to be in sync with
marketing team's term, AR9480 is renamed as AR9462.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw: Do fast channel change based on reusable calibration results
Support the fast channel change across band switch only when there
are available of reusable cabliration results. And also observed that
doing agc control calibration on fastcc, sometimes causing calibration
timeout. Hence changing agc control to be run only on full chip reset.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw: Support fast channel change on 5GHz for AR9003 chips
The commit "ath9k_hw: Improve fast channel change for AR9003 chips"
fixes the fast channel change issue for AR9003 chips that was
originally observed in AR9382 chip. Hence enabling fastcc support
again for 11A channel for AR9003 chips.
Cc: Paul Stewart <pstew@google.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw: Cleanup Tx calibrations for AR9003 chips
Currently Tx IQ calibration is enabled by default for all AR9003
chips. But for AR9480, the calibration status should be read from
chip after processing ini. And also the carrier leak calibration
status is checked during init cal. As the init_cal is being called
for fast channel change too, the tx_cl status only be read after
full reset. Hence moving that into process ini function.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw: Add support to reuse TxIQ cal measurements
Pass an argument to decide whether to reuse the Tx IQ
calibration measurements or not during fast channel change.
This will be later used by MCI support for AR9480.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw: Improve fast channel change for AR9003 chips
In order to reduce the overall scan time, fast channel change
should be implemented properly. This patch adds fast channel
change support across band switch or channel mode switch
instead of doing full chip reset. During the fastcc, tx iqcal
measurements are preserved and will be reloaded after successful
the channel change.
This patch also addressed fast channel issue where the STA can not
see APs in higher than operating channel on 5GHz band after
the association.
Cc: Paul Stewart <pstew@google.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Thu, 13 Oct 2011 03:29:33 +0000 (20:29 -0700)]
mwifiex: fix make namespacecheck warnings
This patch takes care of warnings found by running
'make namespacecheck':
1. Remove dead code.
2. Reorder function definitions to avoid forward declarations.
3. Remove unnecessary function/structure declarations and mark
them as static.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Thu, 13 Oct 2011 03:28:06 +0000 (20:28 -0700)]
mwifiex: use separate wait condition for each command node
Currently global wait condition (adapter->cmd_wait_q.condition)
is used while sending synchronous commands to FW. When two threads
enter in mwifiex_send_cmd_sync() routine at the same time, both the
threads wait for their command responses. Since wait condition is
same for both, they wake up simultaneously after getting response
of 1st command. After this when a thread is waiting for command
response of 3rd command, it wakes up after getting response of 2nd
command and so on. Therefore we don't wait for the response of last
command(0xaa) during unload. Hence while next time loading the driver
command time out is seen for INIT command.
This problem is resolved by having separate wait condition flag for
each command(except scan command). Since scan command is treated
differently (by maintaining scan pending q etc.), newly defined flag
(scan_wait_q_woken) is used as a scan wait condition.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alwin Beukers [Wed, 12 Oct 2011 18:51:32 +0000 (20:51 +0200)]
brcm80211: removed file wifi.c
Wifi.c was empty after previous cleanups, so it was removed.
Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alwin Beukers [Wed, 12 Oct 2011 18:51:31 +0000 (20:51 +0200)]
brcm80211: moved function brcmu_format_flags
Moved the brcmu_format_flags function and brcmu_bit_desc structure
into smac. Names were adjusted accordingly.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alwin Beukers [Wed, 12 Oct 2011 18:51:30 +0000 (20:51 +0200)]
brcm80211: moved function brcmu_mkiovar
Moved the brcmu_mkiovar function into fmac, adjusting the
name accordingly.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alwin Beukers [Wed, 12 Oct 2011 18:51:29 +0000 (20:51 +0200)]
brcm80211: moved function brcmu_chspec_malformed
Moved brcmu_chspec_malformed into the only file using it. The
function name was adjusted accordingly.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alwin Beukers [Wed, 12 Oct 2011 18:51:28 +0000 (20:51 +0200)]
brcm80211: moved function brcmu_parse_tlvs
Moved the brcmu_parse_tlvs function and brcmu_tlv structure into
the only file using them. Names were adjusted accordingly.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alwin Beukers [Wed, 12 Oct 2011 18:51:27 +0000 (20:51 +0200)]
brcm80211: moved function brcmu_chipname
Moved the brcmu_chipname function into the only file using it.
The function name was adjusted accordingly.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alwin Beukers [Wed, 12 Oct 2011 18:51:26 +0000 (20:51 +0200)]
brcm80211: moved power conversion functions
Moved brcmu_mw_to_qdbm and brcmu_qdbm_to_mw functions into the only
file using them. Names were adjusted accordingly.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Roland Vossen [Wed, 12 Oct 2011 18:51:24 +0000 (20:51 +0200)]
brcm80211: fmac: fixed weird indentation
And changed function name to something more appropriate.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 12 Oct 2011 18:51:23 +0000 (20:51 +0200)]
brcm80211: use endian annotation for scan time configuration
For scanning several timeout parameters are configured on the device.
These parameters have been endian annotated and converted appropriately.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 12 Oct 2011 18:51:22 +0000 (20:51 +0200)]
brcm80211: use endian annotation for roaming related parameters
The parameters for roaming are sent to the device and should be little
endian. These have been annotated and converted appropriately.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 12 Oct 2011 18:51:21 +0000 (20:51 +0200)]
brcm80211: use endian annotations for assoc ie length request
The driver requests the device for number of ie's in assoc request
and response. This needed to be endian annotated.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 12 Oct 2011 18:51:20 +0000 (20:51 +0200)]
brcm80211: use endian annotation for pmk related structure
The pairwise master key configuration is sent to the device. The
structure has been annotated for endianess checking.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 12 Oct 2011 18:51:19 +0000 (20:51 +0200)]
brcm80211: use endian annotations in scan related function
The scan related functions provide scan parameters to the device
which need to be in little-endian. These parameters have been
annotated and conversions were placed as needed.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 12 Oct 2011 18:51:18 +0000 (20:51 +0200)]
brcm80211: fix annotations in TOE configuration functions
The configuration function for the TCP offload engine were not
taking CPU endianess into account. Proper annotations and conversions
have been added.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 12 Oct 2011 18:51:17 +0000 (20:51 +0200)]
brcm80211: rename variable in _brcmf_set_multicast_list()
The variable allmulti was used to provision IFF_ALLMULTI to the
device as well as IFF_PROMISC. For clarity the variable has been
renamed.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 12 Oct 2011 18:51:16 +0000 (20:51 +0200)]
brcm80211: add endian annotation to packet filter structures
The packet filter structures were byte copied and transferred over the
host bus to the device. As such they are little endian and have been
annotated accordingly.
Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 12 Oct 2011 18:51:14 +0000 (20:51 +0200)]
brcm80211: remove sparse warning in fullmac debug function
The debug function did a write operation which required a different
pointer type resulting in a sparse warning.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Alwin Beukers <alwin@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alwin Beukers [Wed, 12 Oct 2011 18:51:13 +0000 (20:51 +0200)]
brcm80211: cleanup function prototypes
- removed unneeded fn prototypes from include files.
- explicitly marked fn prototypes as extern in include files.
- reordered functions to account for removed forward declarations
in include files.
- removed unused functions: brcms_c_txflowcontrol_override,
brcms_c_txflowcontrol_prio_isset, brcms_c_txflowcontrol.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Timer functions were called at soft-irq level, leading to the limitation
that mutexes could not be used. Lifted this limitation by migrating to
work queues.
Reviewed-by: Alwin Beukers <alwin@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Roland Vossen [Wed, 12 Oct 2011 18:51:11 +0000 (20:51 +0200)]
brcm80211: smac: removed redundant timer function parameters
Parameter 'wl' is already stored in struct brcms_timer, so the number of
function parameters could be decreased.
Reviewed-by: Alwin Beukers <alwin@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Wed, 12 Oct 2011 08:10:37 +0000 (11:10 +0300)]
iwmc3200wifi: add a range check to iwm_cfg80211_get_key()
Smatch complains that "key_index" is capped at 5 in nl80211_get_key()
but iwm->keys[] only has 4 elements. I don't know if this is really
needed, but the other ->get_key() implementations seemed to check
for overflows so I've added a check here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chaoming Li [Wed, 12 Oct 2011 02:28:51 +0000 (21:28 -0500)]
rtlwifi: rtl8192de: Updates from latest Reaktek driver - Part III
This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtl8192de driver.
The changes include:
1. Update for new chip versions
Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chaoming Li [Wed, 12 Oct 2011 20:59:09 +0000 (15:59 -0500)]
rtlwifi: rtl8192se: Updates from latest Realtek driver version - Part II
This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtl8192se driver.
The changes include:
1. Fixing some typos in register usage.
2. A change in the handling of decryption status for 802.11w packets.
Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chaoming Li [Wed, 12 Oct 2011 02:28:49 +0000 (21:28 -0500)]
rtlwifi: rtl8192ce: Add new chip revisions
This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtlwifi driver.
The changes include:
1. Adding new chip revisions including new firmware.
Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>