openwrt/staging/blogic.git
12 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Wed, 16 May 2012 19:38:11 +0000 (15:38 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

12 years agoBluetooth: Report proper error number in disconnection
Gustavo Padovan [Wed, 16 May 2012 15:17:12 +0000 (12:17 -0300)]
Bluetooth: Report proper error number in disconnection

If encryption change fails we should disconnect with auth failure error
code.

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
12 years agoBluetooth: Create flags for bt_sk()
Gustavo Padovan [Wed, 16 May 2012 15:17:10 +0000 (12:17 -0300)]
Bluetooth: Create flags for bt_sk()

defer_setup and suspended are now flags into bt_sk().

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
12 years agoBluetooth: report the right security level in getsockopt
Gustavo Padovan [Mon, 7 May 2012 06:07:26 +0000 (03:07 -0300)]
Bluetooth: report the right security level in getsockopt

During a security level elevation we need to keep track of the current
security level of a connection until the new one is not confirmed.

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
12 years agoBluetooth: Lock the L2CAP channel when sending
Mat Martineau [Fri, 4 May 2012 21:20:31 +0000 (14:20 -0700)]
Bluetooth: Lock the L2CAP channel when sending

The ERTM and streaming mode transmit queue must only be accessed while
the L2CAP channel lock is held.  Locking the channel before calling
l2cap_chan_send ensures that multiple threads cannot simultaneously
manipulate the queue when sending and receiving concurrently.

L2CAP channel locking had previously moved to the l2cap_chan struct
instead of the associated socket, so some of the old socket locking
can also be removed in this patch.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Restore locking semantics when looking up L2CAP channels
Mat Martineau [Wed, 2 May 2012 16:42:00 +0000 (09:42 -0700)]
Bluetooth: Restore locking semantics when looking up L2CAP channels

As the comment for l2cap_get_chan_by_scid indicated, the function used
to return a locked socket.  The lock for the socket was acquired while
the channel list was also locked.

When locking was moved over to the l2cap_chan structure, the channel
lock was no longer acquired with the channel list still locked.  This
made it possible for the l2cap_chan to be deleted after
conn->chan_lock was released but before l2cap_chan_lock was called.
Making the call to l2cap_chan_lock before releasing conn->chan_lock
makes it impossible for the l2cap_chan to be deleted at the wrong
time.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Reviewed-by: Ulisses Furquim <ulisses@profusion.mobi>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Fix a redundant and problematic incoming MTU check
Mat Martineau [Wed, 2 May 2012 16:41:59 +0000 (09:41 -0700)]
Bluetooth: Fix a redundant and problematic incoming MTU check

The L2CAP MTU for incoming data is verified differently depending on
the L2CAP mode, so the check is best performed in a mode-specific
context.  Checking the incoming MTU before HCI fragment reassembly is
a layer violation and assumes all bytes after the standard L2CAP
header are L2CAP data.

This approach causes issues with unsegmented ERTM or streaming mode
frames, where there are additional enhanced or extended headers before
the data payload and possible FCS bytes after the data payload.  A
valid frame could be as many as 10 bytes larger than the MTU.

Removing this code is the best fix, because the MTU is checked later
on for all L2CAP data frames (connectionless, basic, ERTM, and
streaming).  This also gets rid of outdated locking (socket instead of
l2cap_chan) and an extra lookup of the channel ID.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Reviewed-by: Ulisses Furquim <ulisses@profusion.mobi>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Add support for Foxconn/Hon Hai AR5BBU22 0489:E03C
Michael Gruetzner [Wed, 2 May 2012 20:33:40 +0000 (22:33 +0200)]
Bluetooth: Add support for Foxconn/Hon Hai AR5BBU22 0489:E03C

Add Foxconn/Hon Hai AR5BBU22 Bluetooth Module( 0x489:0xE03C) to
the blacklist of btusb module and add it to the ath3k module to properly
load the firmware in Kernel 3.3.4
The device is integrated in  e.g. some  Acer Aspire 7750G.

Output from /sys/kernel/debug/usb/devices:

T:  Bus=01 Lev=02 Prnt=02 Port=05 Cnt=02 Dev#=  6 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0489 ProdID=e03c Rev= 0.02
S:  Manufacturer=Atheros Communications
S:  Product=Bluetooth USB Host Controller
S:  SerialNumber=Alaska Day 2006
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms

Signed-off-by: Michael Gruetzner <mgruetzn@gmx.de>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
12 years agoBluetooth: Fix EIR data generation for mgmt_device_found
Vishal Agarwal [Thu, 26 Apr 2012 13:49:56 +0000 (19:19 +0530)]
Bluetooth: Fix EIR data generation for mgmt_device_found

The mgmt_device_found function expects to receive only the significant
part of the EIR data so it needs to be removed before calling the
function. This patch adds a new eir_get_length() helper function to
calculate the length of the significant part.

Signed-off-by: Vishal Agarwal <vishal.agarwal@stericsson.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
12 years agoBluetooth: Fix Inquiry with RSSI event mask
Johan Hedberg [Thu, 26 Apr 2012 06:47:46 +0000 (09:47 +0300)]
Bluetooth: Fix Inquiry with RSSI event mask

The right bit for "Inquiry with RSSI" is 0x02 and not 0x04 (which means
"Read Remote Extended Features Complete").

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
12 years agoBluetooth: improve readability of l2cap_seq_list code
Gustavo Padovan [Wed, 9 May 2012 21:28:00 +0000 (18:28 -0300)]
Bluetooth: improve readability of l2cap_seq_list code

Removes one indentation level.

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
12 years agoBluetooth: Fix skb length calculation
Gustavo Padovan [Fri, 11 May 2012 16:16:12 +0000 (13:16 -0300)]
Bluetooth: Fix skb length calculation

When we add a fragment to a skb, len and data_len fields need to be
updated.

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
12 years agoBluetooth: Fix packet size provided to the controller
Gustavo Padovan [Fri, 11 May 2012 16:16:11 +0000 (13:16 -0300)]
Bluetooth: Fix packet size provided to the controller

When building fragmented skb's skb->len keeps track of the size of head
plus all fragments combined, however when queueing the skb for sending we
need to report the head size instead of the total size, so we just set
skb->len to skb_headlen().

This bug appeared when implementing MSG_MORE support for L2CAP sockets, it
never showed up before because l2cap_skbuff_fromiovec() never accounted skb
size correctly. A following patch will fix this.

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Reviewed-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
12 years agoBluetooth: Fix wrong set of skb fragments
Gustavo Padovan [Tue, 15 May 2012 16:22:55 +0000 (13:22 -0300)]
Bluetooth: Fix wrong set of skb fragments

If alloc() fails we let the frags linked list with garbage value (the
err ptr value) in its last element.

Reported-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Gustavo Padovan [Wed, 16 May 2012 19:11:44 +0000 (16:11 -0300)]
Merge git://git./linux/kernel/git/bluetooth/bluetooth

12 years agomac80211: Add debugfs entry for mesh ht_opmode
Ashok Nagarajan [Tue, 8 May 2012 04:00:32 +0000 (21:00 -0700)]
mac80211: Add debugfs entry for mesh ht_opmode

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Modify mesh_set_ht_prot_mode() to have less identation
Ashok Nagarajan [Tue, 8 May 2012 04:00:31 +0000 (21:00 -0700)]
mac80211: Modify mesh_set_ht_prot_mode() to have less identation

Determining types of peers is modified to have less indentation. This change is
suggested by Johannes. This patch also corrects the reference in comment to
IEEE 802.11-2012 version.

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix don't use '>' operator for matching channel types
Ashok Nagarajan [Tue, 8 May 2012 04:00:30 +0000 (21:00 -0700)]
mac80211: Fix don't use '>' operator for matching channel types

Johannes pointed out that the use of > operators for checking channel type
mismatch maynot be correct way as we may add other channel types in future.

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Push the deleted comment to correct place
Ashok Nagarajan [Tue, 8 May 2012 04:00:29 +0000 (21:00 -0700)]
mac80211: Push the deleted comment to correct place

This comment is deleted in the patch "mac80211: Advertise HT protection mode in
IEs". Moving the comment to the now corrected place.

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowlcore: fix some sparse warnings due to missing static declaration
Luciano Coelho [Wed, 16 May 2012 03:00:00 +0000 (06:00 +0300)]
wlcore: fix some sparse warnings due to missing static declaration

There were three sparse warnings in main.c due to missing static
declaration:

  CHECK   drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/ti/wlcore/main.c:1265:5: warning: symbol 'wl1271_validate_wowlan_pattern' was not declared. Should it be static?
drivers/net/wireless/ti/wlcore/main.c:1408:5: warning: symbol 'wl1271_convert_wowlan_pattern_to_rx_filter' was not declared. Should it be static?
drivers/net/wireless/ti/wlcore/main.c:4823:6: warning: symbol 'wl1271_connection_loss_work' was not declared. Should it be static?

Fix these by adding the static declaration to those functions.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowlcore: fix pointer print out in wl1271_acx_set_rx_filter()
Luciano Coelho [Wed, 16 May 2012 02:59:59 +0000 (05:59 +0300)]
wlcore: fix pointer print out in wl1271_acx_set_rx_filter()

The debug print in wl1271_acx_set_rx_filter() was causing the
following warning:

  CC      drivers/net/wireless/ti/wlcore/acx.o
drivers/net/wireless/ti/wlcore/acx.c: In function ‘wl1271_acx_set_rx_filter’:
drivers/net/wireless/ti/wlcore/acx.c:1759:2: warning: cast from pointer to integer of different size

Instead of casting the pointer to an integer, use %p to print it our
instead.

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: remove set_channel cfg80211 hook
Johannes Berg [Fri, 11 May 2012 17:24:34 +0000 (19:24 +0200)]
mwifiex: remove set_channel cfg80211 hook

Since mwifiex only supports managed and IBSS
modes, it doesn't need a set_channel call. The
callback might be called, but it won't matter
as nothing can use the channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: remove set_channel cfg80211 hook
Johannes Berg [Fri, 11 May 2012 17:23:57 +0000 (19:23 +0200)]
rndis_wlan: remove set_channel cfg80211 hook

Since rndis_wlan only supports managed and IBSS
modes, it doesn't need a set_channel call. The
callback might be called, but it won't matter
as nothing can use the channel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: support explicit monitor interface
Johannes Berg [Fri, 11 May 2012 08:53:18 +0000 (10:53 +0200)]
iwlwifi: support explicit monitor interface

Support explicit monitor interface to keep
injection working after the HW queue changes.
This also finally enables sniffer mode.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: invert the order of ssid list in scan cmd
David Spinadel [Fri, 11 May 2012 08:53:17 +0000 (10:53 +0200)]
iwlwifi: invert the order of ssid list in scan cmd

The firmware inverts the order of ssid list of scan command, we
should invert the order before sending the command, in order to
get probe requests sent in wanted order.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: disable default wildcard ssid scan
David Spinadel [Fri, 11 May 2012 08:53:16 +0000 (10:53 +0200)]
iwlwifi: disable default wildcard ssid scan

iwl_fill_probe_request has used to add a wildcard ssid IE to
any probe request template, now it's disabled and it will
send wildcard ssid only for full scan. Instead, the highest
priority ssid is set to the template.
Due to adding high priority SSID to the template, it reduce
IE len, but since we had only 260 bytes for IEs before changing
allocation size to be dynamic, now we should have a bit more room
for IEs.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: fix scan_cmd_size allocation
David Spinadel [Fri, 11 May 2012 08:53:15 +0000 (10:53 +0200)]
iwlwifi: fix scan_cmd_size allocation

Allocate scan command with dynamic size based on uCode capability
and num of channels.
This isn't an important fix as the previous allocation was always
too large as it added the scan command size but later subtracted
it (which meant it was supposed to be part of the max scan size.)

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: refactor valid channel type check
Johannes Berg [Thu, 10 May 2012 19:27:18 +0000 (21:27 +0200)]
nl80211: refactor valid channel type check

There are four instances in nl80211 of getting the
channel type from the attribute and validating it,
refactor those.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: fix cfg80211_can_beacon_sec_chan prototype
Johannes Berg [Thu, 10 May 2012 19:25:23 +0000 (21:25 +0200)]
cfg80211: fix cfg80211_can_beacon_sec_chan prototype

It should return bool, not int. The function even
does return true/false.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: prevent additions to old station flags API
Johannes Berg [Thu, 10 May 2012 18:14:43 +0000 (20:14 +0200)]
nl80211: prevent additions to old station flags API

We don't really want/need to maintain the old
station flags API any more, so refuse changes
to new (not yet defined) flags from the old
flags API.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Queue I frame fragments to the LLCP sockets queue tail
Samuel Ortiz [Thu, 10 May 2012 17:45:52 +0000 (19:45 +0200)]
NFC: Queue I frame fragments to the LLCP sockets queue tail

After testing our stack with large SNEP messages, we realized the fragments
were arriving in reversed order.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Export nfc.h to userland
Samuel Ortiz [Thu, 10 May 2012 17:45:51 +0000 (19:45 +0200)]
NFC: Export nfc.h to userland

The netlink commands and attributes, along with the socket structure
definitions need to be exported.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix network header location when adding encryption headers
Arik Nemtsov [Thu, 10 May 2012 10:21:09 +0000 (13:21 +0300)]
mac80211: fix network header location when adding encryption headers

Update the location of the network header when adding encryption
specific headers to a skb. This allows low-level drivers to use the
(now correct) location of the network header.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: (selectively) add HT details in radiotap
Johannes Berg [Thu, 10 May 2012 07:09:10 +0000 (09:09 +0200)]
mac80211: (selectively) add HT details in radiotap

Add a flag for the HT format (mixed vs. greenfield)
to allow drivers to report that on receive. Not all
drivers will do that though, so allow drivers to set
which radiotap MCS details they report.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00:Add RT539b chipset support
Zero.Lin [Thu, 10 May 2012 02:06:31 +0000 (10:06 +0800)]
rt2x00:Add RT539b chipset support

Signed-off-by: Zero.Lin <Zero.Lin@mediatek.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: add PCI IDs 0x4322 and 43222
Hauke Mehrtens [Wed, 9 May 2012 22:22:46 +0000 (00:22 +0200)]
ssb: add PCI IDs 0x4322 and 43222

The 0x4322 ID is found on the BCM4322 used on some SoCs like the
Linksys WRT610N V1 connected to a BCM4705. The 43222 (0xa8d6) ID
is found on the BCM43222 used on some other SoCs like the D-Link
DSL-2760U connected to a BCM63xx.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Add IV-room in the skb for TKIP and WEP
Janusz.Dziedzic@tieto.com [Wed, 9 May 2012 05:11:20 +0000 (08:11 +0300)]
mac80211: Add IV-room in the skb for TKIP and WEP

Add IV-room in skb also for TKIP and WEP.
Extend patch: "mac80211: support adding IV-room in the skb for CCMP keys"

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: delete IEs when stop_ap
Avinash Patil [Wed, 9 May 2012 01:30:30 +0000 (18:30 -0700)]
mwifiex: delete IEs when stop_ap

Delete custom IEs set by start_ap cfg80211 handler when stop_ap
handler is called for AP interface.
IE index required for deletion is stored in mwifiex_private
structure.

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: retrieve IEs from cfg80211_beacon_data and send to firmware
Avinash Patil [Wed, 9 May 2012 01:30:29 +0000 (18:30 -0700)]
mwifiex: retrieve IEs from cfg80211_beacon_data and send to firmware

This patch adds logic for setting tail beacon IE, probe response IE
and assoc response IE from cfg80211_ap_settings parameter of
start_ap handler into FW.

RSN IE is also retrieved from tail IE buffer and sent to firmware.

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: add custom IE framework
Avinash Patil [Wed, 9 May 2012 01:30:28 +0000 (18:30 -0700)]
mwifiex: add custom IE framework

1. support for setting custom IE from application hostapd etc.
Custom IE addition using auto-indexing and Custom IE deletion using
static indices (which are allocated during IE addition and stored in
driver) are supported.
2. Separate file for handling IE related execution.

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: rearrange AP sys configure code
Avinash Patil [Wed, 9 May 2012 01:30:27 +0000 (18:30 -0700)]
mwifiex: rearrange AP sys configure code

This patch takes into account AP config_type
(bss config/custom ie config) while preparing AP
sys_configure command buffer.

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: add WPA2 support for AP
Avinash Patil [Wed, 9 May 2012 01:30:26 +0000 (18:30 -0700)]
mwifiex: add WPA2 support for AP

1. Support for parsing security related parameters from
   cfg80211_ap_settings in start_ap cfg80211 handler
2. Conversion of these security information into FW understandle TLVs
   and setting into FW thru sys_config command
3. key management is done on host. This ensures that FW forwards EAPOL
   key packets to host instead of processing on its own.

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: add AP event handling framework
Avinash Patil [Wed, 9 May 2012 01:30:25 +0000 (18:30 -0700)]
mwifiex: add AP event handling framework

Added logic to handle AP event that are generated
by the firmware. As MLME/SME is implemented in the
firmware, events such as station association and
deauthentication, must be sent to userspace (hostapd)
for creating and deleting station database.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Powar <yogeshp@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: add cfg80211 start_ap and stop_ap handlers
Avinash Patil [Wed, 9 May 2012 01:30:24 +0000 (18:30 -0700)]
mwifiex: add cfg80211 start_ap and stop_ap handlers

1. add start AP and stop AP handlers
2. support for parsing ssid, beacon period, DTIM period
from beacon_parameters structure and setting it to FW.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: common set_wiphy_params cfg80211 handler for AP and STA interface
Avinash Patil [Wed, 9 May 2012 01:30:23 +0000 (18:30 -0700)]
mwifiex: common set_wiphy_params cfg80211 handler for AP and STA interface

Add support for setting fragmentation threshold, RTS threshold
and retry limit.
Since wiphy parameters are properties of physical device,
appropriate function to set phy parameters is invoked depending
upon bss_type(STA or AP) for each virtual interface.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: handle interface type changes correctly
Avinash Patil [Wed, 9 May 2012 01:30:22 +0000 (18:30 -0700)]
mwifiex: handle interface type changes correctly

mlan0: managed or ibss
The iftype can be changed from STATION to ADHOC, and vice versa.

uap0: AP only
The iftype cannot be changed.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: stop BSS in deauthentication handling
Avinash Patil [Wed, 9 May 2012 01:30:21 +0000 (18:30 -0700)]
mwifiex: stop BSS in deauthentication handling

While in AP mode, we should stop BSS in deauthentication handler.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: add AP command sys_config and set channel
Avinash Patil [Wed, 9 May 2012 01:30:20 +0000 (18:30 -0700)]
mwifiex: add AP command sys_config and set channel

1. support for AP sys_config command and added parsing of channel
information.
2. support for setting AP channel from cfg80211 set_channel handler

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: add bss start and bss stop commands for AP
Avinash Patil [Wed, 9 May 2012 01:30:19 +0000 (18:30 -0700)]
mwifiex: add bss start and bss stop commands for AP

1. separate file for preparing uAP command buffer
2. definition of bss_start and bss_stop commands being sent to
firmware

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: append peer mac address TLV in key material command to firmware
Avinash Patil [Wed, 9 May 2012 01:30:18 +0000 (18:30 -0700)]
mwifiex: append peer mac address TLV in key material command to firmware

Modify key related cfg80211 handlers to copy peer mac address for
pairwise keys. If peer mac address is not present or group keys,
it will be sent as broadcast mac address.
This would be required since hostapd downloads per peer PTK.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: save adapter pointer in wiphy_priv
Avinash Patil [Wed, 9 May 2012 01:30:17 +0000 (18:30 -0700)]
mwifiex: save adapter pointer in wiphy_priv

Since wiphy structure is per adapter we would save adapter,
instead of mwifiex private pointer, in wiphy_priv.
Also move country_info from mwifiex_private to mwifiex_adapter
as making it part of mwifiex_adapter looks logical.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: multi-interface support for mwifiex
Avinash Patil [Wed, 9 May 2012 01:30:16 +0000 (18:30 -0700)]
mwifiex: multi-interface support for mwifiex

mwifiex supports STA and AP interfaces which use same phy.
Indicate this to cfg80211.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: support for creation of AP interface
Avinash Patil [Wed, 9 May 2012 01:30:15 +0000 (18:30 -0700)]
mwifiex: support for creation of AP interface

1. wiphy structure is per device; hence moved it to mwifiex_adapter
mwifiex_register_cfg80211 takes mwifiex_adapter as parameter.
This function only registers wiphy with cfg80211.
2. Creation of interfaces is moved to cfg80211 add_virtual_interface
handler.
3. Create 2 interfaces by default: station and AP

Signed-off-by: Avinash Patil <patila@marvell.com>
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: handle station specific commands on STA interface only
Avinash Patil [Wed, 9 May 2012 01:30:14 +0000 (18:30 -0700)]
mwifiex: handle station specific commands on STA interface only

Commands like IBSS coalescing status, power save, 11D should be
handled only when bss_type is STA.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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: allocate space for one more mwifiex_private structure
Avinash Patil [Wed, 9 May 2012 01:30:13 +0000 (18:30 -0700)]
mwifiex: allocate space for one more mwifiex_private structure

Reserve space for one more priv structure.
This will be used by AP interface.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@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 agob43: use pci_is_pcie() instead of obsolete pci_dev.is_pcie
Bjorn Helgaas [Tue, 8 May 2012 23:27:32 +0000 (17:27 -0600)]
b43: use pci_is_pcie() instead of obsolete pci_dev.is_pcie

Use pci_is_pcie() instead of looking at obsolete is_pcie field in
struct pci_dev.

CC: Stefano Brivio <stefano.brivio@polimi.it>
CC: b43-dev@lists.infradead.org
CC: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: add warning when calculating MCS rates >= 32
Johannes Berg [Tue, 8 May 2012 19:36:20 +0000 (21:36 +0200)]
cfg80211: add warning when calculating MCS rates >= 32

cfg80211_calculate_bitrate() doesn't work for MCS
rates 32 or higher, and it has always returned 0
in that case. Warn if it ever really happens.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: remove double prototype
Johannes Berg [Tue, 8 May 2012 19:23:54 +0000 (21:23 +0200)]
cfg80211: remove double prototype

cfg80211_calculate_bitrate() is defined in the external
header file cfg80211.h now, so no need to keep it in
the internal one as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNet: wireless: core.c: fixed checkpatch warnings
Cristian Chilipirea [Tue, 8 May 2012 09:38:53 +0000 (12:38 +0300)]
Net: wireless: core.c: fixed checkpatch warnings

Fixed some checkpatch warnings.

Signed-off-by: Cristian Chilipirea <cristian.chilipirea@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix TX aggregation session timer
Johannes Berg [Mon, 7 May 2012 15:57:36 +0000 (17:57 +0200)]
mac80211: fix TX aggregation session timer

In commit 12d3952fc4a1cd96234bc7023bf7eefeb0bb6355
("mac80211: optimize aggregation session timeout handling")
two bugs were introduced:
 1) RCU usage was completely broken since no locks are held
 2) the timer must not rearm when agg session is stopping

