linux-drm-fsl-dcu.git
10 years agoMerge branch 'neigh'
David S. Miller [Tue, 10 Dec 2013 01:56:27 +0000 (20:56 -0500)]
Merge branch 'neigh'

Jiri Pirko says:

====================
neigh: respect default parms values

This is a long standing regression. But since the patchset is bigger and
the regression happened in 2007, I'm proposing this to net-next instead.

Basically the problem is that if user wants to use /etc/sysctl.conf to specify
default values of neigh related params, he is not able to do that.

The reason is that the default values are copied to dev instance right after
netdev is registered. And that is way to early. The original behaviour
for ipv4 was that this happened after first address was assigned to device.
For ipv6 this was apparently from the very beginning.

So this patchset basically reverts the behaviour back to what it was in 2007 for
ipv4 and changes the behaviour for ipv6 so they are both the same.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoneigh: ipv6: respect default values set before an address is assigned to device
Jiri Pirko [Sat, 7 Dec 2013 18:26:57 +0000 (19:26 +0100)]
neigh: ipv6: respect default values set before an address is assigned to device

Make the behaviour similar to ipv4. This will allow user to set sysctl
default neigh param values and these values will be respected even by
devices registered before (that ones what do not have address set yet).

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoneigh: restore old behaviour of default parms values
Jiri Pirko [Sat, 7 Dec 2013 18:26:56 +0000 (19:26 +0100)]
neigh: restore old behaviour of default parms values

Previously inet devices were only constructed when addresses are added.
Therefore the default neigh parms values they get are the ones at the
time of these operations.

Now that we're creating inet devices earlier, this changes the behaviour
of default neigh parms values in an incompatible way (see bug #8519).

This patch creates a compromise by setting the default values at the
same point as before but only for those that have not been explicitly
set by the user since the inet device's creation.

Introduced by:
commit 8030f54499925d073a88c09f30d5d844fb1b3190
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Thu Feb 22 01:53:47 2007 +0900

    [IPV4] devinet: Register inetdev earlier.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoneigh: use tbl->family to distinguish ipv4 from ipv6
Jiri Pirko [Sat, 7 Dec 2013 18:26:55 +0000 (19:26 +0100)]
neigh: use tbl->family to distinguish ipv4 from ipv6

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoneigh: wrap proc dointvec functions
Jiri Pirko [Sat, 7 Dec 2013 18:26:54 +0000 (19:26 +0100)]
neigh: wrap proc dointvec functions

This will be needed later on to provide better management of default values.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoneigh: convert parms to an array
Jiri Pirko [Sat, 7 Dec 2013 18:26:53 +0000 (19:26 +0100)]
neigh: convert parms to an array

This patch converts the neigh param members to an array. This allows easier
manipulation which will be needed later on to provide better management of
default values.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'phy_reset'
David S. Miller [Tue, 10 Dec 2013 01:39:05 +0000 (20:39 -0500)]
Merge branch 'phy_reset'

Florian Fainelli says:

====================
net: phy: consolidate PHY reset

This patchset consolidates the PHY reset through the MII BMCR
register by using a central place were this is done.

This patchset resumes the work Kyle Moffett started here:
https://lkml.org/lkml/2011/10/20/301

Note that at this point, drivers doing funky things after issuing
a PHY reset using phy_init_hw() will still suffer from PHY state
machine problems, this will be taken care of later on.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: sh_eth: do not issue a wild PHY reset through BMCR
Florian Fainelli [Fri, 6 Dec 2013 21:01:38 +0000 (13:01 -0800)]
net: sh_eth: do not issue a wild PHY reset through BMCR

The sh_eth driver issues an uncontrolled PHY reset through the MII
register BMCR but fails to wait for the reset to complete, and will also
implicitely wipe out all possible PHY fixups applied. Use phy_init_hw()
which remedies both problems.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: tc35815: use phy_init_hw for PHY reset
Florian Fainelli [Fri, 6 Dec 2013 21:01:37 +0000 (13:01 -0800)]
net: tc35815: use phy_init_hw for PHY reset

Instead of open-coding the PHY reset through MII BMCR, use phy_init_hw()
which does that for us and also makes sure that any PHY specific fixups
are applied.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: pxa168_eth: use phy_init_hw for PHY reset
Florian Fainelli [Fri, 6 Dec 2013 21:01:36 +0000 (13:01 -0800)]
net: pxa168_eth: use phy_init_hw for PHY reset

Instead of open-coding a PHY reset through the MII BMCR register, use
phy_init_hw() which does this for us and ensures that PHY device fixups
are also applied. We also remove a call to ethernet_phy_reset() which is
now unncessary since phy_attach() calls phy_attach_direct() which in
turns calls phy_init_hw().

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: mv643xx_eth: use phy_init_hw to reset PHY
Florian Fainelli [Fri, 6 Dec 2013 21:01:35 +0000 (13:01 -0800)]
net: mv643xx_eth: use phy_init_hw to reset PHY

Instead of open-coding a PHY reset through the MII BMCR register, use
phy_init_hw() which does that for us and will also make sure that PHY
fixups are applied if required. We also remove a call to phy_reset()
due to the following sequence of calls in the driver:

phy_scan()
-> phy_connect()
-> phy_connect_direct()
-> phy_attach_direct()
-> phy_init_hw()

and we only have a call to phy_init() after phy_scan().

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: phy: consolidate PHY reset in phy_init_hw()
Florian Fainelli [Fri, 6 Dec 2013 21:01:34 +0000 (13:01 -0800)]
net: phy: consolidate PHY reset in phy_init_hw()

There are quite a lot of drivers touching a PHY device MII_BMCR
register to reset the PHY without taking care of:

1) ensuring that BMCR_RESET is cleared after a given timeout
2) the PHY state machine resuming to the proper state and re-applying
potentially changed settings such as auto-negotiation

