platform/kernel/linux-arm64.git
13 years agoipv4: Use caller's on-stack flowi as-is in output route lookups.
David S. Miller [Thu, 28 Apr 2011 21:48:42 +0000 (14:48 -0700)]
ipv4: Use caller's on-stack flowi as-is in output route lookups.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Use non-zero allocations in dst_alloc().
David S. Miller [Thu, 28 Apr 2011 21:31:47 +0000 (14:31 -0700)]
net: Use non-zero allocations in dst_alloc().

Make dst_alloc() and it's users explicitly initialize the entire
entry.

The zero'ing done by kmem_cache_zalloc() was almost entirely
redundant.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Make dst_alloc() take more explicit initializations.
David S. Miller [Thu, 28 Apr 2011 21:13:38 +0000 (14:13 -0700)]
net: Make dst_alloc() take more explicit initializations.

Now the dst->dev, dev->obsolete, and dst->flags values can
be specified as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agol2tp: Fix inet_opt conversion.
David S. Miller [Thu, 28 Apr 2011 20:54:06 +0000 (13:54 -0700)]
l2tp: Fix inet_opt conversion.

We don't actually hold the socket lock at this point, so the
rcu_dereference_protected() isn't' correct.  Thanks to Eric
Dumazet for pointing this out.

Thankfully, we're only interested in fetching the faddr value
if srr is enabled, so we can simply make this an RCU sequence
and use plain rcu_dereference().

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: ibmveth: force reconfiguring checksum settings on startup
Michał Mirosław [Thu, 28 Apr 2011 01:59:15 +0000 (11:59 +1000)]
net: ibmveth: force reconfiguring checksum settings on startup

Commit b9367bf3ee6d ("net: ibmveth: convert to hw_features") accidentally
removed call to ibmveth_set_csum_offload() in ibmveth_probe(). Put the
call back where it was, but with additional error checking provided
by ibmveth_set_features().

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
[sfr: dev -> netdev]
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix memory leak in qlcnic_blink_led.
Sucheta Chakraborty [Wed, 27 Apr 2011 14:43:44 +0000 (14:43 +0000)]
qlcnic: fix memory leak in qlcnic_blink_led.

o Memory allocated in ETHTOOL_ACTIVE mode, is not getting freed. So,
  in ETHTOOL_ID_INACTIVE mode, return after freeing allocated memory.
o Using set bit instead of blink_down field, as it is also required
  in internal Loopback test and etc.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Convert u32 flag,flg2,flg3 uses to bitmap
Joe Perches [Tue, 26 Apr 2011 08:12:10 +0000 (08:12 +0000)]
tg3: Convert u32 flag,flg2,flg3 uses to bitmap

Using a bitmap instead of separate u32 flags allows a consistent, simpler
and more extensible mechanism to determine capabilities.

Convert bitmasks to enum.
Add tg3_flag, tg3_flag_clear and tg3_flag_set.
Convert the flag & bitmask tests.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: allow user to change NETIF_F_HIGHDMA
Michał Mirosław [Fri, 22 Apr 2011 06:31:16 +0000 (06:31 +0000)]
net: allow user to change NETIF_F_HIGHDMA

NETIF_F_HIGHDMA is like any other TX offloads, so allow user to toggle it.
This is needed later for bridge and bonding convertsion to hw_features.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: convert br_features_recompute() to ndo_fix_features
Michał Mirosław [Fri, 22 Apr 2011 06:31:16 +0000 (06:31 +0000)]
bridge: convert br_features_recompute() to ndo_fix_features

Note: netdev_update_features() needs only rtnl_lock as br->port_list
is only changed while holding it.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: fix netdev_increment_features()
Michał Mirosław [Fri, 22 Apr 2011 06:31:16 +0000 (06:31 +0000)]
net: fix netdev_increment_features()

Simplify and fix netdev_increment_features() to conform to what is
stated in netdevice.h comments about NETIF_F_ONE_FOR_ALL.
Include FCoE segmentation and VLAN-challedged flags in computation.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet:use help function of skb_checksum_start_offset to calculate offset
Shan Wei [Fri, 22 Apr 2011 11:07:41 +0000 (19:07 +0800)]
net:use help function of skb_checksum_start_offset to calculate offset

Although these are equivalent, but the skb_checksum_start_offset() is more readable.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinet: add RCU protection to inet->opt
Eric Dumazet [Thu, 21 Apr 2011 09:45:37 +0000 (09:45 +0000)]
inet: add RCU protection to inet->opt

We lack proper synchronization to manipulate inet->opt ip_options

Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.

Another thread can change inet->opt pointer and free old one under us.

Use RCU to protect inet->opt (changed to inet->inet_opt).

Instead of handling atomic refcounts, just copy ip_options when
necessary, to avoid cache line dirtying.

We cant insert an rcu_head in struct ip_options since its included in
skb->cb[], so this patch is large because I had to introduce a new
ip_options_rcu structure.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoBluetooth: Fix updating conn->auth_type in hci_io_capa_request_evt
Johan Hedberg [Thu, 28 Apr 2011 18:29:04 +0000 (11:29 -0700)]
Bluetooth: Fix updating conn->auth_type in hci_io_capa_request_evt