Reported-and-tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix single queue drivers
Johannes Berg [Mon, 7 May 2012 15:45:29 +0000 (17:45 +0200)]
mac80211: fix single queue drivers

My queue management rework broke drivers that don't
have multiple AC queues and register a single queue
only, causing a warning:

WARNING: at net/mac80211/iface.c:162 ieee80211_check_queues

This was due to filling the queues wrongly and then
noticing the error when checking later.

Reported-and-Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Add flush for BCMA_RESET_CTL write
Nathan Hintz [Sat, 5 May 2012 04:56:36 +0000 (21:56 -0700)]
bcma: Add flush for BCMA_RESET_CTL write

Adds a missing read to flush the previous write (per the Broadcom SDK).

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Add __devexit to bcma_host_pci_remove
Nathan Hintz [Sat, 5 May 2012 04:56:35 +0000 (21:56 -0700)]
bcma: Add __devexit to bcma_host_pci_remove

Add missing __devexit attribute to bcma_host_pci_remove.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: reads/writes are always 4 bytes, so always map 4 bytes
Nathan Hintz [Sat, 5 May 2012 04:56:34 +0000 (21:56 -0700)]
bcma: reads/writes are always 4 bytes, so always map 4 bytes

Modify ioremap_nocache calls to reflect the number of bytes read/written.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Account for variable PCI memory base/size
Nathan Hintz [Sat, 5 May 2012 04:56:33 +0000 (21:56 -0700)]
bcma: Account for variable PCI memory base/size