Introduce phy_poll_reset() which will take care of polling the MII_BMCR
for the BMCR_RESET bit to be cleared after a given timeout or return a
timeout error code.

In order to make sure the PHY is in a correct state, phy_init_hw() first
issues a software reset through MII_BMCR and then applies any fixups.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: bfin_mac: do not reset PHY after phy_start()
Florian Fainelli [Fri, 6 Dec 2013 21:01:33 +0000 (13:01 -0800)]
net: bfin_mac: do not reset PHY after phy_start()

The PHY is already reset during driver probing, and this manual reset
after calling phy_start() will wipe out board-specific PHY fixups and
driver specific configuration initialization. Remove that explicit PHY
reset.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: greth: use phy_read_status()
Florian Fainelli [Fri, 6 Dec 2013 21:01:32 +0000 (13:01 -0800)]
net: greth: use phy_read_status()

In case the greth driver is bound to anything but the Generic PHY
driver or the PHY has a special read_status callback implemented,
unexpected things will happen. Make sure we that we use
phy_read_status() which does the proper abstraction of calling the
driver specific read_status() callback for a given PHY.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: phy: use phy_init_hw instead of open-coding it
Florian Fainelli [Fri, 6 Dec 2013 21:01:31 +0000 (13:01 -0800)]
net: phy: use phy_init_hw instead of open-coding it

Use phy_init_hw() instead of open-coding it in phy_mii_ioctl(), this
improves consistenty and makes sure that we will not duplicate the same
routine somewhere else.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: phy: report link partner features through ethtool
Florian Fainelli [Fri, 6 Dec 2013 21:01:30 +0000 (13:01 -0800)]
net: phy: report link partner features through ethtool

The PHY library already reads the MII_STAT1000 and MII_LPA registers in
genphy_read_status(), so extend it to also populate the PHY device link
partner advertised features such that we can feed this back into ethtool
when asked for it in phy_ethtool_gset().

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotun: remove useless codes in tun_chr_aio_read() and tun_recvmsg()
Zhi Yong Wu [Fri, 6 Dec 2013 20:55:00 +0000 (04:55 +0800)]
tun: remove useless codes in tun_chr_aio_read() and tun_recvmsg()

By checking related codes, it is impossible that ret > len or total_len,
so we should remove some useless codes in both above functions.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agomacvtap: remove useless codes in macvtap_aio_read() and macvtap_recvmsg()
Zhi Yong Wu [Fri, 6 Dec 2013 20:54:59 +0000 (04:54 +0800)]
macvtap: remove useless codes in macvtap_aio_read() and macvtap_recvmsg()

By checking related codes, it is impossible that ret > len or total_len,
so we should remove some useless coeds in both above functions.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoxen-netback: improve guest-receive-side flow control
Paul Durrant [Fri, 6 Dec 2013 16:36:07 +0000 (16:36 +0000)]
xen-netback: improve guest-receive-side flow control