In some circumstances hci_get_auth_req will return a value different
from the current conn->auth_type. In these cases update conn->auth_type
so that when a user confirm request comes it doesn't falsely trigger
auto-accept.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add store_hint parameter to mgmt_new_key
Johan Hedberg [Thu, 28 Apr 2011 18:29:03 +0000 (11:29 -0700)]
Bluetooth: Add store_hint parameter to mgmt_new_key

Even for keys that shouldn't be stored some use cases require the
knowledge of a new key having been created so that the conclusion of a
successful pairing can be made. Therefore, always send the mgmt_new_key
event but add a store_hint parameter to it to indicate to user space
whether the key should be stored or not.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove old_key_type from mgmt_ev_new_key
Johan Hedberg [Thu, 28 Apr 2011 18:29:02 +0000 (11:29 -0700)]
Bluetooth: Remove old_key_type from mgmt_ev_new_key

User space shouldn't have any need for the old key type so remove it
from the corresponding Management interface event.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix connection key type updating for buggy controllers
Johan Hedberg [Thu, 28 Apr 2011 18:29:01 +0000 (11:29 -0700)]
Bluetooth: Fix connection key type updating for buggy controllers

If a controller generates a changed combination key as its first key the
connection key type will not be correctly set. In these situations make
sure the update the connection key type when such a buggy controller is
detected.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix old_key_type logic for non-persistent keys
Johan Hedberg [Thu, 28 Apr 2011 18:29:00 +0000 (11:29 -0700)]
Bluetooth: Fix old_key_type logic for non-persistent keys

Even if there's no previous key stored the connection might still be
secured with a non-persistent key and in that case the key type in the
hci_conn struct should be checked.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix link key persistent storage criteria
Johan Hedberg [Thu, 28 Apr 2011 18:28:59 +0000 (11:28 -0700)]
Bluetooth: Fix link key persistent storage criteria

Link keys should only be stored if very specific criteria of the
authentication process are fulfilled. This patch essentially copies the
criteria that user space has so far been using to the kernel side so
that the management interface works properly.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix logic in hci_pin_code_request_evt
Johan Hedberg [Thu, 28 Apr 2011 18:28:58 +0000 (11:28 -0700)]
Bluetooth: Fix logic in hci_pin_code_request_evt

The mgmt_ev_pin_code_request event should not be sent to user space if
the request gets rejected by the kernel due to the pairable flag not
being set.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix reason code for pairing rejection
Johan Hedberg [Thu, 28 Apr 2011 18:28:57 +0000 (11:28 -0700)]
Bluetooth: Fix reason code for pairing rejection

"Pairing not allowed" is 0x18 and not 0x16.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add confirm_hint parameter to user confirmation requests
Johan Hedberg [Thu, 28 Apr 2011 18:28:56 +0000 (11:28 -0700)]
Bluetooth: Add confirm_hint parameter to user confirmation requests

When accepting a pairing request which fulfills the SSP auto-accept
criteria we need to push the request all the way to the user for
confirmation. This patch adds a new hint to the user_confirm_request
management event so user space can know when to show a numeric
comparison dialog and when to show a simple yes/no confirmation dialog.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix HCI_CONN_AUTH_PEND flag for all authentication requests
Johan Hedberg [Thu, 28 Apr 2011 18:28:55 +0000 (11:28 -0700)]
Bluetooth: Fix HCI_CONN_AUTH_PEND flag for all authentication requests

The HCI_CONN_AUTH_PEND flag should be set whenever requesting
authentication so that multiple pending requests can't occur.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add variable SSP auto-accept delay support
Johan Hedberg [Thu, 28 Apr 2011 18:28:54 +0000 (11:28 -0700)]
Bluetooth: Add variable SSP auto-accept delay support

Some test systems require an arbitrary delay to the auto-accept test
cases for Secure Simple Pairing in order for the tests to pass.
Previously when this was handled in user space it was worked around by
code modifications and recompilation, but now that it's on the kernel
side it's more convenient if there's a debugfs interface for it.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add automated SSP user confirmation responses
Johan Hedberg [Thu, 28 Apr 2011 18:28:53 +0000 (11:28 -0700)]
Bluetooth: Add automated SSP user confirmation responses

This patch adds automated negative and positive (auto-accept) responses
for Secure Simple Pairing user confirmation requests. The responses are
only sent if the HCI_MGMT flag is set in order not to confuse older user
space versions (without management interface support).

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agomwifiex: fix bug in mwifiex_save_curr_bcn()
Amitkumar Karwar [Thu, 28 Apr 2011 02:13:13 +0000 (19:13 -0700)]
mwifiex: fix bug in mwifiex_save_curr_bcn()

Since timestamp in beacon buffer keeps changing all the time,
the memcmp check in mwifiex_save_curr_bcn() is redundant.
Remove that memcmp check and also avoid freeing and allocation
of buffer if required beacon buffer size is same as previous one.

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>
13 years agomwifiex: HT capability information handling
Amitkumar Karwar [Thu, 28 Apr 2011 02:13:12 +0000 (19:13 -0700)]
mwifiex: HT capability information handling