PCI Memory Resource start address and size are variable, dependent on
the H/W configuration.  Modify the computation of io_map_base to use the
computed values.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Move initialization of SPROM to prevent overwrite
Nathan Hintz [Sat, 5 May 2012 04:56:32 +0000 (21:56 -0700)]
bcma: Move initialization of SPROM to prevent overwrite

The first thing bcm47xx_fill_sprom does is initialize (zero fill) the SPROM.  For
BCMA SOC, this wipes out any values previously read by bcm47xx_fill_sprom_ethernet
(see arch/mips/bcm47xx/setup.c - bcm47xx_get_sprom_bcma).  Move the initialization
of SPROM so it is called prior to filling in any values.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Find names of non BCM cores
Nathan Hintz [Sat, 5 May 2012 04:56:31 +0000 (21:56 -0700)]
bcma: Find names of non BCM cores

bcma_device_name only provides names for Broadcom cores.  Modify logic to
provide names for MIPS and ARM cores as well.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: handle non pci in ai_deviceremoved()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:43 +0000 (02:50 +0200)]
brcmsmac: handle non pci in ai_deviceremoved()

This is based on code from the Broadcom SDK.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: read PCI vendor and device id only for PCI devices
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:42 +0000 (02:50 +0200)]
brcmsmac: read PCI vendor and device id only for PCI devices