The way that flow control works without this patch is that, in start_xmit()
the code uses xenvif_count_skb_slots() to predict how many slots
xenvif_gop_skb() will consume and then adds this to a 'req_cons_peek'
counter which it then uses to determine if the shared ring has that amount
of space available by checking whether 'req_prod' has passed that value.
If the ring doesn't have space the tx queue is stopped.
xenvif_gop_skb() will then consume slots and update 'req_cons' and issue
responses, updating 'rsp_prod' as it goes. The frontend will consume those
responses and post new requests, by updating req_prod. So, req_prod chases
req_cons which chases rsp_prod, and can never exceed that value. Thus if
xenvif_count_skb_slots() ever returns a number of slots greater than
xenvif_gop_skb() uses, req_cons_peek will get to a value that req_prod cannot
possibly achieve (since it's limited by the 'real' req_cons) and, if this
happens enough times, req_cons_peek gets more than a ring size ahead of
req_cons and the tx queue then remains stopped forever waiting for an
unachievable amount of space to become available in the ring.

Having two routines trying to calculate the same value is always going to be
fragile, so this patch does away with that. All we essentially need to do is
make sure that we have 'enough stuff' on our internal queue without letting
it build up uncontrollably. So start_xmit() makes a cheap optimistic check
of how much space is needed for an skb and only turns the queue off if that
is unachievable. net_rx_action() is the place where we could do with an
accurate predicition but, since that has proven tricky to calculate, a cheap
worse-case (but not too bad) estimate is all we really need since the only
thing we *must* prevent is xenvif_gop_skb() consuming more slots than are
available.

Without this patch I can trivially stall netback permanently by just doing
a large guest to guest file copy between two Windows Server 2008R2 VMs on a
single host.

Patch tested with frontends in:
- Windows Server 2008R2
- CentOS 6.0
- Debian Squeeze
- Debian Wheezy
- SLES11

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Annie Li <annie.li@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotipc: remove interface state mirroring in bearer
Erik Hugne [Fri, 6 Dec 2013 15:08:00 +0000 (10:08 -0500)]
tipc: remove interface state mirroring in bearer

struct 'tipc_bearer' is a generic representation of the underlying
media type, and exists in a one-to-one relationship to each interface
TIPC is using. The struct contains a 'blocked' flag that mirrors the
operational and execution state of the represented interface, and is
updated through notification calls from the latter. The users of
tipc_bearer are checking this flag before each attempt to send a
packet via the interface.

This state mirroring serves no purpose in the current code base. TIPC
links will not discover a media failure any faster through this
mechanism, and in reality the flag only adds overhead at packet
sending and reception.

Furthermore, the fact that the flag needs to be protected by a spinlock
aggregated into tipc_bearer has turned out to cause a serious and
completely unnecessary deadlock problem.

CPU0                                    CPU1
----                                    ----
Time 0: bearer_disable()                link_timeout()
Time 1:   spin_lock_bh(&b_ptr->lock)      tipc_link_push_queue()
Time 2:   tipc_link_delete()                tipc_bearer_blocked(b_ptr)
Time 3:     k_cancel_timer(&req->timer)       spin_lock_bh(&b_ptr->lock)
Time 4:       del_timer_sync(&req->timer)

I.e., del_timer_sync() on CPU0 never returns, because the timer handler
on CPU1 is waiting for the bearer lock.

We eliminate the 'blocked' flag from struct tipc_bearer, along with all
tests on this flag. This not only resolves the deadlock, but also
simplifies and speeds up the data path execution of TIPC. It also fits
well into our ongoing effort to make the locking policy simpler and
more manageable.

An effect of this change is that we can get rid of functions such as
tipc_bearer_blocked(), tipc_continue() and tipc_block_bearer().
We replace the latter with a new function, tipc_reset_bearer(), which
resets all links associated to the bearer immediately after an
interface goes down.

A user might notice one slight change in link behaviour after this
change. When an interface goes down, (e.g. through a NETDEV_DOWN
event) all attached links will be reset immediately, instead of
leaving it to each link to detect the failure through a timer-driven
mechanism. We consider this an improvement, and see no obvious risks
with the new behavior.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Paul Gortmaker <Paul.Gortmaker@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agox25: convert printks to pr_<level>
wangweidong [Fri, 6 Dec 2013 11:24:33 +0000 (19:24 +0800)]
x25: convert printks to pr_<level>

use pr_<level> instead of printk(LEVEL)

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agopacket: introduce PACKET_QDISC_BYPASS socket option
Daniel Borkmann [Fri, 6 Dec 2013 10:36:17 +0000 (11:36 +0100)]
packet: introduce PACKET_QDISC_BYPASS socket option

This patch introduces a PACKET_QDISC_BYPASS socket option, that
allows for using a similar xmit() function as in pktgen instead
of taking the dev_queue_xmit() path. This can be very useful when
PF_PACKET applications are required to be used in a similar
scenario as pktgen, but with full, flexible packet payload that
needs to be provided, for example.

On default, nothing changes in behaviour for normal PF_PACKET
TX users, so everything stays as is for applications. New users,
however, can now set PACKET_QDISC_BYPASS if needed to prevent
own packets from i) reentering packet_rcv() and ii) to directly
push the frame to the driver.

In doing so we can increase pps (here 64 byte packets) for
PF_PACKET a bit:

  # CPUs -- QDISC_BYPASS   -- qdisc path -- qdisc path[**]
  1 CPU  ==  1,509,628 pps --  1,208,708 --  1,247,436
  2 CPUs ==  3,198,659 pps --  2,536,012 --  1,605,779
  3 CPUs ==  4,787,992 pps --  3,788,740 --  1,735,610
  4 CPUs ==  6,173,956 pps --  4,907,799 --  1,909,114
  5 CPUs ==  7,495,676 pps --  5,956,499 --  2,014,422
  6 CPUs ==  9,001,496 pps --  7,145,064 --  2,155,261
  7 CPUs == 10,229,776 pps --  8,190,596 --  2,220,619
  8 CPUs == 11,040,732 pps --  9,188,544 --  2,241,879
  9 CPUs == 12,009,076 pps -- 10,275,936 --  2,068,447
 10 CPUs == 11,380,052 pps -- 11,265,337 --  1,578,689
 11 CPUs == 11,672,676 pps -- 11,845,344 --  1,297,412
 [...]
 20 CPUs == 11,363,192 pps -- 11,014,933 --  1,245,081

 [**]: qdisc path with packet_rcv(), how probably most people
       seem to use it (hopefully not anymore if not needed)

The test was done using a modified trafgen, sending a simple
static 64 bytes packet, on all CPUs.  The trick in the fast
"qdisc path" case, is to avoid reentering packet_rcv() by
setting the RAW socket protocol to zero, like:
socket(PF_PACKET, SOCK_RAW, 0);

