Commit Graph

504458 Commits

Author SHA1 Message Date
Alexander Bondar 2ecc3905e6 mac80211: Update beacon's timing and DTIM count on every beacon
Beacon's timestamp, device system time associated with this beacon and
DTIM count parameters are not updated in the associated vif context
if the latest beacon's content is identical to the previously received.
It make sense to update these changing parameters on every beacon so the
driver can get most updated values. This may be necessary, for example,
to avoid either beacons' drift effect or device time stamp overrun.
IMPORTANT: Three sync_* parameters - sync_ts, sync_device_ts and
sync_dtim_count would possibly be out of sync by the time the driver will
use them. The synchronized view is currently guaranteed only in certain
callbacks.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-03 15:56:06 +01:00
Johannes Berg 5fc7432991 nl80211: add notes about userspace API/ABI modifications
Add notes about userspace ABI/API modifications, including the
fact that we decided that API submissions should come with a
driver implementation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-03 15:56:06 +01:00
Jouni Malinen d5d011b446 mac80211_hwsim: Add minimal capability for vendor command/event testing
This allows wpa_supplicant/hostapd to send a vendor command and verify
response to that command and a vendor event.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-03 15:56:06 +01:00
Ahmad Kholaif 6c09e791b2 cfg80211: Allow NL80211_ATTR_IFINDEX to be added to vendor events
This modifies cfg80211_vendor_event_alloc() with an additional argument
struct wireless_dev *wdev. __cfg80211_alloc_event_skb() is modified to
take in *wdev argument, if wdev != NULL, both the NL80211_ATTR_IFINDEX
and wdev identifier are added to the vendor event.

These changes make it easier for drivers to add ifindex indication in
vendor events cleanly.

This also updates all existing users of cfg80211_vendor_event_alloc()
and __cfg80211_alloc_event_skb() in the kernel tree.

Signed-off-by: Ahmad Kholaif <akholaif@qca.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-03 15:56:05 +01:00
Janusz.Dziedzic@tieto.com ffc1199122 cfg80211: add VHT support for IBSS
Add NL80211_EXT_FEATURE_VHT_IBSS flag and VHT
support for IBSS.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-03 15:56:04 +01:00
Dedy Lansky 6eb1813764 cfg80211: add bss_type and privacy arguments in cfg80211_get_bss()
802.11ad adds new a network type (PBSS) and changes the capability
field interpretation for the DMG (60G) band.
The same 2 bits that were interpreted as "ESS" and "IBSS" before are
re-used as a 2-bit field with 3 valid values (and 1 reserved). Valid
values are: "IBSS", "PBSS" (new) and "AP".

In order to get the BSS struct for the new PBSS networks, change the
cfg80211_get_bss() function to take a new enum ieee80211_bss_type
argument with the valid network types, as "capa_mask" and "capa_val"
no longer work correctly (the search must be band-aware now.)

The remaining bits in "capa_mask" and "capa_val" are used only for
privacy matching so replace those two with a privacy enum as well.

Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
[rewrite commit log, tiny fixes]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-03 15:56:01 +01:00
James Minor 76a70e9c4b cfg80211-wext: return -E2BIG when buffer can't hold full BSS entry
When using the wext compatibility code in cfg80211, part of the IEs
can be truncated if the passed user buffer is large enough for part
of the BSS but not large enough for all of the IEs.  This can cause
an EAP network to show up as a PSK network.

Always return -E2BIG in this case to avoid truncating data.

Since this changes the control flow, use an on-stack variable for
a small buffer instead of allocating it.

Signed-off-by: James Minor <james.minor@ni.com>
[rework patch to error out immediately, use _check wrappers]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-02-28 21:31:12 +01:00
Johannes Berg 36ef906ee8 wext: add checked wrappers for adding events/points to streams
These checked wrappers are necessary for the next patch, which
will use them to avoid sending out partial scan results.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-02-28 21:31:12 +01:00
Johannes Berg abfbc3af57 mac80211: remove TX latency measurement code
Revert commit ad38bfc916 ("mac80211: Tx frame latency statistics")
(along with some follow-up fixes).

This code turned out not to be as useful in the current form as we
thought, and we've internally hacked it up more, but that's not
very suitable for upstream (for now), and we might just do that
with tracing instead.

Therefore, for now at least, remove this code. We might also need
to use the skb->tstamp field for the TCP performance issue, which
is more important than the debugging.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-02-28 21:31:11 +01:00
Masashi Honma 31f909a2c0 nl/mac80211: allow zero plink timeout to disable STA expiration
Both wpa_supplicant and mac80211 have and inactivity timer. By default
wpa_supplicant will be timed out in 5 minutes and mac80211's it is 30
minutes. If wpa_supplicant uses a longer timer than mac80211, it will
get unexpected disconnection by mac80211.