If brcmsmac is used on non PCI(s) devices it should not try to access
bus->host_pci.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: do not access host_pci
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:41 +0000 (02:50 +0200)]
brcmsmac: do not access host_pci

The irq number is copied from the PCIe host device to the bcma cores so
just request it using the bcma core device.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove nicpci.c
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:40 +0000 (02:50 +0200)]
brcmsmac: remove nicpci.c

There is no code doing anything useful in nicpci.c anymore, so remove
it.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcicore_fixcfg()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:39 +0000 (02:50 +0200)]
brcmsmac: remove pcicore_fixcfg()

This is now done in bcma by bcma_core_pci_fixcfg().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcie_extendL1timer()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:38 +0000 (02:50 +0200)]
brcmsmac: remove pcie_extendL1timer()

This is now done by calling bcma_core_pci_extend_L1time()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcicore_find_pci_capability()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:37 +0000 (02:50 +0200)]
brcmsmac: remove pcicore_find_pci_capability()

This function is now unreferenced

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcicore_attach()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:36 +0000 (02:50 +0200)]
brcmsmac: remove pcicore_attach()

This is already done by bcma in bcma_pcicore_serdes_workaround().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove _ai_clkctl_cc()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:35 +0000 (02:50 +0200)]
brcmsmac: remove _ai_clkctl_cc()

