Commit graph

249109 commits

Author SHA1 Message Date
Anderson Briglia eb492e0169 Bluetooth: Implement the first SMP commands
These simple commands will allow the SMP procedure to be started
and terminated with a not supported error. This is the first step
toward something useful.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 15:11:55 -03:00
Gustavo F. Padovan b569450682 Bluetooth: Don't forget to check for LE_LINK
Otherwise the wrong error can be returned.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 15:11:54 -03:00
Gustavo F. Padovan 1a09bcb97c Bluetooth: keep reference if any ERTM timer is enabled
ERTM use the generic L2CAP timer functions to keep a reference to the
channel. This is useful for avoiding crashes.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 14:55:33 -03:00
Gustavo F. Padovan c9b6667537 Bluetooth: Make timer functions generic
We now plan to use l2cap_set_timer and l2cap_clear_timer in ERTM timers.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 14:55:33 -03:00
Gustavo F. Padovan 71ba0e569b Bluetooth: Add refcnt to struct l2cap_chan
struct l2cap_chan has now its own refcnt that is compatible with the
socket refcnt, i.e., we won't see sk_refcnt = 0 and chan->refcnt > 0.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 14:55:33 -03:00
Gustavo F. Padovan 89bc500e41 Bluetooth: Add state tracking to struct l2cap_chan
Now socket state is tracked by struct sock and channel state is tracked by
chan->state. At this point both says the same, but this is going to change
when we add AMP Support for example.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 14:55:33 -03:00
Gustavo F. Padovan ba3bd0ee39 Bluetooth: add close() callback to l2cap_chan_ops
close() calls l2cap_sock_kill() on l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 14:55:33 -03:00
Gustavo F. Padovan 2307049422 Bluetooth: add recv() callback to l2cap_chan_ops
This abstracts the call to sock_queue_recv_skb() into
l2cap_chan_ops->recv().

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 14:55:33 -03:00
Gustavo F. Padovan 80808e431e Bluetooth: Add l2cap_chan_ops abstraction
Add an abstraction layer between L2CAP core and its users (only
l2cap_sock.c now). The first function implemented is new_connection() that
replaces calls to l2cap_sock_alloc() in l2cap_core.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 14:55:32 -03:00
Gustavo F. Padovan dc50a06dac Bluetooth: Merge l2cap_chan_create() in the l2cap_sock_alloc()
As a first step to remove l2cap_sock_alloc() and l2cap_sock_init() from
l2cap_core.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 14:55:32 -03:00
Luiz Augusto von Dentz 6fdf658c9a Bluetooth: Fix L2CAP security check
With older userspace versions (using hciops) it might not have the
key type to check if the key has sufficient security for any security
level so it is necessary to check the return of hci_conn_auth to make
sure the connection is authenticated

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-13 14:28:52 -03:00
Wey-Yi Guy b2ea345eab iwlagn: Sanity check for valid context
Check EEPROM for multiple contexts support

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:13:19 -07:00
Wey-Yi Guy 4f0642a666 iwlagn: Sanity check for 11n capability
Make sure when we say 11n enable, we really support it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:13:15 -07:00
Wey-Yi Guy 1f8bf0396a iwlagn: merge duplicated code into single place
Multiple places have similar code to construct calib header. Merge into
single inline function.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:11:13 -07:00
Wey-Yi Guy 109a0ac5d8 iwlagn: group similar defines together
No functional changes, just group similar defines together

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:10:57 -07:00
Wey-Yi Guy 8d8854d983 iwlagn: generic temperature location in EEPROM
Temperature location in EEPROM is generic to all devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:10:48 -07:00
Wey-Yi Guy bf300252ba iwlagn: remove unused debug flag
Remove both IWL_DEBUG_TXPOWER and IWL_DEBUG_NOTIF, not used.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:10:40 -07:00
Wey-Yi Guy 06bb83589c iwlagn: use IWL_DEBUG_FW for firmware related debug msg
Instead use generic IWL_DEBUG_INFO, use IWL_DEBUG_FW for uCode related stuffs.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:10:32 -07:00
Wey-Yi Guy f38f884b3b iwlagn: use IWL_DEBUG_TEMP for temperature related debug
Instead of IWL_DEBUG_POWER, IWL_DEBUG_TEMP should be used for temperature
related debug messages

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:10:25 -07:00
Wey-Yi Guy fa7f1413ed iwlagn: add debug message for coex related activities
Adding dedicated debug message for coex related activities

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:09:46 -07:00
Wey-Yi Guy ebbb491e8e iwlagn: add coex debug flag
Replace IWL_DEBUG_AP with IWL_DEBUG_COEX for debug COEX related stuffs

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:09:39 -07:00
Wey-Yi Guy 8895075886 iwlagn: use sku capabilities information from EEPROM
Instead of having the separated define, use the sku capabilities in EEPROM

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:09:28 -07:00
Wey-Yi Guy 052692976e iwlagn: Band capabilities in EEPROM
Add define for band capabilities in EEPROM

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:09:17 -07:00
Johannes Berg 872907bb17 iwlagn: don't check ucode subtype
The ucode subtypes keep changing, and there's no
particular reason to be checking them (other than
a paranoid sanity check). Since the numbers are
also in conflict between different ucode images
now, simply don't check them any more and rely on
the images being built correctly.