Using 0xffffffff instead as the configured value could solve this w/o
changing the code, but due to integer overflow in the expression used
this doesn't work. The expression is:

(current jiffies) > (frame Rx jiffies + NL80211_MESHCONF_PLINK_TIMEOUT * 250)

On 32bit system, the right side would overflow and be a very small
value if NL80211_MESHCONF_PLINK_TIMEOUT is sufficiently large,
causing unexpectedly early disconnections.

Instead allow disabling the inactivity timer to avoid this situation,
by passing the (previously invalid and useless) value 0.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
[reword/rewrap commit log]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-02-28 21:31:10 +01:00
Bob Copeland cd37a90b2a mac80211_hwsim: support any address in userspace
Due to the checks in get_hwsim_data_ref_from_addr, wmediumd
was only able to use the second mac address (those starting with
0x42).  This is confusing and needlessly limiting, so allow any
configured address.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-02-28 21:31:10 +01:00
Johannes Berg 2afe38d15c cfg80211-wext: export symbols only when needed
When a fully converted cfg80211 driver needs cfg80211-wext for
userspace API purposes, the symbols need not be exported. When
other drivers (orinoco/hermes or ipw2200) are enabled, they do
need the symbols exported as they use them directly.

Make those drivers select a new CFG80211_WEXT_EXPORT Kconfig
symbol (instead of just CFG80211_WEXT) and export the functions
only if requested - this saves about 1/2k due to the size of
EXPORT_SYMBOL() itself.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-02-28 21:31:09 +01:00
Johannes Berg 7d9bb2f065 mac80211: iterate using station list in AP SMPS
When changing AP SMPS, we need to look up all the stations
for this interface, so there's no reason to iterate over
hash chains rather than doing the simpler iteration over
the station list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-02-28 21:31:09 +01:00
Johannes Berg 9d6b106b54 mac80211: don't look up stations for multicast addresses
Since multicast addresses don't exist as stations, don't attempt
to look them up in the hashtable on TX.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-02-28 21:28:44 +01:00
Roopa Prabhu b7853d73e3 bridge: add vlan info to bridge setlink and dellink notification messages
vlan add/deletes are not notified to userspace today. This patch adds
vlan info to bridge newlink/dellink notifications generated from the
bridge driver. Notifications use the RTEXT_FILTER_BRVLAN_COMPRESSED
flag to compress vlans into ranges whereever applicable.

The size calculations does not take ranges into account for
simplicity.  This has the potential for allocating a larger skb than
required.