This is now done by calling bcma_core_set_clockmode()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove ai_gpiocontrol()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:34 +0000 (02:50 +0200)]
brcmsmac: remove ai_gpiocontrol()

This is now done by calling bcma_chipco_gpio_control().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove ai_chipcontrl_epa4331
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:33 +0000 (02:50 +0200)]
brcmsmac: remove ai_chipcontrl_epa4331

ai_chipcontrl_epa4331 is not referenced by any method in brcmsmac and
the functionality is already in bcma_chipco_bcm4331_ext_pa_lines_ctl in
drivers/bcma/driver_chipcommon_pmu.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove ai_pci_setup()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:32 +0000 (02:50 +0200)]
brcmsmac: remove ai_pci_setup()

This is now done by calling bcma_core_pci_irq_ctl()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove pcicore_hwup()
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:31 +0000 (02:50 +0200)]
brcmsmac: remove pcicore_hwup()

This is now done by bcma_core_pci_config_fixup() in drivers/bcma/driver_pci.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove PCIe functions needed for PCIe core rev <= 10
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:30 +0000 (02:50 +0200)]
brcmsmac: remove PCIe functions needed for PCIe core rev <= 10

The devices I know of are not using a PCIe core with rev <= 10. The
BCM4718 uses a PCIe core with revision 14 and the BCM43224 uses a PCIe
core with revision 15. This patch removes support for old PCIe core
versions, which are not found on devices supported by brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove references to PCI
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:29 +0000 (02:50 +0200)]
brcmsmac: remove references to PCI

