firefly-linux-kernel-4.4.55.git
12 years agomwifiex: update 11n status as per start_ap IE
Avinash Patil [Sat, 4 Aug 2012 01:06:05 +0000 (18:06 -0700)]
mwifiex: update 11n status as per start_ap IE

If HT IE is present in beacon_data of start_ap cfg80211 handler,
enable 11n flag in AP. Disable 11n flag when stop_ap handler is
called.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: improve scan delay logic during Tx traffic
Amitkumar Karwar [Sat, 4 Aug 2012 01:06:04 +0000 (18:06 -0700)]
mwifiex: improve scan delay logic during Tx traffic

Earlier scan command was postponed by 20msec multiple times to give
preference to Tx traffic until we find empty wmm queue.

There is a corner case in which wmm queue becomes empty immediately
after processing the packet(before 20msec) and there may be next
packet coming after some time. In this case we should not resume scan
operation.

We will use new flag to check Tx traffic and resume scan operation
only if there is no traffic for 200msec.

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>
12 years agomwifiex: update max_chan_per_scan correctly for SSID scan
Amitkumar Karwar [Sat, 4 Aug 2012 01:06:03 +0000 (18:06 -0700)]
mwifiex: update max_chan_per_scan correctly for SSID scan

As per recent patch "658f37b mwifiex: scan less channels..."
less channels are scanned per scan command in associated state.

Default number of channels per scan command for normal scan are
already 4, but those are 14 for SSID specific scan operation.

This code change in this patch is required for SSID specific scan.

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>
12 years agomwifiex: do le_to_cpu conversion for Rx packet header elements
Amitkumar Karwar [Sat, 4 Aug 2012 01:06:02 +0000 (18:06 -0700)]
mwifiex: do le_to_cpu conversion for Rx packet header elements

We do similar conversion for Tx packet header but it was missing
for Rx packet header. Without this fix, Rx packet header won't
be correctly parsed on big endian platform.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: correction in MSDU padding logic
Yogesh Ashok Powar [Sat, 4 Aug 2012 01:06:01 +0000 (18:06 -0700)]
mwifiex: correction in MSDU padding logic

Padding arithmetic will always work for MSDUs provided first MSDU
ends on 4-byte boundary. Fixing it by making sure that all MSDU ends
on 4-byte boundary.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: remove extra padding to AMSDU
Yogesh Ashok Powar [Sat, 4 Aug 2012 01:06:00 +0000 (18:06 -0700)]
mwifiex: remove extra padding to AMSDU

Since commit: fb3c19bc9687d972b83faf366b38ac807eca8f25, adding
extra padding to AMSDU is redundant since same is being performed at
mwifiex_11n_aggregate_pkt after forming the AMSDU packet. Fixing it
by removing it.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: copy MSDU subframes correctly
Yogesh Ashok Powar [Sat, 4 Aug 2012 01:05:59 +0000 (18:05 -0700)]
mwifiex: copy MSDU subframes correctly

All MSDU subframes, except the first one in AMSDU, were being written
wrongly at the location of first MSDU frame. Fixing that by copying
the MSDU at skb->tail of AMSDU.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix indentation in ar9003_hw_set_power_per_rate_table
Gabor Juhos [Thu, 2 Aug 2012 14:00:52 +0000 (16:00 +0200)]
ath9k: fix indentation in ar9003_hw_set_power_per_rate_table

The current indentation is off by one tab.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: optimize power level initialization for CTL_[25]GHT20
Gabor Juhos [Thu, 2 Aug 2012 14:00:51 +0000 (16:00 +0200)]
ath9k: optimize power level initialization for CTL_[25]GHT20

The first part of the power array is initialized in a loop
and the last two values are initialized separately. Extend
the loop to cover the last two items, and remove the separate
initialization.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocarl9170: Add support for NL80211_IFTYPE_MESH_POINT interfaces
Javier Lopez [Fri, 27 Jul 2012 18:27:25 +0000 (11:27 -0700)]
carl9170: Add support for NL80211_IFTYPE_MESH_POINT interfaces

This patch contains following modifications:

- Add mesh capabilities on fw.c to permit creation of mesh
  interfaces using this driver.

- Modify carl9170_set_operating_mode, to use AP-style beaconing
  with mesh interfaces.

- Allow beacon updates for NL80211_IFTYPE_MESH_POINT type in
  carl9170_handle_command_response.

- Add NL80211_IFTYPE_MESH_POINT case on carl9170_op_add_interfaces to
  support mesh/ap/sta virtual interface combinations.