1) Initialise HT capabilities in cfg80211 properly.
2) Cfg80211 stack may modify "sband->ht_cap" to disable
40Mhz operation in 2.4GHz band (after recent patch
"cfg80211: module_param to disable HT40 in 2.4GHz band")
Therefore read "sband->ht_cap" instead of an adapter variable
"hw_dot_11n_dev_cap" to get HT capabilities.

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>
13 years agomwifiex: check firmware capabilities while initialising 5GHz band parameters
Amitkumar Karwar [Thu, 28 Apr 2011 02:13:11 +0000 (19:13 -0700)]
mwifiex: check firmware capabilities while initialising 5GHz band parameters

There are some SD8787 cards which don't support 5GHz band.
Therefore initialise 5GHz band parameters only if hardware
supports the band.

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>
13 years agomwl8k: replace rateinfo bitfields with mask and shift macros
John W. Linville [Wed, 27 Apr 2011 19:04:28 +0000 (15:04 -0400)]
mwl8k: replace rateinfo bitfields with mask and shift macros

AFAICT, this driver is claiming that 24 bits of rate info fit into a
16-bit field in the Tx descriptor.  Anyway, the use of bitfields is
frowned-upon for a variety of well-documented reasons...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: early fix for SPROM core index
Rafał Miłecki [Wed, 27 Apr 2011 16:21:34 +0000 (18:21 +0200)]
ssb: pci: early fix for SPROM core index

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: update PCIe workarounds
Rafał Miłecki [Wed, 27 Apr 2011 15:39:48 +0000 (17:39 +0200)]
ssb: pci: update PCIe workarounds

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: separate workarounds
Rafał Miłecki [Wed, 27 Apr 2011 15:39:47 +0000 (17:39 +0200)]
ssb: pci: separate workarounds

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Skip tailroom reservation for full HW-crypto devices
Yogesh Ashok Powar [Wed, 27 Apr 2011 13:10:29 +0000 (18:40 +0530)]
mac80211: Skip tailroom reservation for full HW-crypto devices

In xmit path, devices that do full hardware crypto (including
TKIP MMIC) need no tailroom. For such devices, tailroom
reservation can be skipped if all the keys are programmed into
the hardware (i.e software crypto is not used for any of the
keys) and none of the keys wants software to generate Michael
MIC.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add set_bitrate_mask() callback
Sujith Manoharan [Wed, 27 Apr 2011 11:43:40 +0000 (17:13 +0530)]
ath9k_htc: Add set_bitrate_mask() callback

This callback is used to set the minimum rate for management
frames.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add a new WMI command to set a rate mask
Sujith Manoharan [Wed, 27 Apr 2011 11:43:23 +0000 (17:13 +0530)]
ath9k_htc: Add a new WMI command to set a rate mask

This patch adds WMI_BITRATE_MASK_CMDID which can be
used by the set_bitrate_mask() handler.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Remove unused WMI_AGGR_LIMIT_CMD
Sujith Manoharan [Wed, 27 Apr 2011 11:43:09 +0000 (17:13 +0530)]
ath9k_htc: Remove unused WMI_AGGR_LIMIT_CMD

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Increase credit size for AR7010 devices
Sujith Manoharan [Wed, 27 Apr 2011 11:42:56 +0000 (17:12 +0530)]
ath9k_htc: Increase credit size for AR7010 devices

Bump the firmware version to 1.2

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Add new API for rate selection
Sujith Manoharan [Wed, 27 Apr 2011 11:26:51 +0000 (16:56 +0530)]
mac80211: Add new API for rate selection

This patch adds a new API for setting a TX rate mask in
drivers that have rate control in either the firmware or hardware.
This can be used for various purposes, for example, masking out the
11b rates in P2P operation.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: use kernel-doc notation, fix comment style
Randy Dunlap [Tue, 26 Apr 2011 22:25:29 +0000 (15:25 -0700)]
libertas: use kernel-doc notation, fix comment style

Convert all libertas/ files to use kernel-doc notation instead
of whatever it was (doxygen?).

Add or fix function parameters in several places.

Use expected style for multi-line comments in lots of places.