There are no devices which are using bcma and have a PCI bus, just a
PCIe bus or something else. bcma does not support PCI devices, so lets
also remove PCI support from brcmsmac. All devices currently supported
by brcmsmac are PCIe based.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove support for cc rev < 20
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:28 +0000 (02:50 +0200)]
brcmsmac: remove support for cc rev < 20

The lowest chip common version used on bcma based devices is 31 on the
bcm4718 and 32 on the bcm4313, bcm43224, and bcm43225, so the support
for the old versions could be removed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: get board and chip info from bcma
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:27 +0000 (02:50 +0200)]
brcmsmac: get board and chip info from bcma

bcma now provide this data and brcmsmac should get it from there and
not parse it by its self.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: remove brcmsmac own sprom parsing
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:26 +0000 (02:50 +0200)]
brcmsmac: remove brcmsmac own sprom parsing

brcmsmac now takes the sprom from bcma and do not uses its own sprom
parsing any more. Remove this code as it is not used any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: use sprom from bcma
Hauke Mehrtens [Sun, 29 Apr 2012 00:50:25 +0000 (02:50 +0200)]
brcmsmac: use sprom from bcma

bcma now provides all sprom attributes needed by brcmsmac and also
parses them from the pci sprom ant otp.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add bcma_core_pci_config_fixup()
Hauke Mehrtens [Sun, 29 Apr 2012 00:18:52 +0000 (02:18 +0200)]
bcma: add bcma_core_pci_config_fixup()