Signed-off-by: Javier Lopez <jlopex@cozybit.com>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: add overriding RF control for rev7+
Rafał Miłecki [Thu, 26 Jul 2012 08:25:09 +0000 (10:25 +0200)]
b43: N-PHY: add overriding RF control for rev7+

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: be more user friendly with PHY info
Rafał Miłecki [Thu, 26 Jul 2012 06:16:01 +0000 (08:16 +0200)]
b43: be more user friendly with PHY info

First of all, use PHY names instead of magic numbers. It should make
configuring kernel easier in case of not enabled PHY type support.
Secondly, always print info about PHY. This is really basic info about
hardware and quite important for the support level.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: init 0x2057 radio
Rafał Miłecki [Wed, 25 Jul 2012 22:07:39 +0000 (00:07 +0200)]
b43: N-PHY: init 0x2057 radio

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: finish 0x2056 radio setup
Rafał Miłecki [Wed, 25 Jul 2012 22:07:38 +0000 (00:07 +0200)]
b43: N-PHY: finish 0x2056 radio setup

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: add helper waiting for given value in radio reg
Rafał Miłecki [Wed, 25 Jul 2012 22:07:37 +0000 (00:07 +0200)]
b43: add helper waiting for given value in radio reg

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: rename host flags defines
Rafał Miłecki [Wed, 25 Jul 2012 14:58:38 +0000 (16:58 +0200)]
b43: rename host flags defines

There are more than 3 registers on new hardware. Host flags handling has
to be rewritten, as we can't use u128 type to handle all 5 regs.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agop54pci: convert driver to use asynchronous firmware loading
Larry Finger [Tue, 24 Jul 2012 19:16:42 +0000 (21:16 +0200)]
p54pci: convert driver to use asynchronous firmware loading

Drivers that load firmware from their probe routine have problems with the
latest versions of udev as they get timeouts while waiting for user
space to start. The problem is fixed by using request_firmware_nowait()
and delaying the start of mac80211 until the firmware is loaded.

To prevent the possibility of the driver being unloaded while the firmware
loading callback is still active, a completion queue entry is used.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: add PHY rev7+ workarounds
Rafał Miłecki [Tue, 24 Jul 2012 17:18:20 +0000 (19:18 +0200)]
b43: N-PHY: add PHY rev7+ workarounds

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: update workarounds
Rafał Miłecki [Tue, 24 Jul 2012 17:18:19 +0000 (19:18 +0200)]
b43: N-PHY: update workarounds

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: use ieee80211_channel_to_frequency
Johannes Berg [Tue, 24 Jul 2012 15:35:57 +0000 (17:35 +0200)]
brcmsmac: use ieee80211_channel_to_frequency

Instead of hard-coding almost the same functionality,
just use ieee80211_channel_to_frequency() directly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoBluetooth: Refactor in hci_le_conn_complete_evt
Andre Guedes [Fri, 27 Jul 2012 18:10:16 +0000 (15:10 -0300)]
Bluetooth: Refactor in hci_le_conn_complete_evt

This patch moves the hci_conn check to begining of hci_le_conn_
complete_evt in order to improve code's readability and better
error handling.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Lookup hci_conn in hci_le_conn_complete_evt
Andre Guedes [Fri, 27 Jul 2012 18:10:15 +0000 (15:10 -0300)]
Bluetooth: Lookup hci_conn in hci_le_conn_complete_evt

This patch does a trivial code refactoring in hci_conn lookup in
hci_le_conn_complete_evt. It performs the hci_conn lookup at the
begining of the function since it is used by both flows (error
and success).

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Find hci_conn by BT_CONNECT state
Andre Guedes [Fri, 27 Jul 2012 18:10:14 +0000 (15:10 -0300)]
Bluetooth: Find hci_conn by BT_CONNECT state

This patch changes hci_cs_le_create_conn to perform hci_conn lookup
by state instead of bdaddr.

Since we can have only one LE connection in BT_CONNECT state, we can
perform LE hci_conn lookup by state. This way, we don't rely on
hci_sent_cmd_data helper to find the hci_conn object.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Refactor hci_cs_le_create_conn
Andre Guedes [Fri, 27 Jul 2012 18:10:13 +0000 (15:10 -0300)]
Bluetooth: Refactor hci_cs_le_create_conn

This patch does some code refactoring in hci_cs_le_create_conn
function. The hci_conn object is only needed in case of failure,
therefore hdev locking and hci_conn lookup were moved to
if-statement scope.