Also, to indicate that, rename the constants and
the enum, moving it to a different file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:09:09 -07:00
Wey-Yi Guy 3f1e5f4a2b iwlagn: move no_sleep_autoadjust as part of iwlagn_mod_params
Move no_sleep_autoadjust module parameter into iwlagn_mod_params structure
along with all the other iwlagn module parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:08:52 -07:00
Wey-Yi Guy 6b0184c4c6 iwlagn: move led_mode as part of iwlagn_mod_params
Move led_mode module parameter into iwlagn_mod_params structure
along with all the other iwlagn module parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:08:46 -07:00
Wey-Yi Guy b60eec9bf0 iwlagn: move bt_coex_active as part of iwlagn_mod_params
Move bt_coex_active module parameter into iwlagn_mod_params structure
along with all the other iwlagn module parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:08:39 -07:00
Wey-Yi Guy eb64dca0c9 iwlagn: add dumpit support for testmode trace function
For testmode trace function, huge amout of data need to pass to userspace.
Use the build-in nl80211 dumpt it function

Require nl80211 testmode dumpit support patch.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:08:23 -07:00
Wey-Yi Guy 49b7210016 iwlagn: usersapce application decide the size of trace buffer
For testmode trace function, allow userspace application to request the
size of trace buffer.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-11 07:08:12 -07:00
Larry Finger 7101f4043c rtlwifi: Fix warnings on parisc arch
In "Build regressions/improvements in v3.0-rc2", Geert Uytterhoeven
reports a number of warnings that occur for parisc builds of rtlwifi
and dependents.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:54 -04:00
Arend van Spriel e3ae0cac00 drivers: bcma: export bcma_core_disable() function
In the brcm80211 driver we disable the 80211 core when the driver is
'down'. The bcma_core_disable() function exactly does the same as
our implementation so exporting this function makes sense.

Cc: linux-wireless@vger.kernel.org
Cc: Rafal Milecki <zajec5@gmail.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:53 -04:00
Dan Carpenter 5b49b35a67 b43: check for allocation failures
Add some error handling if the allocation fails.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:53 -04:00
Amitkumar Karwar 287546df34 mwifiex: get rid of global adapter pointer
1) Avoid global adapter pointer usage
   a) in sdio.c by moving some code from mwifiex_cleanup_module() to
      mwifiex_sdio_remove().
   b) in main.c by passing an extra parameter to few functions.
2) Add new variable "user_rmmod" to identify if mwifiex_sdio_remove()
   callback function is called in card removal or rmmod context. These
   code changes are adapted from Libertas driver.
3) Remove unnecessary NULL pointer check for "func" pointer in
   mwifiex_sdio_remove().

Signed-off-by: Amitkumar Karwar <akarwar@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>
2011-06-10 14:57:52 -04:00
Stanislaw Gruszka 7f1f974251 iwlegacy: refactor iwl4965_mac_channel_switch
Use less indentions and remove uneeded irq-save flags.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:51 -04:00
Stanislaw Gruszka 0d01550f3d iwlegacy: remove unused agg_tids_count
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:51 -04:00
Stanislaw Gruszka 1ba2f121f9 iwlegacy: remove firmware event log
Messages like that

iwl4965 0000:03:00.0: Start IWL Event Log Dump: display last 20 entries
iwl4965 0000:03:00.0: EVT_LOGT:1821445332:0x00000000:1352
iwl4965 0000:03:00.0: EVT_LOGT:1821445332:0x00000001:1353
iwl4965 0000:03:00.0: EVT_LOGT:1821445336:0x0000000c:0357
iwl4965 0000:03:00.0: EVT_LOGT:1821445533:0x00000107:0106
iwl4965 0000:03:00.0: EVT_LOGT:1821445534:0x00000000:0302
iwl4965 0000:03:00.0: EVT_LOGT:1821445574:0x000000d4:0321
iwl4965 0000:03:00.0: EVT_LOGT:1821445575:0x00000000:1350
iwl4965 0000:03:00.0: EVT_LOGT:1821445576:0x00000000:1351
iwl4965 0000:03:00.0: EVT_LOGT:1821445576:0x00000000:1352
iwl4965 0000:03:00.0: EVT_LOGT:1821445577:0x00000001:1353
iwl4965 0000:03:00.0: EVT_LOGT:1821445581:0x0000000d:0357
iwl4965 0000:03:00.0: EVT_LOGT:1821446327:0x00000107:0106
iwl4965 0000:03:00.0: EVT_LOGT:1821446328:0x00000000:0302
iwl4965 0000:03:00.0: EVT_LOGT:1821446368:0x000000d4:0321
iwl4965 0000:03:00.0: EVT_LOGT:1821446369:0x00000000:1350
iwl4965 0000:03:00.0: EVT_LOGT:1821446370:0x00000000:1351
iwl4965 0000:03:00.0: EVT_LOGT:1821446370:0x00000000:1352
iwl4965 0000:03:00.0: EVT_LOGT:1821446371:0x00000001:1353
iwl4965 0000:03:00.0: EVT_LOGT:1821446375:0x0000000e:0357
iwl4965 0000:03:00.0: EVT_LOGT:1821446383:0x00000000:0125