Tradeoffs are documented as well in this patch, clearly, if
queues are busy, we will drop more packets, tc disciplines are
ignored, and these packets are not visible to taps anymore. For
a pktgen like scenario, we argue that this is acceptable.

The pointer to the xmit function has been placed in packet
socket structure hole between cached_dev and prot_hook that
is hot anyway as we're working on cached_dev in each send path.

Done in joint work together with Jesper Dangaard Brouer.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: dev: move inline skb_needs_linearize helper to header
Daniel Borkmann [Fri, 6 Dec 2013 10:36:16 +0000 (11:36 +0100)]
net: dev: move inline skb_needs_linearize helper to header

As we need it elsewhere, move the inline helper function of
skb_needs_linearize() over to skbuff.h include file. While
at it, also convert the return to 'bool' instead of 'int'
and add a proper kernel doc.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Tue, 10 Dec 2013 01:20:14 +0000 (20:20 -0500)]
Merge git://git./linux/kernel/git/davem/net

Merge 'net' into 'net-next' to get the AF_PACKET bug fix that
Daniel's direct transmit changes depend upon.

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agopacket: fix send path when running with proto == 0
Daniel Borkmann [Fri, 6 Dec 2013 10:36:15 +0000 (11:36 +0100)]
packet: fix send path when running with proto == 0

Commit e40526cb20b5 introduced a cached dev pointer, that gets
hooked into register_prot_hook(), __unregister_prot_hook() to
update the device used for the send path.

We need to fix this up, as otherwise this will not work with
sockets created with protocol = 0, plus with sll_protocol = 0
passed via sockaddr_ll when doing the bind.

So instead, assign the pointer directly. The compiler can inline
these helper functions automagically.

While at it, also assume the cached dev fast-path as likely(),
and document this variant of socket creation as it seems it is
not widely used (seems not even the author of TX_RING was aware
of that in his reference example [1]). Tested with reproducer
from e40526cb20b5.

 [1] http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap#Example

Fixes: e40526cb20b5 ("packet: fix use after free race in send path when dev is released")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Tested-by: Salam Noureddine <noureddine@aristanetworks.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agopkt_sched: give visibility to mq slave qdiscs
Eric Dumazet [Thu, 5 Dec 2013 19:12:02 +0000 (11:12 -0800)]
pkt_sched: give visibility to mq slave qdiscs

Commit 6da7c8fcbcbd ("qdisc: allow setting default queuing discipline")
added the ability to change default qdisc from pfifo_fast to say fq

But as most modern ethernet devices are multiqueue, we cant really
see all the statistics from "tc -s qdisc show", as the default root
qdisc is mq.

This patch adds the calls to qdisc_list_add() to mq and mqprio

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Tue, 10 Dec 2013 00:21:31 +0000 (19:21 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series contains updates to i40e only.

Jacob provides a i40e patch to get 1588 work correctly by separating
TSYNVALID and TSYNINDX fields in the receive descriptor.

Jesse provides several i40e patches, first to correct the checking
of the multi-bit state.  The hash is reported correctly in the RSS
field if and only if the filter status is 3.  Other values of the
filter status mean different things and we should not depend on a
bitwise result.  Then provides a patch to enable a couple of
workarounds based on revision ID that allow the driver to work
more fully on early hardware.

Shannon provides several i40e patches as well.  First sets the media
type in the hardware structure based on the external connection type.
Then provides a patch to only setup the rings that will be used.  Lastly
provides a fix where the TESTING state was still set when exiting the
ethtool diagnostics.

Kevin Scott provides one i40e patch to add a new flag to the i40e_add_veb()
which allows the driver to request the hardware to filter on layer 2
parameters.

Anjali provides four i40e patches, first refactors the reset code in
order to re-size queues and vectors while the interface is still up.
Then provides a patch to enable all PCTYPEs expect FCoE for RSS.  Adds
a message to notify the user of how many VFs are initialized on each
port.  Lastly adds a new variable to track the number of PF instances,
this is a global counter on purpose so that each PF loaded has a
unique ID.

Catherine bumps the driver version.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agowan: wanxl: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:32:10 +0000 (12:32 +0900)]
wan: wanxl: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agowan: pci200syn: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:31:46 +0000 (12:31 +0900)]
wan: pci200syn: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agowan: pc300too: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:31:12 +0000 (12:31 +0900)]
wan: pc300too: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agowan: lmc: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:30:41 +0000 (12:30 +0900)]
wan: lmc: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agowan: dscc4: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:29:46 +0000 (12:29 +0900)]
wan: dscc4: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoirda: vlsi_ir: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:29:08 +0000 (12:29 +0900)]
irda: vlsi_ir: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoirda: via-ircc: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:28:28 +0000 (12:28 +0900)]
irda: via-ircc: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: forcedeth: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:27:50 +0000 (12:27 +0900)]
net: forcedeth: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: ns83820: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:27:27 +0000 (12:27 +0900)]
net: ns83820: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: bna: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:26:44 +0000 (12:26 +0900)]
net: bna: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: sis900: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:25:44 +0000 (12:25 +0900)]
net: sis900: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: sfc: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 9 Dec 2013 03:24:07 +0000 (12:24 +0900)]
net: sfc: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoath9k: Apply tuning caps for AR9330 and AR9485
Sujith Manoharan [Fri, 6 Dec 2013 10:58:54 +0000 (16:28 +0530)]
ath9k: Apply tuning caps for AR9330 and AR9485

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix internal regulator for AR955x
Sujith Manoharan [Fri, 6 Dec 2013 10:58:53 +0000 (16:28 +0530)]
ath9k: Fix internal regulator for AR955x