This code is based on code from pcie_misc_config_fixup() in brcmsmac.
This patch is part of the move of pci specific code from brcmsmac to
bcma.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add bcma_core_pci_fixcfg()
Hauke Mehrtens [Sun, 29 Apr 2012 00:18:51 +0000 (02:18 +0200)]
bcma: add bcma_core_pci_fixcfg()

This code is based on code from pcicore_fixcfg() in brcmsmac. This
patch is part of the move of pci specific code from brcmsmac to bcma.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add bcma_core_pci_extend_L1timer
Hauke Mehrtens [Sun, 29 Apr 2012 00:18:50 +0000 (02:18 +0200)]
bcma: add bcma_core_pci_extend_L1timer

This code is based on code from pcie_extendL1timer() in brcmsmac. This
patch is part of the move of pci specific code from brcmsmac to bcma.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: implement setting core clock mode to dynamic
Hauke Mehrtens [Sun, 29 Apr 2012 00:18:49 +0000 (02:18 +0200)]
bcma: implement setting core clock mode to dynamic

This patch is based on code from _ai_clkctl_cc() in brcmsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma/ssb: parse new attributes from sprom
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:13 +0000 (02:04 +0200)]
bcma/ssb: parse new attributes from sprom

These newly added attributes are used by brcmsmac. Now bcma should
parse all attributes used by brcmsmac out of the sprom.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: read out some additional sprom attributes
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:12 +0000 (02:04 +0200)]
bcma: read out some additional sprom attributes