Also, the conn->state check was removed since we should always
close the connection if it fails.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Remove unneeded code
Andre Guedes [Fri, 27 Jul 2012 18:10:12 +0000 (15:10 -0300)]
Bluetooth: Remove unneeded code

This patch removes some unneeded code from hci_cs_le_create_conn.

If the hci_conn is not found, it means this LE connection attempt
was triggered by a thrid-party tool (e.g. hcitool). We should not
create this new hci_conn in LE Create Connection command status
event since it is already properly handled in LE Connection
Complete event.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Fix hci_le_conn_complete_evt
Andre Guedes [Fri, 27 Jul 2012 18:10:11 +0000 (15:10 -0300)]
Bluetooth: Fix hci_le_conn_complete_evt

We need to check the 'Role' parameter from the LE Connection
Complete Event in order to properly set 'out' and 'link_mode'
fields from hci_conn structure.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Trivial refactoring
Andre Guedes [Fri, 27 Jul 2012 18:10:10 +0000 (15:10 -0300)]
Bluetooth: Trivial refactoring

This patch replaces the unlock-and-return statements by the goto
statement.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in dtl1_cs.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:41 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in dtl1_cs.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in btwilink.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:40 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in btwilink.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in btusb.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:39 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in btusb.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in btuart_cs.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:38 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in btuart_cs.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in btsdio.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:37 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in btsdio.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in btmrvl_sdio.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:36 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in btmrvl_sdio.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in bt3c_cs.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:35 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in bt3c_cs.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in bpa10x.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:34 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in bpa10x.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in bluecard_cs.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:33 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in bluecard_cs.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in bfusb.c file
Sachin Kamat [Fri, 27 Jul 2012 07:08:32 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in bfusb.c file

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use devm_kzalloc in bcm203x.c file.
Sachin Kamat [Fri, 27 Jul 2012 07:08:31 +0000 (12:38 +0530)]
Bluetooth: Use devm_kzalloc in bcm203x.c file.

devm_kzalloc() eliminates the need to free memory explicitly
thereby saving some cleanup code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Added /proc/net/sco via bt_procfs_init()
Masatake YAMATO [Wed, 25 Jul 2012 16:30:12 +0000 (01:30 +0900)]
Bluetooth: Added /proc/net/sco via bt_procfs_init()

Added /proc/net/sco via bt_procfs_init().

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Added /proc/net/rfcomm via bt_procfs_init()
Masatake YAMATO [Wed, 25 Jul 2012 16:29:49 +0000 (01:29 +0900)]
Bluetooth: Added /proc/net/rfcomm via bt_procfs_init()

Added /proc/net/rfcomm via bt_procfs_init().

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Added /proc/net/l2cap via bt_procfs_init()
Masatake YAMATO [Wed, 25 Jul 2012 16:29:25 +0000 (01:29 +0900)]
Bluetooth: Added /proc/net/l2cap via bt_procfs_init()

Added /proc/net/l2cap via bt_procfs_init().

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Added /proc/net/hidp via bt_procfs_init()
Masatake YAMATO [Wed, 25 Jul 2012 16:29:00 +0000 (01:29 +0900)]
Bluetooth: Added /proc/net/hidp via bt_procfs_init()

Added /proc/net/hidp via bt_procfs_init().

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Added /proc/net/hci via bt_procfs_init()
Masatake YAMATO [Wed, 25 Jul 2012 16:28:36 +0000 (01:28 +0900)]
Bluetooth: Added /proc/net/hci via bt_procfs_init()

Added /proc/net/hci via bt_procfs_init().

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Added /proc/net/cmtp via bt_procfs_init()
Masatake YAMATO [Wed, 25 Jul 2012 16:28:07 +0000 (01:28 +0900)]
Bluetooth: Added /proc/net/cmtp via bt_procfs_init()

Added /proc/net/cmtp via bt_procfs_init().

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Added /proc/net/bnep via bt_procfs_init()
Masatake YAMATO [Wed, 25 Jul 2012 16:27:35 +0000 (01:27 +0900)]
Bluetooth: Added /proc/net/bnep via bt_procfs_init()

Added /proc/net/bnep via bt_procfs_init().

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: /proc/net/ entries for bluetooth protocols
Masatake YAMATO [Wed, 25 Jul 2012 16:26:32 +0000 (01:26 +0900)]
Bluetooth: /proc/net/ entries for bluetooth protocols

lsof command can tell the type of socket processes are using.
Internal lsof uses inode numbers on socket fs to resolve the type of
sockets. Files under /proc/net/, such as tcp, udp, unix, etc provides
such inode information.

Unfortunately bluetooth related protocols don't provide such inode
information. This patch series introduces /proc/net files for the protocols.

This patch against af_bluetooth.c provides facility to the implementation
of protocols. This patch extends bt_sock_list and introduces two exported
function bt_procfs_init, bt_procfs_cleanup.

The type bt_sock_list is already used in some of implementation of
protocols. bt_procfs_init prepare seq_operations which converts
protocol own bt_sock_list data to protocol own proc entry when the
entry is accessed.

What I, lsof user, need is just inode number of bluetooth
socket. However, people may want more information. The bt_procfs_init
takes a function pointer for customizing the show handler of
seq_operations.

In v4 patch, __acquires and __releases attributes are added to suppress
sparse warning. Suggested by Andrei Emeltchenko.

In v5 patch, linux/proc_fs.h is included to use PDE. Build error is
reported by Fengguang Wu.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Free the l2cap channel list only when refcount is zero
Jaganath Kanakkassery [Fri, 13 Jul 2012 12:47:55 +0000 (18:17 +0530)]
Bluetooth: Free the l2cap channel list only when refcount is zero

Move the l2cap channel list chan->global_l under the refcnt
protection and free it based on the refcnt.

Signed-off-by: Jaganath Kanakkassery <jaganath.k@samsung.com>
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Reviewed-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Move l2cap_chan_hold/put to l2cap_core.c
Jaganath Kanakkassery [Fri, 13 Jul 2012 12:47:54 +0000 (18:17 +0530)]
Bluetooth: Move l2cap_chan_hold/put to l2cap_core.c

Refactor the code in order to use the l2cap_chan_destroy()
from l2cap_chan_put() under the refcnt protection.

Signed-off-by: Jaganath Kanakkassery <jaganath.k@samsung.com>
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Reviewed-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Remove locking in hci_user_passkey_request_evt
Andre Guedes [Mon, 23 Jul 2012 21:19:04 +0000 (18:19 -0300)]
Bluetooth: Remove locking in hci_user_passkey_request_evt

This patch removes hdev locking in hci_user_passkey_request_evt
since it is not needed. mgmt_user_passkey_request simply calls
mgmt_event which does not require hdev locking at all.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Make connect / disconnect cfm functions return void
Andrei Emeltchenko [Tue, 24 Jul 2012 13:06:15 +0000 (16:06 +0300)]
Bluetooth: Make connect / disconnect cfm functions return void

Return values are never used because callers hci_proto_connect_cfm
and hci_proto_disconn_cfm return void.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use lmp_no_flush_capable where applicable
Andre Guedes [Tue, 24 Jul 2012 18:03:53 +0000 (15:03 -0300)]
Bluetooth: Use lmp_no_flush_capable where applicable

This patch replaces all LMP_NO_FLUSH bit checking by the helper
macro lmp_no_flush_capable.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use lmp_sniffsubr_capable where applicable
Andre Guedes [Tue, 24 Jul 2012 18:03:52 +0000 (15:03 -0300)]
Bluetooth: Use lmp_sniffsubr_capable where applicable

This patch replaces all LMP_SNIFF_SUBR bit checking by the helper
macro lmp_sniffsubr_capable.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use lmp_sniff_capable where applicable
Andre Guedes [Tue, 24 Jul 2012 18:03:51 +0000 (15:03 -0300)]
Bluetooth: Use lmp_sniff_capable where applicable

This patch replaces all LMP_SNIFF bit checking by the helper macro
lmp_sniff_capable.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use lmp_rswitch_capable where applicable
Andre Guedes [Tue, 24 Jul 2012 18:03:50 +0000 (15:03 -0300)]
Bluetooth: Use lmp_rswitch_capable where applicable

This patch replaces all LMP_RSWITCH bit checking by the helper macro
lmp_rswitch_capable.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use lmp_esco_capable where applicable
Andre Guedes [Tue, 24 Jul 2012 18:03:49 +0000 (15:03 -0300)]
Bluetooth: Use lmp_esco_capable where applicable

This patch replaces all LMP_ESCO bit checking by the helper macro
lmp_esco_capable.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use lmp_ssp_capable where applicable
Andre Guedes [Tue, 24 Jul 2012 18:03:48 +0000 (15:03 -0300)]
Bluetooth: Use lmp_ssp_capable where applicable

This patch replaces all LMP_SIMPLE_PAIR bit checking by the helper
macro lmp_ssp_capable.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use lmp_le_capable where applicable
Andre Guedes [Tue, 24 Jul 2012 18:03:47 +0000 (15:03 -0300)]
Bluetooth: Use lmp_le_capable where applicable

This patch replaces all LMP_LE bit checking by the helper macro
lmp_le_capable.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use lmp_bredr_capable where applicable
Andre Guedes [Tue, 24 Jul 2012 18:03:46 +0000 (15:03 -0300)]
Bluetooth: Use lmp_bredr_capable where applicable

This patch replaces all LMP_NO_BREDR bit checking by the helper
macro lmp_bredr_capable.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Fix processing A2MP chan in security_cfm
Andrei Emeltchenko [Thu, 19 Jul 2012 14:03:47 +0000 (17:03 +0300)]
Bluetooth: Fix processing A2MP chan in security_cfm

Do not process A2MP channel in l2cap_security_cfm

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Do not shadow hdr variable
Andrei Emeltchenko [Thu, 19 Jul 2012 14:03:46 +0000 (17:03 +0300)]
Bluetooth: Do not shadow hdr variable

Fix compile warnings below:

...
net/bluetooth/a2mp.c:505:33: warning: symbol 'hdr' shadows an earlier one
net/bluetooth/a2mp.c:498:25: originally declared here
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Define AMP controller statuses
Andrei Emeltchenko [Thu, 19 Jul 2012 14:03:45 +0000 (17:03 +0300)]
Bluetooth: Define AMP controller statuses

AMP status codes copied from Bluez patch sent by Peter Krystad
<pkrystad@codeaurora.org>.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: trivial: Fix mixing spaces and tabs in smp
Andrei Emeltchenko [Thu, 19 Jul 2012 14:03:44 +0000 (17:03 +0300)]
Bluetooth: trivial: Fix mixing spaces and tabs in smp

Change spaces to tabs in smp code

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: debug: Fix printing refcnt for hci_conn
Andrei Emeltchenko [Thu, 19 Jul 2012 14:03:42 +0000 (17:03 +0300)]
Bluetooth: debug: Fix printing refcnt for hci_conn

Use the same style for refcnt printing through all Bluetooth code
taking the reference the l2cap_chan refcnt printing.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: debug: Fix printing A2MP cmd code format
Andrei Emeltchenko [Thu, 19 Jul 2012 14:03:41 +0000 (17:03 +0300)]
Bluetooth: debug: Fix printing A2MP cmd code format

Print A2MP code format according to Bluetooth style.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: mgmt: Managing only BR/EDR HCI controllers
Andrei Emeltchenko [Thu, 19 Jul 2012 14:03:40 +0000 (17:03 +0300)]
Bluetooth: mgmt: Managing only BR/EDR HCI controllers

Add check that HCI controller is BR/EDR. AMP controller shall not be
managed by mgmt interface and consequently user space.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Remove missing code
Andre Guedes [Thu, 19 Jul 2012 14:46:13 +0000 (11:46 -0300)]
Bluetooth: Remove missing code

This patch removes the struct adv_entry since it is not used anymore.
This struct should have been removed in commit 479453d (Bluetooth:
Remove advertising cache).

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoipv4: Introduce IN_DEV_NET_ROUTE_LOCALNET
Eric Dumazet [Fri, 3 Aug 2012 21:27:25 +0000 (21:27 +0000)]
ipv4: Introduce IN_DEV_NET_ROUTE_LOCALNET

performance profiles show a high cost in the IN_DEV_ROUTE_LOCALNET()
call done in ip_route_input_slow(), because of multiple dereferences,
even if cache lines are clean and available in cpu caches.

Since we already have the 'net' pointer, introduce
IN_DEV_NET_ROUTE_LOCALNET() macro avoiding two dereferences
(dev_net(in_dev->dev))

Also change the tests to use IN_DEV_NET_ROUTE_LOCALNET() only if saddr
or/and daddr are loopback addresse.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: change inet_addr_hash()
Eric Dumazet [Fri, 3 Aug 2012 21:06:50 +0000 (21:06 +0000)]
ipv4: change inet_addr_hash()

Use net_hash_mix(net) instead of hash_ptr(net, 8), and use
hash_32() instead of using a serie of XOR

Define IN4_ADDR_HSIZE_SHIFT for clarity

__ip_dev_find() can perform the net_eq() call only if ifa_local
matches the key, to avoid unneeded dereferences.

remove inline attributes

# size net/ipv4/devinet.o.before net/ipv4/devinet.o
   text    data     bss     dec     hex filename
  17471    2545    2048   22064    5630 net/ipv4/devinet.o.before
  17335    2545    2048   21928    55a8 net/ipv4/devinet.o

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: skb_share_check() should use consume_skb()
Eric Dumazet [Fri, 3 Aug 2012 20:54:15 +0000 (20:54 +0000)]
net: skb_share_check() should use consume_skb()

In order to avoid false drop_monitor indications, we should
call consume_skb() if skb_clone() was successful.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://kernel.ubuntu.com/rtg/net-next
David S. Miller [Sat, 4 Aug 2012 03:40:47 +0000 (20:40 -0700)]
Merge branch 'master' of git://kernel.ubuntu.com/rtg/net-next

12 years agodrivers: net: ethernet: cpsw: Add device tree support to CPSW
Mugunthan V N [Mon, 30 Jul 2012 10:17:14 +0000 (10:17 +0000)]
drivers: net: ethernet: cpsw: Add device tree support to CPSW

This patch adds device tree support for cpsw driver

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrivers: net: ethernet: cpsw: Add SOC dependency support for cpsw dependent modules
Mugunthan V N [Mon, 30 Jul 2012 10:17:13 +0000 (10:17 +0000)]
drivers: net: ethernet: cpsw: Add SOC dependency support for cpsw dependent modules

cpsw is dependent on davinci_cpdma and davinci_mdio, so adding SOC support for
dependent modules

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoppp: add 64 bit stats
Kevin Groeneveld [Fri, 27 Jul 2012 17:38:53 +0000 (17:38 +0000)]
ppp: add 64 bit stats

Add 64 bit stats to ppp driver.  The 64 bit stats include tx_bytes,
rx_bytes, tx_packets and rx_packets.  Other stats are still 32 bit.
The 64 bit stats can be retrieved via the ndo_get_stats operation.  The
SIOCGPPPSTATS ioctl is still 32 bit stats only.

Signed-off-by: Kevin Groeneveld <kgroeneveld@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: add support for queue override by setting queue_id for port
Jiri Pirko [Fri, 27 Jul 2012 06:28:55 +0000 (06:28 +0000)]
team: add support for queue override by setting queue_id for port

Similar to what bonding has. This allows to set queue_id for port so
this port will be used when skb with matching skb->queue_mapping is
going to be transmitted.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: add per port priority option
Jiri Pirko [Fri, 27 Jul 2012 06:28:54 +0000 (06:28 +0000)]
team: add per port priority option

Allow userspace to set port priority.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoteam: add signed 32-bit team option type
Jiri Pirko [Fri, 27 Jul 2012 06:28:53 +0000 (06:28 +0000)]
team: add signed 32-bit team option type

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: add signed types
Jiri Pirko [Fri, 27 Jul 2012 06:28:52 +0000 (06:28 +0000)]
netlink: add signed types

Signed types might be needed in NL communication from time to time
(I need s32 in team driver), so add them.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocris: fix eth_v10.c build error
Randy Dunlap [Fri, 3 Aug 2012 14:38:07 +0000 (14:38 +0000)]
cris: fix eth_v10.c build error

Fix build error on cris (not tested, no toolchain here):

drivers/net/cris/eth_v10.c: error: too many arguments to function 'e100rxtx_interrupt'

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN
Peter Meiser [Thu, 2 Aug 2012 02:30:20 +0000 (02:30 +0000)]
cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN

Hello,

looking at http://sourceforge.net/apps/mediawiki/mbm/index.php?title=Main_Page#Supported_devices, there are branded Ericsson devices from Dell and Toshiba.

The to-be-added vendor IDs are 0x413c for Dell and 0x0930 for Toshiba.

Please find attached a patch to add these vendor IDs.

Signed-off-by: Peter Meiser <meiser@gmx-topmail.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoisdnloop: fix and simplify isdnloop_init()
Wu Fengguang [Thu, 2 Aug 2012 23:10:01 +0000 (23:10 +0000)]
isdnloop: fix and simplify isdnloop_init()

Fix a buffer overflow bug by removing the revision and printk.

[   22.016214] isdnloop-ISDN-driver Rev 1.11.6.7
[   22.097508] isdnloop: (loop0) virtual card added
[   22.174400] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff83244972
[   22.174400]
[   22.436157] Pid: 1, comm: swapper Not tainted 3.5.0-bisect-00018-gfa8bbb1-dirty #129
[   22.624071] Call Trace:
[   22.720558]  [<ffffffff832448c3>] ? CallcNew+0x56/0x56
[   22.815248]  [<ffffffff8222b623>] panic+0x110/0x329
[   22.914330]  [<ffffffff83244972>] ? isdnloop_init+0xaf/0xb1
[   23.014800]  [<ffffffff832448c3>] ? CallcNew+0x56/0x56
[   23.090763]  [<ffffffff8108e24b>] __stack_chk_fail+0x2b/0x30
[   23.185748]  [<ffffffff83244972>] isdnloop_init+0xaf/0xb1

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agohyperv: Move wait completion msg code into rndis_filter_halt_device()
Haiyang Zhang [Fri, 3 Aug 2012 09:32:18 +0000 (09:32 +0000)]
hyperv: Move wait completion msg code into rndis_filter_halt_device()

We need to wait for send_completion msg before put_rndis_request() at
the end of rndis_filter_halt_device(). Otherwise, netvsc_send_completion()
may reference freed memory which is overwritten, and cause panic.

Reported-by: Long Li <longli@microsoft.com>
Reported-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_core: Remove port type restrictions
Yevgeny Petrilin [Fri, 3 Aug 2012 00:38:38 +0000 (00:38 +0000)]
net/mlx4_core: Remove port type restrictions

Port1=Eth, Port2=IB restriction is no longer required.
Having RoCE, there will always rdma port initialized over ConnectX
physical port, no matter whether the link layer is IB or Ethernet.
So we always have dual port IB device.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_en: Fixing TX queue stop/wake flow
Yevgeny Petrilin [Fri, 3 Aug 2012 00:38:37 +0000 (00:38 +0000)]
net/mlx4_en: Fixing TX queue stop/wake flow

Removing the ring->blocked flag, it is redundant and leads to a race:

We close the TX queue and then set the "blocked" flag.
Between those 2 operations the completion function can check the "blocked"
flag, sees that it is 0, and wouldn't open the TX queue.

Using netif_tx_queue_stopped to check the state of the queue to avoid this race.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/mlx4_en: loopbacked packets are dropped when SMAC=DMAC
Amir Vadai [Fri, 3 Aug 2012 00:38:36 +0000 (00:38 +0000)]
net/mlx4_en: loopbacked packets are dropped when SMAC=DMAC

Should NOT check SMAC=DMAC when:
1. loopback is turned on
2. validate_loopback is true.

Fixed it accordingly.

Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet_sched: gact: Fix potential panic in tcf_gact().
Hiroaki SHIMODA [Fri, 3 Aug 2012 10:57:52 +0000 (19:57 +0900)]
net_sched: gact: Fix potential panic in tcf_gact().

gact_rand array is accessed by gact->tcfg_ptype whose value
is assumed to less than MAX_RAND, but any range checks are
not performed.

So add a check in tcf_gact_init(). And in tcf_gact(), we can
reduce a branch.

Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoemulex: benet: Add a missing CR in the end of message
Masanari Iida [Fri, 3 Aug 2012 02:36:51 +0000 (02:36 +0000)]
emulex: benet: Add a missing CR in the end of message

Missing a CR in printk causes 2 messages printed in one line.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoath9k: Add PID/VID support for AR1111
Mohammed Shafi Shajakhan [Thu, 2 Aug 2012 06:28:50 +0000 (11:58 +0530)]
ath9k: Add PID/VID support for AR1111

AR1111 is same as AR9485. The h/w
difference between them is quite insignificant,
Felix suggests only very few baseband features
may not be available in AR1111. The h/w code for
AR9485 is already present, so AR1111 should
work fine with the addition of its PID/VID.

Cc: stable@vger.kernel.org [2.6.39+]
Cc: Felix Bitterli <felixb@qca.qualcomm.com>
Reported-by: Tim Bentley <Tim.Bentley@Gmail.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Tested-by: Tim Bentley <Tim.Bentley@Gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: use channel flags to restrict OFDM
Seth Forshee [Wed, 1 Aug 2012 20:58:43 +0000 (15:58 -0500)]
brcmsmac: use channel flags to restrict OFDM

brcmsmac cannot call freq_reg_info() during channel changes as it does
not hold cfg80211_lock, and as a result it generates a lockdep warning.
freq_reg_info() is being used to determine whether OFDM is allowed on
the current channel, so we can avoid the errant call by using the new
IEEE80211_CHAN_NO_OFDM for this purpose instead.

Reported-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: fix two memory leaks
Daniel Drake [Wed, 1 Aug 2012 20:35:36 +0000 (21:35 +0100)]
libertas: fix two memory leaks

The if_sdio_card structure was never being freed, and neither
was the command structure used for association.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00 : fix rt3290 resuming failed.
Woody Hung [Tue, 31 Jul 2012 13:53:33 +0000 (21:53 +0800)]
rt2x00 : fix rt3290 resuming failed.

This patch is going to fix the resuming failed from S3/S4
for rt3290 chip.

Signed-off-by: Woody Hung <Woody.Hung@mediatek.com>
Cc: Kevin Chou <kevin.chou@mediatek.com>
Signed-off-by: Chen, Chien-Chia <machen@suse.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: don't reset card on error when it is being removed
Daniel Drake [Mon, 30 Jul 2012 21:58:04 +0000 (22:58 +0100)]
libertas: don't reset card on error when it is being removed

On an OLPC XO-1.5 we have seen the following situation:
 - the system starts going into suspend
 - no wake params are set, so the mmc layer removes the card
 - during remove, we send a command to the card
 - that command fails, causing if_sdio's reset method to try and remove
   the mmc card in attempt to reset it
 - the mmc layer is not happy about being asked to remove a card that
   it is already removing, and the kernel crashes

While the MMC layer could possibly be taught to behave better here,
it also seems sensible for libertas not to try and reset a card if
we're in the process of removing it anyway.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: fix logic in GPIO init
Rafał Miłecki [Mon, 23 Jul 2012 20:57:01 +0000 (22:57 +0200)]
b43: fix logic in GPIO init

Add some comments by the way

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: BCM43228 support
Rafał Miłecki [Mon, 23 Jul 2012 16:20:12 +0000 (18:20 +0200)]
bcma: BCM43228 support

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
John W. Linville [Thu, 2 Aug 2012 17:49:38 +0000 (13:49 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211

12 years agocfg80211: Clear "beacon_found" on regulatory restore
Paul Stewart [Wed, 1 Aug 2012 23:54:42 +0000 (16:54 -0700)]
cfg80211: Clear "beacon_found" on regulatory restore

Restore the default state to the "beacon_found" flag when
the channel flags are restored.  Otherwise, we can end up
with a channel that we can no longer transmit on even when
we can see beacons on that channel.

Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agocfg80211: add channel flag to prohibit OFDM operation
Seth Forshee [Wed, 1 Aug 2012 20:58:42 +0000 (15:58 -0500)]
cfg80211: add channel flag to prohibit OFDM operation

Currently the only way for wireless drivers to tell whether or not OFDM
is allowed on the current channel is to check the regulatory
information. However, this requires hodling cfg80211_mutex, which is not
visible to the drivers.

Other regulatory restrictions are provided as flags in the channel
definition, so let's do similarly with OFDM. This patch adds a new flag,
IEEE80211_CHAN_NO_OFDM, to tell drivers that OFDM on a channel is not
allowed. This flag is set on any channels for which regulatory indicates
that OFDM is prohibited.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agofirmware: Remove obsolete Chelsio cxgb3 firmware
Tim Gardner [Wed, 1 Aug 2012 19:11:08 +0000 (13:11 -0600)]
firmware: Remove obsolete Chelsio cxgb3 firmware

The current firmware version used by the device driver
is 7.12.0

Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: James Bottomley <JBottomley@Parallels.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Divy Le Ray <divy@chelsio.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
12 years agoipv4: route.c cleanup
Eric Dumazet [Wed, 1 Aug 2012 23:23:40 +0000 (23:23 +0000)]
ipv4: route.c cleanup

Remove unused includes after IP cache removal

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: fix mem leak when command is unknown
Jesper Juhl [Tue, 31 Jul 2012 11:39:37 +0000 (11:39 +0000)]
bnx2x: fix mem leak when command is unknown

In bnx2x_mcast_enqueue_cmd() we'll leak the memory allocated to
'new_cmd' if we hit the deafault case of the 'switch (cmd)'.
Add a 'kfree(new_cmd)' to that case to avoid the leak.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoFix unexpected SA hard expiration after changing date
Fan Du [Mon, 30 Jul 2012 21:43:54 +0000 (21:43 +0000)]
Fix unexpected SA hard expiration after changing date

After SA is setup, one timer is armed to detect soft/hard expiration,
however the timer handler uses xtime to do the math. This makes hard
expiration occurs first before soft expiration after setting new date
with big interval. As a result new child SA is deleted before rekeying
the new one.

Signed-off-by: Fan Du <fdu@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>