The internal regulator needs to be programmed
correctly for AR955x.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Enable manual peak calibration for AR9331 v1.1
Sujith Manoharan [Fri, 6 Dec 2013 10:58:52 +0000 (16:28 +0530)]
ath9k: Enable manual peak calibration for AR9331 v1.1

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove AR9330 v1.0 macro as it's not supported
Sujith Manoharan [Fri, 6 Dec 2013 10:58:51 +0000 (16:28 +0530)]
ath9k: Remove AR9330 v1.0 macro as it's not supported

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix regulatory compliance
Sujith Manoharan [Fri, 6 Dec 2013 10:58:50 +0000 (16:28 +0530)]
ath9k: Fix regulatory compliance

Adjusting the CCA registers for maximum permissible
noise floor in ETSI/Japan domains has to be done for
all AR9003 family chips.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Identify duplicate AR9565 v1.0 initvals
Sujith Manoharan [Fri, 6 Dec 2013 10:58:49 +0000 (16:28 +0530)]
ath9k: Identify duplicate AR9565 v1.0 initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Identify duplicate AR9462 v2.0 initvals
Sujith Manoharan [Fri, 6 Dec 2013 10:58:48 +0000 (16:28 +0530)]
ath9k: Identify duplicate AR9462 v2.0 initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Identify duplicate AR9485 initvals
Sujith Manoharan [Fri, 6 Dec 2013 10:58:47 +0000 (16:28 +0530)]
ath9k: Identify duplicate AR9485 initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Update high power gain table for AR9300
Sujith Manoharan [Fri, 6 Dec 2013 10:58:46 +0000 (16:28 +0530)]
ath9k: Update high power gain table for AR9300

Now that the Buffalo-specific initvals have been
moved to a separate array, update the default high
power TX gain table for all AR9300 v2.2 devices.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Use a separate TX gain table for WZR-HP-G450H
Sujith Manoharan [Fri, 6 Dec 2013 10:58:45 +0000 (16:28 +0530)]
ath9k: Use a separate TX gain table for WZR-HP-G450H

The Buffalo device WZR-HP-G450H uses the index 3 for TX gain,
which is set to the high_power table currently. Later variants
of the router use the same index, but instead refer to the
low_ob_db gain table. This is not handled in the driver since
there is no way to distinguish board revisions and the high_power
table is used (incorrectly) for the newer variants.

By default, devices based on AR9300 using the TX gain index 3 have
to use the high_power table. To make sure that WZR-HP-G450H is not
broken when the high_power table is updated, use a separate array
based on information obtained from the platform data.

The current situation where only the original variant of WZR-HP-G450H
works properly stays unchanged.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Update AR9331 v1.2 initvals
Sujith Manoharan [Fri, 6 Dec 2013 10:58:44 +0000 (16:28 +0530)]
ath9k: Update AR9331 v1.2 initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Update AR9331 v1.1 initvals
Sujith Manoharan [Fri, 6 Dec 2013 10:58:43 +0000 (16:28 +0530)]
ath9k: Update AR9331 v1.1 initvals

* Update radio/baseband/gain tables.
* Mark ar9331_modes_high_power_tx_gain_1p1 as a duplicate
* ar9331_1p1_mac_postamble is not a duplicate.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove AR955x INI duplicates
Sujith Manoharan [Fri, 6 Dec 2013 10:58:42 +0000 (16:28 +0530)]
ath9k: Remove AR955x INI duplicates

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Update mac_postamble for AR9003 family
Sujith Manoharan [Fri, 6 Dec 2013 10:58:41 +0000 (16:28 +0530)]
ath9k: Update mac_postamble for AR9003 family

Enable the ALWAYS_KEYSEARCH bit in the initvals. Currently
this is done in the driver, but adding this to the initvals
makes it easier to be in sync with the INI files given
by the systems engineering team.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Initialize baseband for DFS channels
Sujith Manoharan [Fri, 6 Dec 2013 10:58:40 +0000 (16:28 +0530)]
ath9k: Initialize baseband for DFS channels

Certain baseband registers require different values
to be programmed when operating in a DFS channel to
ensure that radar detection works correctly. This
is required for AR9300, AR9340 and AR9580.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add initval arrays for DFS channels
Sujith Manoharan [Fri, 6 Dec 2013 10:58:39 +0000 (16:28 +0530)]
ath9k: Add initval arrays for DFS channels

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192c-common: Fix sparse warning
Larry Finger [Fri, 6 Dec 2013 04:07:12 +0000 (22:07 -0600)]
rtlwifi: rtl8192c-common: Fix sparse warning

Sparse reports the following:

  CHECK   drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:570:34: warning: dubious: !x & y

There should be a parens around the expression.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: enable the beaconing in mesh mode
Chun-Yeow Yeoh [Fri, 6 Dec 2013 03:28:02 +0000 (11:28 +0800)]
wcn36xx: enable the beaconing in mesh mode