This code is copied from the ssb sprom read code. These attributes are
partly used by b43 and brcmsmac and should also be read out on bcma
based devices.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: fill board_rev attribute from sprom
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:11 +0000 (02:04 +0200)]
ssb: fill board_rev attribute from sprom

This attribute is now used in b43 driver and should be filled for all
sprom versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb/bcma: fill attribute alpha2 from sprom
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:10 +0000 (02:04 +0200)]
ssb/bcma: fill attribute alpha2 from sprom

The attribute country_code and alpha2 are two different attributes in
the sprom. country_code contains some code in an 8 bit coding and
alpha2 contains two chars with the country code. The attributes where
read out wrongly in the past and country_code is only available on
sprom version 1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMIPS: bcm47xx: read baordrev without prefix from sprom
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:09 +0000 (02:04 +0200)]
MIPS: bcm47xx: read baordrev without prefix from sprom

When the boardrev with a prefix is not available, try to read it
without a prefix. This is based on code from the Broadcom SDK.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add boardinfo struct
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:08 +0000 (02:04 +0200)]
bcma: add boardinfo struct

This struct contains information about the board, the chip is running
on. The struct is filled for PCIe devices and SoCs. This information is
used by b43 and will be used by brcmsmac soon.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMIPS: bcm47xx: refactor fetching board data
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:07 +0000 (02:04 +0200)]
MIPS: bcm47xx: refactor fetching board data

Now the fetching of board data also uses nvram_read_u16 and not
simple_strtoul any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: remove rev from boardinfo
Hauke Mehrtens [Sun, 29 Apr 2012 00:04:06 +0000 (02:04 +0200)]
ssb: remove rev from boardinfo

Previously the rev contained the revision read from the pci config
space and was used as board_rev in the wireless drivers. This is wrong
the board_rev is only fetched from the sprom accordingly to the open
source part of the Broadcom SDK and brcmsmac. This patch removes the
rev from the boardinfo structure and uses the board_rev attribute from
sprom instead. This attribute is filled by PCI, PCMCIA, SDIO and SoC
code.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Wed, 16 May 2012 14:57:32 +0000 (10:57 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

12 years agoBluetooth: Initialize the transmit queue for L2CAP streaming mode
Mat Martineau [Mon, 14 May 2012 21:49:27 +0000 (14:49 -0700)]
Bluetooth: Initialize the transmit queue for L2CAP streaming mode

Commit 105bdf9ec19e729bacdb33861c74fcf3eb39eb37 introduced a
regression in L2CAP streaming mode due to rearranged initialization
code that is shared between ERTM and streaming mode.  This change
makes sure the transmit queue is initialized in both modes.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>