are completely useless for me. Remove bunch of code that generate them.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:50 -04:00
Stanislaw Gruszka dd6d2a8aef iwlegacy: remove reset rf infrastructure
We do not reset radio anymore, hence don't need that code too.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:49 -04:00
Stanislaw Gruszka ecaee0ff07 iwlegacy: remove recover from statistics
Recover from statistics code was added during 6xxx devices development,
I don't think is needed on old devices. Also it is suspicious to cause
random, unreproducible microcode errors and hangs. So remove it.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:49 -04:00
Stanislaw Gruszka 3c09b174da iwlegacy: remove unused power commands defines
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:48 -04:00
Daniel Drake 9a821f5d0f libertas: add sd8686 reset_card support
At http://dev.laptop.org/ticket/10748 we are seeing a case of the
libertas firmware randomly stopping responding to commands after
resume. Careful monitoring of communications indicates a firmware or
hardware bug, which has been reported to Marvell.

Work around this issue by adding a reset_card method; this is
automatically called when command timeouts are detected and provides an
instant recovery to this situation.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:57:47 -04:00
Vincent Zweije 43a1c2721a networking: fix warning about unused label wake_up
Function ieee80211_reconfig in net/mac80211/util.c contains label wake_up
which is defined unconditionally, but only used with CONFIG_PM. Gcc
warns about this when CONFIG_PM is not defined.

This patch makes the label's definition dependent on CONFIG_PM too,
eliminating the warning.

The issue was apparently introduced in git commit
eecc48000a.

Signed-off-by: Vincent Zweije <vincent@zweije.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:51 -04:00
Paul Stewart 323222b5ff cfg80211: Ignore downstream DEAUTH for authtry_bsses
Downsteram DEAUTH messages do not refer to a current authentication
attempt -- AUTH responses do.  Therefore we should not allow DEAUTH
from an AP to void state for an AUTH attempt in progress.

Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:51 -04:00
Mike McCormack fd854772c1 rtlwifi: Factor out code to receive one packet
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:51 -04:00
Mike McCormack 14058adddd rtlwifi: Free skb in one place
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:51 -04:00
Mike McCormack 8db8ddf13d rtlwifi: Resubmit skbs with bad CRC early
Once we realize a bad packet was received, don't
waste time unmapping it, freeing it, then allocation
a new skb and mapping it, just resubmit the existing
skb.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:50 -04:00
Mike McCormack 2c333366a4 rtlwifi: Remove unnecessary indent
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:50 -04:00
Eliad Peller 1d34d108e0 mac80211: add ieee80211_get_operstate() function
Add ieee80211_get_operstate() function to get the operstate
of the netdevice.

This is needed for drivers that need to know when the interface
is IF_OPER_UP (e.g. wl12xx), and block notifiers can't be used
(e.g. because the interface is already IF_OPER_UP, like after
resuming from suspend)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-10 14:26:50 -04:00
John W. Linville c48b1f729a Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
	drivers/net/wireless/rtlwifi/pci.c
2011-06-10 14:26:12 -04:00
Ville Tervo 7f4f0572df Bluetooth: Do not send SET_EVENT_MASK for 1.1 and earlier devices
Some old hci controllers do not accept any mask so leave the
default mask on for these devices.

< HCI Command: Set Event Mask (0x03|0x0001) plen 8
    Mask: 0xfffffbff00000000
> HCI Event: Command Complete (0x0e) plen 4
    Set Event Mask (0x03|0x0001) ncmd 1
    status 0x12
    Error: Invalid HCI Command Parameters

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Tested-by: Corey Boyle <corey@kansanian.com>
Tested-by: Ed Tomlinson <edt@aei.ca>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-10 15:04:42 -03:00
David Miller 26e7acf315 Bluetooth: Do not ignore errors returned from strict_strtol()
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-10 15:04:41 -03:00