Enable the beaconing in wnc36xx by tweaking the tim offset and
force the use of AP-style beaconing. Otherwise, beaconing is not
working. The tim offset is set to 256. Otherwise, this will
overwrite mesh beacon submitted by mac80211.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: enable dfs for mesh mode
Chun-Yeow Yeoh [Wed, 4 Dec 2013 10:46:54 +0000 (18:46 +0800)]
ath9k: enable dfs for mesh mode

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: do not flood kmsg/dmesg with USB debug messages
Ujjal Roy [Tue, 3 Dec 2013 07:17:59 +0000 (23:17 -0800)]
mwifiex: do not flood kmsg/dmesg with USB debug messages

When TX data URB reaches high water mark the message
"data: -ENOSR is returned" is printed.
This is not an error case, so change it to debug print.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: remove redundant goto exit_remove statement
Amitkumar Karwar [Tue, 3 Dec 2013 07:17:57 +0000 (23:17 -0800)]
mwifiex: remove redundant goto exit_remove statement

The check for 'priv' pointer is redundant. 'priv' won't
be used later in this routine.

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>
10 years agomwifiex: update statistics for bridged packets on AP interface
Ujjal Roy [Tue, 3 Dec 2013 07:17:56 +0000 (23:17 -0800)]
mwifiex: update statistics for bridged packets on AP interface

The bridged packets are updated to statistics on both TX and RX
paths. Also fix a typo in the comment.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: correct TX byte count statistics
Ujjal Roy [Tue, 3 Dec 2013 07:17:55 +0000 (23:17 -0800)]
mwifiex: correct TX byte count statistics

The skb is modified in sending the TX packet. Save the original
packet length to a variable so that we can get the correct
statistics update.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: correct RX byte count statistics
Ujjal Roy [Tue, 3 Dec 2013 07:17:54 +0000 (23:17 -0800)]
mwifiex: correct RX byte count statistics

The skb is modified in processing the RX packet. Save the original
packet length to a variable so that we can get the correct
statistics update.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: fix rx_pending count imbalance
Ujjal Roy [Tue, 3 Dec 2013 07:17:53 +0000 (23:17 -0800)]
mwifiex: fix rx_pending count imbalance

RX packets are handled in different paths. Not all paths have
decrement of rx_pending counter. This patch fixes the counter
imbalance.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: avoid using variable name eth_hdr
Bing Zhao [Tue, 3 Dec 2013 07:17:52 +0000 (23:17 -0800)]
mwifiex: avoid using variable name eth_hdr

eth_hdr is defined in kernel. Use a different variable name in
our functions.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: fix an issue with Appletalk devices
Amitkumar Karwar [Tue, 3 Dec 2013 07:17:51 +0000 (23:17 -0800)]
mwifiex: fix an issue with Appletalk devices

SNAP/LLC header in the AARP packet is being stripped off while
preparing an EthernetII header.
Annex M, Table M.3 in 802.11 spec says that some header
(ex. AppleTalk AARP(2)) should pass through untouched.
This patch modifies the check to exclude/include EthernetII
header translation for special cases.

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>
10 years agomwifiex: remove rfc1042_eth_hdr variable
Amitkumar Karwar [Tue, 3 Dec 2013 07:17:50 +0000 (23:17 -0800)]
mwifiex: remove rfc1042_eth_hdr variable

Use 'rfc1042_header' available in net/wireless/util.c

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>
10 years agomwifiex: declare snap_type as __be16 variable
Amitkumar Karwar [Tue, 3 Dec 2013 07:17:49 +0000 (23:17 -0800)]
mwifiex: declare snap_type as __be16 variable

Actually we are updating snap_type with h_proto (__be16 variable)
in ethernet frame header. Hence endianness conversion is not
required.

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>
10 years agomwifiex: use little-endian variables in firmware structures
Ujjal Roy [Tue, 3 Dec 2013 07:17:48 +0000 (23:17 -0800)]
mwifiex: use little-endian variables in firmware structures

The firmware expects the command structure members in little
endianness.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobcma: pci: remove DEFINE_PCI_DEVICE_TABLE macro
Jingoo Han [Mon, 2 Dec 2013 23:00:27 +0000 (08:00 +0900)]
bcma: pci: remove DEFINE_PCI_DEVICE_TABLE macro

Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Mon, 9 Dec 2013 20:31:57 +0000 (15:31 -0500)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

10 years agoMerge tag 'for-linville-20131203' of git://github.com/kvalo/ath
John W. Linville [Mon, 9 Dec 2013 20:30:27 +0000 (15:30 -0500)]
Merge tag 'for-linville-20131203' of git://github.com/kvalo/ath

Conflicts:
drivers/net/wireless/ath/ath10k/htc.c
drivers/net/wireless/ath/ath10k/mac.c

10 years agoiwlwifi: mvm: rs: fix compilation without CONFIG_MAC80211_DEBUGFS
Emmanuel Grumbach [Tue, 3 Dec 2013 09:50:30 +0000 (11:50 +0200)]
iwlwifi: mvm: rs: fix compilation without CONFIG_MAC80211_DEBUGFS