There is an existing inconsistency with bridge NEWLINK and DELLINK
change notifications. Both generate NEWLINK notifications.  Since its
always a NEWLINK notification, this patch includes all vlans the port
belongs to in the notification. The NEWLINK and DELLINK request
messages however only include the vlans to be added and deleted.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-22 23:00:45 -05:00
Ameen Ali e099b2d9df net: __aligned(size) is preferred over __attribute__((aligned(size)))
Signed-off-by: Ameen Ali <AmeenAli023@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-22 17:01:22 -05:00
Joe Perches 92b8391750 batman-adv: Fix use of seq_has_overflowed()
net-next commit 6d91147d18 ("batman-adv: Remove uses of return value
of seq_printf") incorrectly changed the overflow occurred return from
-1 to 1.  Change it back so that the test of batadv_write_buffer_text's
return value in batadv_gw_client_seq_print_text works properly.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-22 17:00:08 -05:00
Bojan Prtvar 059a2440fd net: Remove state argument from skb_find_text()
Although it is clear that textsearch state is intentionally passed to
skb_find_text() as uninitialized argument, it was never used by the
callers. Therefore, we can simplify skb_find_text() by making it
local variable.

Signed-off-by: Bojan Prtvar <prtvar.b@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-22 15:59:54 -05:00
Dan Carpenter d340c862e7 ethtool: use "ops" name consistenty in ethtool_set_rxfh()
"dev->ethtool_ops" and "ops" are the same, but we should use "ops"
everywhere to be consistent.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-21 22:05:53 -05:00
Alex W Slater 29778bec12 ipv6: Replace "#include <asm/uaccess>" with "#include <linux/uaccess>"
Fix checkpatch.pl warning "Use #include <linux/uaccess.h> instead of <asm/uaccess.h>"

Signed-off-by: Alex W Slater <alex.slater.dev@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-21 22:05:53 -05:00
David S. Miller 173d6b5fdb Merge branch 'bna-next'
Rasesh Mody says:

====================
bna: Update the Driver and Firmware Version

These patches re-brands the BNA driver to QLogic. The patches update the BNA
driver version to 3.2.25.1 and firmware version to 3.2.5.1.

The patches are tested against 3.19.0.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-21 22:05:30 -05:00
Rasesh Mody 3f307c3d70 bna: Update the Driver and Firmware Version
This patch updates the BNA driver version to 3.2.25.1 and the firmware version
to 3.2.5.1

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-21 22:05:23 -05:00
Rasesh Mody 2732ba561e bna: QLogic BR-series Adapters Driver Rebranding
Re-brand the BNA driver to QLogic.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-21 22:05:22 -05:00
David L Stevens bb39b7433d sunvnet: failed trigger should not cause BUG_ON()
An error return from __vnet_tx_trigger() sets the TX descriptor to
VIO_DESC_FREE while leaving port->tx_bufs[txi].skb set. This leads
to a BUG_ON() the next time this descriptor is used.

This patch frees the pending skb when getting a trigger error to
match the VIO_DESC_FREE state.

Signed-off-by: David L Stevens <david.stevens@oracle.com>
Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 17:44:24 -05:00
Mahesh Bandewar 950ddcb1c1 bonding: simple code refactor
Remove duplicate code.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 17:43:29 -05:00
Arun Chandran a50dad355a net: macb: Add big endian CPU support
This patch converts all __raw_readl and __raw_writel function calls
to their corresponding readl_relaxed and writel_relaxed variants.

It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg
when the CPU is configured in big endian mode.

Signed-off-by: Arun Chandran <achandran@mvista.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:51:31 -05:00
David S. Miller 931c471af5 Merge branch 'bnx2x-next'
Rasesh Mody says:

====================
bnx2-cnic: Driver Version Upgrades

This patch set includes bnx2 and cnic drivers' re-branding changes, fix for a
chip initialization issue and updates the bnx2 driver version to 2.2.6 and
cnic driver version to 2.5.21.

Please apply these patches to net-next.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:46:55 -05:00
Rasesh Mody 85fe7cd21f bnx2-cnic: Driver Version Update
This patch updates BNX2 driver version to 2.2.6 and CNIC driver version
to 2.5.21.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:46:49 -05:00
Rasesh Mody 0021850d04 bnx2: Fix for Chip Initialization
Do not enable filter SORT MODE in chip init routine. This patch addresses an
issue where BCM5716 sporadically drops packets when changing multicast list.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:46:49 -05:00
Rasesh Mody 2e0bf125ac bnx2-cnic: Driver Rebranding Changes
This patch provides additional changes as a part of BNX2 and CNIC driver
re-branding effort.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:46:49 -05:00
Eric Dumazet 959d10f6bb igmp: add __ip_mc_{join|leave}_group()
There is a need to perform igmp join/leave operations while RTNL is
held.

Make ip_mc_{join|leave}_group() wrappers around
__ip_mc_{join|leave}_group() to avoid the proliferation of work queues.

For example, vxlan_igmp_join() could possibly be removed.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:24:04 -05:00
Aleksander Morgado 64bea46e3f hso: always read interface number from the current altsetting
Always read bInterfaceNumber from the current altsetting, not from the first one
available in the altsetting array. This is coming from code review, not related
to any specific bug.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:21:31 -05:00
David S. Miller 216fa18f33 Merge branch 'ppc_bpf'
Denis Kirjanov says:

====================
bpf: Enable BPF JIT on ppc32

This patch series enables BPF JIT on ppc32. There are relatevily
few chnages in the code to make it work.

All test_bpf tests passed both on 7447a and P2041-based machines.

Changelog:
v1 - > v2: Reordered Kconfig patch in the series
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:19:56 -05:00
Denis Kirjanov eb84bab0fb ppc: Kconfig: Enable BPF JIT on ppc32
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:19:43 -05:00
Denis Kirjanov 022909482d ppc: bpf: Add SKF_AD_CPU for ppc32
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:19:43 -05:00
Denis Kirjanov 2ddadeab07 ppc: bpf: rename bpf_jit_64.S to bpf_jit_asm.S
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:19:43 -05:00
Denis Kirjanov 09ca5ab23e ppc: bpf: update jit to use compatibility macros
Use helpers from the asm-compat.h to wrap up assembly mnemonics

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:19:43 -05:00
Denis Kirjanov 693930d69c ppc: bpf: add reqired opcodes for ppc32
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:19:43 -05:00
Denis Kirjanov fb7fc08e57 ppc: bpf: add required compatibility macros for jit
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:19:43 -05:00
Joe Perches 6d91147d18 batman-adv: Remove uses of return value of seq_printf
This function is soon going to return void so remove the
return value use.

Convert the return value to test seq_has_overflowed() instead.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:18:26 -05:00
stephen hemminger db2855ae24 tcp: silence registration message
This message isn't really needed it justs waits time/space.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 15:04:03 -05:00
David S. Miller 50036ccf3d Merge branch 'be2net-next'
Sriharsha Basavapatna says:

====================
be2net patch-set

This patch set contains a few code refactoring changes to make it easy to
support new TX WRB formats in future ASICs. Please consider applying it to
net-next tree.

Patch 1: Refactors chip specific code to setup tx wrb into a separate routine.
Patch 2: Refactors tx enqueue function to remove a bit of duplicate code and
	 improves wrb setup steps.
Patch 3: Minor refactoring in tx compl to limit CQE accesses to 1 routine.
Patch 4: Adds a few inline functions.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 14:07:02 -05:00
Sriharsha Basavapatna cf5671e699 be2net: Add a few inline functions to test TXQ conditions
- Check qfull condition
- Check qwake condition
- Check pkts pending completion

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 14:06:57 -05:00
Sriharsha Basavapatna 152ffe5bb7 be2net: Minor code cleanup in tx completion process
- To avoid multiple accesses to CQE, extract compl_status and end_idx from
  be_tx_compl_get().

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 14:06:57 -05:00
Sriharsha Basavapatna 79a0d7d8e0 be2net: Refactor be_xmit_enqueue() routine
- Reduce code duplication by moving WRB-frags setup into a function.
- Do not setup WRB-header before frags are setup, which is unncessary if
  there's errors while setting up frags. We should only grab an entry for
  the header, setup the frags and if everything is fine setup the header.
- The error cleanup can be moved into a small function.

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 14:06:57 -05:00
Sriharsha Basavapatna 804abcdbdb be2net: Refactor wrb_fill_hdr() routine
The WRB header is setup by wrb_fill_hdr() routine. This routine currently
gets some of the WRB params as args and figures out rest of the WRB params
by looking at various fields in skb (like gso, checksum, vlan-tag etc).
All these params could instead be retrieved from the skb into a structure
and passed to this routine. This separates wrb_fill_hdr() to only provide
chip-specific code to fill the WRB. This also makes it simple to support
chips with different WRB formats.

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-20 14:06:57 -05:00
David S. Miller 69994d17ab Merge branch 'mv88e6171_indirect_phy'
Andrew Lunn says:

====================
Indirect phy access for mv88e6171

These two patches allow the mv88e6171 driver to access the port phys
using indirect addressing. Depending on pin strapping, the switch
either uses a single address on the host MDIO bus, requiring the port
phys are accessed indirectly, or the switch uses a number of addresses
on the host bus and the phys can be directly accessed.

The 370RD, the first supported platform to use the 6171 uses multiple
addresses, so this indirect mode was not required. However the
WRT1900AC has the switch configured to use a single address, and so
indirect access is needed.

The mv88e6352 already has all the needed code. Refactor it into the
shared mv88e6xxx and then use it in the mv88e6171 driver.

Tested on the 370RD and WRT1900AC.

It would be good if Guenter Roeck could test on his platform to ensure
i've not broken anything for the mv88e6352.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-19 15:52:33 -05:00
Andrew Lunn 4c732668f9 net: dsa: mv88e6171: Enable access to phys via internal mdio bus
When the device is configured to use single chip addressing mode, the
phy devices of the port are not accessible on the host MDIO
bus. Instead the switch internal MDIO bus must be used. For this to
work, the phy polling unit must be enabled.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-19 15:52:25 -05:00
Andrew Lunn f30446839b net: dsa: mv88e6352: Refactor shareable code
The mv88e6352 allows access to the port phys via an internal mdio bus
which is accessed using registers in the GLOBAL 2 range. The mv88e6171
and probably other devices use the same mechanism. Move this code into
the shared mv88e6xxx.c library.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-19 15:52:25 -05:00
Vince Bridgers ea8860eb50 net: eth: altera: Change reset_mac failure message masks from err to dbg
This debug output is not really an error message since mac reset can fail
if the phy clocks are gated, specifically when the phy has been placed in
a powered down or isolation mode. The netdev output masks were changed from
err to dbg, and comments added in the code.

Signed-off-by: Vince Bridgers <vbridger@opensource.altera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-19 15:23:42 -05:00