Remove erroneous /** in multiple places.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl12xx: support FW TX inactivity triggers
Arik Nemtsov [Tue, 26 Apr 2011 20:21:51 +0000 (23:21 +0300)]
wl12xx: support FW TX inactivity triggers

In AP mode we register for the MAX_TX_RETRY and INACTIVE_STA events.
Both are reported to the upper layers as a TX failure in the offending
stations.

In STA mode we register only for the MAX_TX_RETRY event. A TX failure is
interpreted as a loss of connection.

Support for IEEE80211_HW_REPORTS_TX_ACK_STATUS has been removed to avoid
the inherent race condition of a mac80211 TX failure counter in addition
to the FW counter.

This patch depends on "mac80211: allow low level driver to report packet
loss"

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Use ps wrappers for btcoex logic.
Vivek Natarajan [Tue, 26 Apr 2011 05:09:55 +0000 (10:39 +0530)]
ath9k: Use ps wrappers for btcoex logic.

Use ps wrappers before accessing hw registers in btcoex.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Enable generic timer interrupt.
Vivek Natarajan [Tue, 26 Apr 2011 05:09:54 +0000 (10:39 +0530)]
ath9k_hw: Enable generic timer interrupt.

Generic timer interrupt was not triggered unless autosleep was
disabled. Since autosleep is enabled in the newer chipsets,
enable generic timer for using with bt coex logic.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add support for btcoexistence in AR9300.
Vivek Natarajan [Tue, 26 Apr 2011 05:09:53 +0000 (10:39 +0530)]
ath9k_hw: Add support for btcoexistence in AR9300.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Move bt_stomp to hw from common.
Vivek Natarajan [Tue, 26 Apr 2011 05:09:52 +0000 (10:39 +0530)]
ath9k_hw: Move bt_stomp to hw from common.

Move bt_stomp to ath9k_hw and add its support for latest chipsets.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow low level drivers to report packet loss
Arik Nemtsov [Mon, 18 Apr 2011 11:22:28 +0000 (14:22 +0300)]
mac80211: allow low level drivers to report packet loss

Add API that allows low level drivers to notify mac80211 about TX
packet loss. This is useful when there are FW triggers to notify the
low level driver about these events.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Add secure flag for mgmt_pin_code_req
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:59 +0000 (12:07 +0200)]
Bluetooth: Add secure flag for mgmt_pin_code_req

Extend the mgmt_pin_code_request interface to require secure
pin code (16 digit) for authentication.

This is a kernel part of the secure pin code requirement notification
to user space agent.

Code styling fix by Johan Hedberg.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Respect local MITM req in io_cap reply
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:58 +0000 (12:07 +0200)]
Bluetooth: Respect local MITM req in io_cap reply

If host requires MITM protection notify that to controller in
io capabilities reply even if the remote device requires no bonding.

If it is not respected, host can get an unauthenticated link key while
it expects authenticated one.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Ignore key unauthenticated for high security
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:56 +0000 (12:07 +0200)]
Bluetooth: Ignore key unauthenticated for high security

High security level for pre v2.1 devices requires combination link key
authenticated by at least 16 digit PIN code.

It's also necessary to update key_type and pin_length when the key
exists and is sufficently secured for the connection as there will be
no link key notify event in that case.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Map sec_level to link key requirements
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:55 +0000 (12:07 +0200)]
Bluetooth: Map sec_level to link key requirements

Keep the link key type together with connection and use it to
map security level to link key requirements. Authenticate and/or
encrypt connection if the link is insufficiently secure.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Don't modify sec_level if auth failed
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:54 +0000 (12:07 +0200)]
Bluetooth: Don't modify sec_level if auth failed

If authentication fails the security level should stay as it was set
before the process has started. Setting BT_SECURITY_LOW can hide real
security level on a link eg. having BT_SECURITY_MEDIUM on the link,
re-authenticate with failure to get BT_SECURITY_HIGH, as  a result we
get BT_SECURITY_LOW on the link while the real security is still medium.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add definitions for link key types
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:53 +0000 (12:07 +0200)]
Bluetooth: Add definitions for link key types

Introduce the link key types defs and use them instead of magic numbers.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agonet: filter: Just In Time compiler for x86-64
Eric Dumazet [Wed, 20 Apr 2011 09:27:32 +0000 (09:27 +0000)]
net: filter: Just In Time compiler for x86-64

In order to speedup packet filtering, here is an implementation of a
JIT compiler for x86_64

It is disabled by default, and must be enabled by the admin.

echo 1 >/proc/sys/net/core/bpf_jit_enable

It uses module_alloc() and module_free() to get memory in the 2GB text
kernel range since we call helpers functions from the generated code.

EAX : BPF A accumulator
EBX : BPF X accumulator
RDI : pointer to skb   (first argument given to JIT function)
RBP : frame pointer (even if CONFIG_FRAME_POINTER=n)
r9d : skb->len - skb->data_len (headlen)
r8  : skb->data

To get a trace of generated code, use :

echo 2 >/proc/sys/net/core/bpf_jit_enable

Example of generated code :

# tcpdump -p -n -s 0 -i eth1 host 192.168.20.0/24

flen=18 proglen=147 pass=3 image=ffffffffa00b5000
JIT code: ffffffffa00b5000: 55 48 89 e5 48 83 ec 60 48 89 5d f8 44 8b 4f 60
JIT code: ffffffffa00b5010: 44 2b 4f 64 4c 8b 87 b8 00 00 00 be 0c 00 00 00
JIT code: ffffffffa00b5020: e8 24 7b f7 e0 3d 00 08 00 00 75 28 be 1a 00 00
JIT code: ffffffffa00b5030: 00 e8 fe 7a f7 e0 24 00 3d 00 14 a8 c0 74 49 be
JIT code: ffffffffa00b5040: 1e 00 00 00 e8 eb 7a f7 e0 24 00 3d 00 14 a8 c0
JIT code: ffffffffa00b5050: 74 36 eb 3b 3d 06 08 00 00 74 07 3d 35 80 00 00
JIT code: ffffffffa00b5060: 75 2d be 1c 00 00 00 e8 c8 7a f7 e0 24 00 3d 00
JIT code: ffffffffa00b5070: 14 a8 c0 74 13 be 26 00 00 00 e8 b5 7a f7 e0 24
JIT code: ffffffffa00b5080: 00 3d 00 14 a8 c0 75 07 b8 ff ff 00 00 eb 02 31
JIT code: ffffffffa00b5090: c0 c9 c3

BPF program is 144 bytes long, so native program is almost same size ;)

(000) ldh      [12]
(001) jeq      #0x800           jt 2    jf 8
(002) ld       [26]
(003) and      #0xffffff00
(004) jeq      #0xc0a81400      jt 16   jf 5
(005) ld       [30]
(006) and      #0xffffff00
(007) jeq      #0xc0a81400      jt 16   jf 17
(008) jeq      #0x806           jt 10   jf 9
(009) jeq      #0x8035          jt 10   jf 17
(010) ld       [28]
(011) and      #0xffffff00
(012) jeq      #0xc0a81400      jt 16   jf 13
(013) ld       [38]
(014) and      #0xffffff00
(015) jeq      #0xc0a81400      jt 16   jf 17
(016) ret      #65535
(017) ret      #0

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoBluetooth: Add discovering event to the Management interface
Johan Hedberg [Wed, 27 Apr 2011 14:29:57 +0000 (10:29 -0400)]
Bluetooth: Add discovering event to the Management interface

This patch adds a new event to the Management interface to track when
local adapters are discovering remote devices. For now this only tracks
BR/EDR discovery procedures.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add basic discovery commands to the management interface
Johan Hedberg [Wed, 27 Apr 2011 14:29:56 +0000 (10:29 -0400)]
Bluetooth: Add basic discovery commands to the management interface

This patch adds start_discovery and stop_discovery commands to the
management interface. Right now their implementation is fairly
simplistic and the parameters are fixed to what user space has
defaulted to so far.
This is the very initial phase for discovery implementation into
the kernel. Next steps include name resolution, LE scanning and
bdaddr type handling.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Don't export l2cap_sock_ops
Gustavo F. Padovan [Wed, 27 Apr 2011 21:40:39 +0000 (18:40 -0300)]
Bluetooth: Don't export l2cap_sock_ops

l2cap_sk_ops can be static, it's not used outside l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix memory leak with L2CAP channels
Gustavo F. Padovan [Mon, 25 Apr 2011 18:10:41 +0000 (15:10 -0300)]
Bluetooth: Fix memory leak with L2CAP channels

A new l2cap_chan_free() is added to free the channels.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move conn to struct l2cap_chan
Gustavo F. Padovan [Wed, 13 Apr 2011 23:23:55 +0000 (20:23 -0300)]
Bluetooth: Move conn to struct l2cap_chan

There is no need to the socket deal directly with the channel, most of the
time it cares about the channel only.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move more vars to struct l2cap_chan
Gustavo F. Padovan [Wed, 13 Apr 2011 22:50:45 +0000 (19:50 -0300)]
Bluetooth: Move more vars to struct l2cap_chan

In this commit, psm, scid and dcid.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move more channel info to struct l2cap_chan
Gustavo F. Padovan [Wed, 13 Apr 2011 20:20:49 +0000 (17:20 -0300)]
Bluetooth: Move more channel info to struct l2cap_chan

In this commit, omtu, imtu, flush_to, mode and sport. It also remove the
pi var from l2cap_sock_sendmsg().

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move more vars to struct l2cap_chan
Gustavo F. Padovan [Wed, 13 Apr 2011 18:57:03 +0000 (15:57 -0300)]
Bluetooth: Move more vars to struct l2cap_chan

In this commit all ERTM and Streaming Mode specific vars.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move some more elements to struct l2cap_chan
Gustavo F. Padovan [Tue, 12 Apr 2011 21:31:57 +0000 (18:31 -0300)]
Bluetooth: Move some more elements to struct l2cap_chan

In this commit sec_level, force_reliable, role_switch and flushable.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Rename l2cap_do_connect() to l2cap_chan_connect()
Gustavo F. Padovan [Tue, 12 Apr 2011 21:17:14 +0000 (18:17 -0300)]
Bluetooth: Rename l2cap_do_connect() to l2cap_chan_connect()

l2cap_chan_connect() is a much better name and reflects what this
functions is doing (or will do once socket dependence is removed from the
core).

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move conf_state to struct l2cap_chan
Gustavo F. Padovan [Tue, 12 Apr 2011 21:15:09 +0000 (18:15 -0300)]
Bluetooth: Move conf_state to struct l2cap_chan

First move of elements depending on user data.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Refactor L2CAP channel allocation
Gustavo F. Padovan [Fri, 8 Apr 2011 18:40:02 +0000 (15:40 -0300)]
Bluetooth: Refactor L2CAP channel allocation

If the allocation happens at l2cap_sock_create() will be able to use the
struct l2cap_chan to store channel info that comes from the user via
setsockopt.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoipv4: Kill RTO_CONN.
David S. Miller [Tue, 26 Apr 2011 21:58:35 +0000 (14:58 -0700)]
ipv4: Kill RTO_CONN.

It's not used by anything in the kernel, and defined in net/route.h so
never exported to userspace.

Therefore we can safely remove it.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Remove erroneous check in igmpv3_newpack() and igmp_send_report().
David S. Miller [Tue, 26 Apr 2011 20:57:47 +0000 (13:57 -0700)]
ipv4: Remove erroneous check in igmpv3_newpack() and igmp_send_report().

Output route resolution never returns a route with rt_src set to zero
(which is INADDR_ANY).

Even if the flow key for the output route lookup specifies INADDR_ANY
for the source address, the output route resolution chooses a real
source address to use in the final route.

This test has existed forever in igmp_send_report() and David Stevens
simply copied over the erroneous test when implementing support for
IGMPv3.

Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agoipv4: Sanitize and simplify ip_route_{connect,newports}()
David S. Miller [Tue, 26 Apr 2011 20:28:44 +0000 (13:28 -0700)]
ipv4: Sanitize and simplify ip_route_{connect,newports}()

These functions are used together as a unit for route resolution
during connect().  They address the chicken-and-egg problem that
exists when ports need to be allocated during connect() processing,
yet such port allocations require addressing information from the
routing code.

It's currently more heavy handed than it needs to be, and in
particular we allocate and initialize a flow object twice.

Let the callers provide the on-stack flow object.  That way we only
need to initialize it once in the ip_route_connect() call.

Later, if ip_route_newports() needs to do anything, it re-uses that
flow object as-is except for the ports which it updates before the
route re-lookup.

Also, describe why this set of facilities are needed and how it works
in a big comment.

Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agor8169: fix merge conflict fix.
Francois Romieu [Wed, 27 Apr 2011 20:52:22 +0000 (13:52 -0700)]
r8169: fix merge conflict fix.

- use adequate MAC_VER id
  (see 01dc7fec4025f6bb72b6b98ec88b375346b6dbbb)
- remove duplicate rtl_firmware_info record
- remove duplicate functions

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: clean up route lookup calls
Vlad Yasevich [Tue, 26 Apr 2011 21:54:17 +0000 (21:54 +0000)]
sctp: clean up route lookup calls

Change the call to take the transport parameter and set the
cached 'dst' appropriately inside the get_dst() function calls.

This will allow us in the future  to clean up source address
storage as well.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: remove useless arguments from get_saddr() call
Vlad Yasevich [Tue, 26 Apr 2011 21:53:20 +0000 (21:53 +0000)]
sctp: remove useless arguments from get_saddr() call

There is no point in passing a destination address to
a get_saddr() call.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: make sctp over IPv6 work with IPsec
Vlad Yasevich [Tue, 26 Apr 2011 21:52:27 +0000 (21:52 +0000)]
sctp: make sctp over IPv6 work with IPsec

SCTP never called xfrm_output after it's v6 route lookups so
that never really worked with ipsec.  Additioanlly, we never
passed port nubmers and protocol in the flowi, so any port
based policies were never applied as well.  Now that we can
fixed ipv6 routing lookup code, using ip6_dst_lookup_flow()
and pass port numbers.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: cache the ipv6 source after route lookup
Vlad Yasevich [Tue, 26 Apr 2011 21:51:31 +0000 (21:51 +0000)]
sctp: cache the ipv6 source after route lookup

The ipv6 routing lookup does give us a source address,
but instead of filling it into the dst, it's stored in
the flowi.  We can use that instead of going through the
entire source address selection again.
Also the useless ->dst_saddr member of sctp_pf is removed.
And sctp_v6_dst_saddr() is removed, instead by introduce
sctp_v6_to_addr(), which can be reused to cleanup some dup
code.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: fix sctp to work with ipv6 source address routing
Weixing Shi [Tue, 26 Apr 2011 21:36:32 +0000 (21:36 +0000)]
sctp: fix sctp to work with ipv6 source address routing

In the below test case, using the source address routing,
sctp can not work.
Node-A
1)ifconfig eth0 inet6 add 2001:1::1/64
2)ip -6 rule add from 2001:1::1 table 100 pref 100
3)ip -6 route add 2001:2::1 dev eth0 table 100
4)sctp_darn -H 2001:1::1 -P 250 -l &
Node-B
1)ifconfig eth0 inet6 add 2001:2::1/64
2)ip -6 rule add from 2001:2::1 table 100 pref 100
3)ip -6 route add 2001:1::1 dev eth0 table 100
4)sctp_darn -H 2001:2::1 -P 250 -h 2001:1::1 -p 250 -s

root cause:
Node-A and Node-B use the source address routing, and
at begining, source address will be NULL,sctp will
search the  routing table by the destination address,
because using the source address routing table, and
the result dst_entry will be NULL.

solution:
walk through the bind address list to get the source
address and then lookup the routing table again to get
the correct dst_entry.

Signed-off-by: Weixing Shi <Weixing.Shi@windriver.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbe: convert to ethtool set_phys_id
Emil Tantilov [Sat, 16 Apr 2011 06:12:51 +0000 (06:12 +0000)]
ixgbe: convert to ethtool set_phys_id

Based on the original patch submitted by Stephen Hemminger.

This patch makes the following changes:
- Change ETHTOOL_ID_INACTIVE return value to 2 (blinks/sec)
- Fix restoring of IXGBE_LEDCTL

CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix X540 ethtool loopback test.
Don Skidmore [Sat, 16 Apr 2011 05:29:14 +0000 (05:29 +0000)]
ixgbe: fix X540 ethtool loopback test.

On X540 we need to set the MACC.FLU bit to 1 in order to force the link
up before entering MAC loopback.  This is only used in the ethtool loopback
test, which was failing.  This patch corrects it.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Bump version
Don Skidmore [Thu, 14 Apr 2011 07:40:11 +0000 (07:40 +0000)]
ixgbe: Bump version

Bump the driver version number to better match up with the out of tree
driver that has similar functionality.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: enable SCTP checksum offload for X540
Don Skidmore [Tue, 12 Apr 2011 09:42:11 +0000 (09:42 +0000)]
ixgbe: enable SCTP checksum offload for X540

X540 supports SCTP checksum offload so enable it.  It was overlooked when X540
support was initially added to the driver.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: do not clear FCoE DDP error status for received ABTS
Yi Zou [Sat, 9 Apr 2011 08:34:12 +0000 (08:34 +0000)]
ixgbe: do not clear FCoE DDP error status for received ABTS

The ddp->err is initialized to be 1 to make sure outstanding DDP context is
guaranteed to be invalidated when HW is not auto-invalidating it. However,
in case of receiving ABTS response for a DDPed I/O, the ddp->err was cleared,
bypassing the invalidating of the DDP context from upper protocol stack when
ixgbe_fcoe_ddp_put() is called. This bug is fixed here by updating the error
only when FCP_RSP is received.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix static functions
John Fastabend [Tue, 12 Apr 2011 02:44:55 +0000 (02:44 +0000)]
ixgbe: fix static functions

Define functions as static added C=1 (sparse) to my make line
brought these to my attention.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: remove ntuple display support
Alexander Duyck [Sat, 9 Apr 2011 05:34:06 +0000 (05:34 +0000)]
ixgbe: remove ntuple display support

This change removes the ntuple display support from ixgbe.  The reason for
this change is to resolve a number of issues in the way display filtering
is handled.

I plan to add support for displaying these filters via the network flow
classifier interface.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: add LED blink code for x540
Emil Tantilov [Fri, 8 Apr 2011 01:24:05 +0000 (01:24 +0000)]
ixgbe: add LED blink code for x540

Implement blink_led_start and blink_led_stop functions for x540
using the MACC register.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: add support for 64k EEPROM for 82599
Emil Tantilov [Fri, 1 Apr 2011 08:17:19 +0000 (08:17 +0000)]
ixgbe: add support for 64k EEPROM for 82599

82599 supports up to 32k EEPROM addressing via EERD register. If we
wish to address larger EEPROM this have to be done via serial interface.
This patch adds function ixgbe_read_eeprom_82599 which selects the best
method to read the EEPROM.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: register defines cleanup
Emil Tantilov [Thu, 31 Mar 2011 09:36:24 +0000 (09:36 +0000)]
ixgbe: register defines cleanup

Remove duplicates.
Fix incorrect defines.
Fix/Update comments.
Fix whitespace.
Add new register defines.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: explicitly disable 100H for x540
Emil Tantilov [Thu, 31 Mar 2011 09:36:12 +0000 (09:36 +0000)]
ixgbe: explicitly disable 100H for x540

100H is not supported on this HW, but the bit is set on the PHY.
This can result in link at 100F when advertising only 1000F.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: implement ethtool set_phys_id
Bruce Allan [Sat, 16 Apr 2011 00:34:40 +0000 (00:34 +0000)]
e1000e: implement ethtool set_phys_id

Based on a patch from Stephen Hemminger <shemminger@vyatta.com>.

The new ethtool set_phys_id takes over controlling the LED for
identifying boards.  This fixes the lockout during that period.
For this device lots of extra infrastructure can also be removed by
using set_phys_id.

v2: - return blink frequency for parts that do not support blink in h/w
    - add blink_led function pointers for devices that do support blink
      in h/w to cleanup the test for this functionality

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agocfg80211: fix regresion on reg user timeout
Luis R. Rodriguez [Tue, 26 Apr 2011 01:35:48 +0000 (18:35 -0700)]
cfg80211: fix regresion on reg user timeout

The patch "cfg80211: add a timer for invalid user reg hints"
introduced a regression for the case where a secondary identical
regulatory hint from a user is sent. What would happen is the
second hint would schedule delayed work in to catch a timeout
but since we are never processing it given that the hint was already
applied we'd always hit the timeout and and restore regulatory
settings back to world regulatory domain. This is fixed by simply
avoiding sheduling work if the hint was already applied.

Tested-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: rtl8192cu: Fix most sparse warnings
Larry Finger [Mon, 25 Apr 2011 18:23:20 +0000 (13:23 -0500)]
rtlwifi: rtl8192ce: rtl8192cu: Fix most sparse warnings

Fix most sparse warnings in rtlwifi, rtl8192ce and rtl8192cu drivers.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: Change rtl8192ce routines phy and trx and modify rtl8192cu for...
Chaoming_Li [Mon, 25 Apr 2011 17:54:05 +0000 (12:54 -0500)]
rtlwifi: rtl8192ce: Change rtl8192ce routines phy and trx and modify rtl8192cu for addition of rtl8192se and rtl8192de

Change rtl8192ce routines phy and trx for addition of RTL8192SE and RTL8192DE.
In addition, make necessary modifications to rtl8192cu. This patch also
removes the temporary patches needed to enable intermediate steps to build
without error.

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>
13 years agortlwifi: rtl8192ce: Change phy and rc routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:54:00 +0000 (12:54 -0500)]
rtlwifi: rtl8192ce: Change phy and rc routines for addition of rtl8192se and rtl8192de

Change rtl8192ce routines phy and rc for addition of RTL8192SE and
RTL8192DE.

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>
13 years agortlwifi: rtl8192ce: Change sw and LED routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:55 +0000 (12:53 -0500)]
rtlwifi: rtl8192ce: Change sw and LED routines for addition of rtl8192se and rtl8192de

Change rtl8192ce sw and LED routines for addition of RTL8192SE and
RTL8192DE.

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>
13 years agortlwifi: rtl8192ce: Change hw routine for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:50 +0000 (12:53 -0500)]
rtlwifi: rtl8192ce: Change hw routine for addition of rtl8192se and rtl8192de

Change rtl8192ce hw routine for addition of RTL8192SE and RTL8192DE.

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>
13 years agortlwifi: rtl8192c-common: Change common PHY routines for addition of rtl8192se and...
Chaoming_Li [Mon, 25 Apr 2011 17:53:45 +0000 (12:53 -0500)]
rtlwifi: rtl8192c-common: Change common PHY routines for addition of rtl8192se and rtl8192de

Change common PHY routines for addition of RTL8192SE and RTL8192DE code.

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>
13 years agortlwifi: rtl8192c-common: Change common firmware routines for addition of rtl8192se...
Chaoming_Li [Mon, 25 Apr 2011 17:53:40 +0000 (12:53 -0500)]
rtlwifi: rtl8192c-common: Change common firmware routines for addition of rtl8192se and rtl8192de

Change common firmware routines for addition of RTL8192SE and
RTL8192DE code.

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>
13 years agortlwifi: rtl8192c-common: Convert common dynamic management routines for addition...
Chaoming_Li [Mon, 25 Apr 2011 17:53:35 +0000 (12:53 -0500)]
rtlwifi: rtl8192c-common: Convert common dynamic management routines for addition of rtl8192se and rtl8192de

Convert common dynamic management routines for addition of RTL8192SE
and RTL8192DE code.

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>
13 years agortlwifi: Convert usb routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:29 +0000 (12:53 -0500)]
rtlwifi: Convert usb routines for addition of rtl8192se and rtl8192de

Convert usb routines for addition of RTL8192SE and RTL8192DE code

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>
13 years agortlwifi: Convert regulatory domain routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:24 +0000 (12:53 -0500)]
rtlwifi: Convert regulatory domain routines for addition of rtl8192se and rtl8192de

Convert regulatory domain  routines for addition of RTL8192SE and
RTL8192DE code.

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>
13 years agortlwifi: Convert rc routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:19 +0000 (12:53 -0500)]
rtlwifi: Convert rc routines for addition of rtl8192se and rtl8192de

Convert rc routines for addition of RTL8192SE and RTL8192DE code

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>
13 years agortlwifi: Convert ps routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:14 +0000 (12:53 -0500)]
rtlwifi: Convert ps routines for addition of rtl8192se and rtl8192de

Convert ps routines for addition of RTL8192SE and RTL8192DE code

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>
13 years agortlwifi: Convert pci routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 18:23:15 +0000 (13:23 -0500)]
rtlwifi: Convert pci routines for addition of rtl8192se and rtl8192de

Convert pci routines for addition of RTL8192SE and RTL8192DE code
These changes allow the upper-level driver to specify the BAR to be
used as it is different for rtl8192se than for the others.

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>
13 years agortlwifi: Convert core routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 18:23:10 +0000 (13:23 -0500)]
rtlwifi: Convert core routines for addition of rtl8192se and rtl8192de

Convert core routines for addition of RTL8192SE and RTL8192DE code.

Additional files are changed to allow compilation.

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>
13 years agortlwifi: Change cam routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 18:23:05 +0000 (13:23 -0500)]
rtlwifi: Change cam routines for addition of rtl8192se and rtl8192de

Change cam routines for addition of RTL8192SE and RTL8192DE code

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>