This fixes compilation issues with CONFIG_MAC80211_DEBUGFS
not enabled.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - enable Sync to SCO
Emmanuel Grumbach [Thu, 28 Nov 2013 12:58:20 +0000 (14:58 +0200)]
iwlwifi: mvm: BT Coex - enable Sync to SCO

Sync to SCO is a feature that allows to synchronise the
wifi activity with the predictable BT activity in
SCO profile. This allows to reduce the collisions and
improve overall quality.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: overhaul search cycle state machine
Eyal Shapira [Sun, 24 Nov 2013 19:30:13 +0000 (21:30 +0200)]
iwlwifi: mvm: rs: overhaul search cycle state machine

Rewrite the search cycle state machine to use a more data
oriented approach where the different Tx columns (configs)
limitations and next columns to search are reprsented in
tables which are easy to change. This overhaul also includes
several major fixes:

1. Prevent going back to a specific Tx column in a search
cycle if it was already explored.

2. Avoid switching to a Tx column that doesn't have any chance
if it performs perfectly to beat the current throughput we're
getting.

These issues were degrading throughput as they were causing
switching to "bad" Tx columns.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: use the proper channel width define for legacy rate
Eyal Shapira [Thu, 28 Nov 2013 10:35:42 +0000 (12:35 +0200)]
iwlwifi: mvm: rs: use the proper channel width define for legacy rate

Use the 20Mhz channel width define instead of just the number
zero for legacy rates. Note that the define has the same value
so this is just a minor cleanup.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: fix mapping from HT/VHT rates to legacy
Eyal Shapira [Thu, 28 Nov 2013 10:27:03 +0000 (12:27 +0200)]
iwlwifi: mvm: rs: fix mapping from HT/VHT rates to legacy

The table rs_ht_to_legacy is used to get the next legacy rate
following the last HT or VHT rate in the LQ rates table.
The mapping wasn't correct as well as didn't include entries
for MCS8/9 which led to out of bounds access. This didn't
trigger a crash but led to legacy rate entries using 1Mbps
rate.
In 5Ghz this probably caused the Tx to fail completely given
that Tx attempt would have reached the legacy entries and 1Mbps
isn't valid.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: set dual_stream_ant_msk to ANT_AB always
Eyal Shapira [Thu, 28 Nov 2013 00:25:24 +0000 (02:25 +0200)]
iwlwifi: mvm: rs: set dual_stream_ant_msk to ANT_AB always

Drop code which was relevant when there were chips with
3 antennas. Setting to ANT_AB should be ok with all mvm
supported chips.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: remove unused parameter to rs_get_supported_rates
Eyal Shapira [Fri, 22 Nov 2013 23:30:44 +0000 (01:30 +0200)]
iwlwifi: mvm: rs: remove unused parameter to rs_get_supported_rates

No use of the ieee80211 header. Drop it.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: refactor to use rs_rate
Eyal Shapira [Fri, 22 Nov 2013 23:06:36 +0000 (01:06 +0200)]
iwlwifi: mvm: rs: refactor to use rs_rate

Introduce rs_rate which represents a rate. Use this structure
instead of iwl_scale_tbl_info where we're dealing with a single
rate.
This avoids allocating the big iwl_scale_tbl_info structure
on the stack in several cases like converting to ucode rate
format or from ucode rate format.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: remove unused timestamp field
Eyal Shapira [Fri, 22 Nov 2013 12:27:20 +0000 (14:27 +0200)]
iwlwifi: mvm: rs: remove unused timestamp field

Remove this as it's unused.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: increase stay in column timeout
Eyal Shapira [Fri, 22 Nov 2013 07:41:38 +0000 (09:41 +0200)]
iwlwifi: mvm: rs: increase stay in column timeout

Remain in the same Tx modulation (i.e. column) for a longer
time before starting a search cycle for a better modulation.
This has been shown to give better results.
Also change the name of the timeout define to better match its
description.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: rename thresholds defines
Eyal Shapira [Wed, 20 Nov 2013 23:18:47 +0000 (01:18 +0200)]
iwlwifi: mvm: rs: rename thresholds defines

Rename for clearer names.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: update expected TPT tables if aggregation changed
Eyal Shapira [Wed, 20 Nov 2013 23:12:11 +0000 (01:12 +0200)]
iwlwifi: mvm: rs: update expected TPT tables if aggregation changed

Expected TPT table was updated only when switching to a new
modulation. This is wrong as toggling aggregation changes
the expected TPT signficantly.
This leads to scenarios where turning aggregation on after
being in MIMO sends us back to SISO despite a perfect success
ratio.
This occurred because the TPT of the SISO mode was being
estimated based on aggregation while the MIMO one wasn't.

Also remove an error print which isn't an error anymore
since we might be updating the expected TPT table due
to aggregation changes.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: reduce min failures to end test window
Eyal Shapira [Wed, 20 Nov 2013 00:08:12 +0000 (02:08 +0200)]
iwlwifi: mvm: rs: reduce min failures to end test window

This terminates a test window of a new rate quicker in case
we've hit a bad rate and should recover better.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: improve debug prints
Eyal Shapira [Tue, 19 Nov 2013 23:45:38 +0000 (01:45 +0200)]
iwlwifi: mvm: rs: improve debug prints

Enable better tracking of different decisions made
by the rate scale algorithm.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: don't configure mimo rates if nss is limited to 1
Eyal Shapira [Sat, 9 Nov 2013 21:31:38 +0000 (23:31 +0200)]
iwlwifi: mvm: don't configure mimo rates if nss is limited to 1

Remote peer can publish a different number of supported nss via the
operating mode notification IE or action frame. If it limits to 1
then we don't want mimo rates configured in the rate table.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: don't enable VHT MCS9 in 20Mhz
Eyal Shapira [Sat, 9 Nov 2013 21:25:06 +0000 (23:25 +0200)]
iwlwifi: mvm: don't enable VHT MCS9 in 20Mhz

MCS9 in NSS=1 or NSS=2 isn't valid for 20Mhz so don't enable
it in case we're dealing with a 20Mhz sta. Trying to configure an
MCS9 rate with 20Mhz in the LQ rate table would lead to a FW assert.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: stop using MIMO in case BT doesn't allow it
Eyal Shapira [Wed, 13 Nov 2013 14:46:19 +0000 (16:46 +0200)]
iwlwifi: mvm: stop using MIMO in case BT doesn't allow it

Switch to using the new btcoex decision api regarding MIMO and stop
accessing the internal btcoex structs.
In case MIMO should be disabled it would detect this upon the next
Tx and force a search. The search will switch to SISO on a antenna A
which isn't used by BT.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: quota command max_duration should be zero
Johannes Berg [Tue, 19 Nov 2013 19:36:25 +0000 (20:36 +0100)]
iwlwifi: mvm: quota command max_duration should be zero

For now, the firmware doesn't really use the field, but
it should be set to zero if there's no specific request.
Setting it to the max quota doesn't make sense.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: Implement low-priority scan
Haim Dreyfuss [Sun, 3 Nov 2013 21:02:59 +0000 (23:02 +0200)]
iwlwifi: mvm: Implement low-priority scan

Advertise driver's support for low priority scan.
Notice that this overwrites current setting by mac80211 which depends
only on hw scan support.
This scan priority  can be configured by user space application
and it affects scan continuity, low priority scan
will be more fragmented scan.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: fix scan offloading flag definition
Eliad Peller [Sun, 10 Nov 2013 10:59:46 +0000 (12:59 +0200)]
iwlwifi: mvm: fix scan offloading flag definition

Bit 0 in the scan offloading flags asks the filter
to pass all the results (instead of filtering them,
by default), rather than the other way around (like
it is defined and used today).

Fix the flag name appropriately, and fix its user.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: dump NVM from debugfs
Emmanuel Grumbach [Mon, 18 Nov 2013 15:00:03 +0000 (17:00 +0200)]
iwlwifi: mvm: dump NVM from debugfs

This allows to see the content of the NVM the driver reads.
Note that the output is in binary, and requires some
external user space tool to display the data properly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: don't restart HW if suspending fails before D3 image is loaded
Luciano Coelho [Tue, 19 Nov 2013 20:53:41 +0000 (22:53 +0200)]
iwlwifi: mvm: don't restart HW if suspending fails before D3 image is loaded

If we haven't loaded the D3 image yet and a failure in the suspend
process occurs, we shouldn't restart the HW, because we're still
running the D0 image.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: add iwl_mvm_sta_from_mac80211
Johannes Berg [Thu, 14 Nov 2013 17:20:04 +0000 (18:20 +0100)]
iwlwifi: mvm: add iwl_mvm_sta_from_mac80211

This is just a helper function to go from the mac80211
station struct to our internal one, to later allow us
to avoid temporary 'mvmsta' variables.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: fix check for a single rx antenna
Eyal Shapira [Thu, 7 Nov 2013 17:38:04 +0000 (19:38 +0200)]
iwlwifi: fix check for a single rx antenna

valid_rx_ant is a bitmask of available antennas and not the number
of Rx antennas. Use num_of_ant and remove duplicate definitions
in both dvm and mvm.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: remove minor dead code
Michal Nazarewicz [Sun, 10 Nov 2013 19:06:37 +0000 (20:06 +0100)]
iwlwifi: pcie: remove minor dead code

inta is checked to be zero in a IRQ_NONE branch so afterwards it
cannot be zero as it is never modified.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
[reword the patch title and fix comment]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: a few more SKUs for 7260 and 3160
Emmanuel Grumbach [Wed, 23 Oct 2013 12:44:25 +0000 (15:44 +0300)]
iwlwifi: mvm: a few more SKUs for 7260 and 3160

These devices are not sold as discrete modules but are
rather soldered down to the board.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - fine tune the aggregation size
Emmanuel Grumbach [Wed, 13 Nov 2013 20:00:30 +0000 (22:00 +0200)]
iwlwifi: mvm: BT Coex - fine tune the aggregation size

Latest tests have shown that when BT is active and has
connections but the traffic is low, the WiFi aggregation can
be large up to 4000us without noticeable impact on BT.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: add LQ flags definitions
Eyal Shapira [Mon, 11 Nov 2013 17:56:21 +0000 (19:56 +0200)]
iwlwifi: mvm: add LQ flags definitions

Add more bit field definitions used in LQ flags.
Also rename the first bit to a shorter name.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>