Wey-Yi Guy [Mon, 11 Jul 2011 17:47:39 +0000 (10:47 -0700)]
iwlagn: fix warning in testmode attribute table
Fix the compile warning cause by [IWL_TM_ATTR_MAX - 1]
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Mon, 11 Jul 2011 14:44:14 +0000 (20:14 +0530)]
ath9k: remove an unnecessary function declaration
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eduardo Bacchi Kienetz [Sun, 10 Jul 2011 15:05:14 +0000 (17:05 +0200)]
rt2800usb: Add new device ID for Belkin
Belkin's Connect N150 Wireless USB Adapter, model
F7D1101 version 2, uses ID 0x945b.
Chipset info: rt: 3390, rf: 000b, rev: 3213.
I have just bought one, which started to work perfectly after the ID was added through this patch.
Signed-off-by: Eduardo Bacchi Kienetz <eduardo@kienetz.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Sun, 10 Jul 2011 09:28:26 +0000 (02:28 -0700)]
ath5k: Add missing breaks in switch/case
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Sat, 9 Jul 2011 18:15:58 +0000 (13:15 -0500)]
rtlwifi: rtl8192cu: Fix duplicate if test
A typo causes routine rtl92cu_phy_rf6052_set_cck_txpower() to test the
same condition twice. The problem was found using cppcheck-1.49, and the
proper fix was verified against the pre-mac80211 version of the code.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@kernel.org> [back to 2.6.39]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Sat, 9 Jul 2011 14:41:25 +0000 (15:41 +0100)]
libertas: fix handling of command timeout, completion and interruption
When commands time out, corruption ensues. As lbs_complete_command()
is called without locking, the command node is mistakenly freed twice.
Also fixed up locking here in a few other places.
The nature of command timeout may be that the card didn't even
acknowledge receipt of the request. Detect this case and reset dnld_sent
so that other commands don't hang forever.
When cmdnodes are moved between the free list and the pending list,
their list heads should be reinitialized. Fixed this.
Sometimes commands are completed without actually submitting them or
removing them from cmdpendingq. We must remember to remove them from
cmdpendingq in these cases, so handle this in lbs_complete_command().
Harmless signals generated during suspend/resume were interrupting
lbs_cmd. Convert to an uninterruptible sleep to avoid this.
lbs_thread must be woken up every time there is some new work to do.
I found that when 2 commands are queued, ther completion of the first
command would not wake up lbs_thread to submit the second. Poke lbs_thread
at the end of lbs_complete_command() to fix this.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 9 Jul 2011 13:39:16 +0000 (15:39 +0200)]
mac80211: allocate only one RX queue
We don't have multiple RX queues, so there's no use
in allocating multiple, use alloc_netdev_mqs() to
allocate multiple TX but only one RX queue.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 9 Jul 2011 12:48:31 +0000 (14:48 +0200)]
mac80211: fix docbook
I changed the TKIP key functions, but forgot to
update the documentation includes, fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 9 Jul 2011 12:48:30 +0000 (14:48 +0200)]
cfg80211: fix docbook
Looks like I forgot to document the "gfp" parameter
to cfg80211_gtk_rekey_notify, add it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Sat, 9 Jul 2011 11:22:03 +0000 (13:22 +0200)]
bcma: add check if sprom is available before accessing it.
The SoCs like the bcm4716 do not have a sprom on the bcma bus like a
pcie device. It stores the values in some partition on flash memory.
For ssb this informations are read out in the bcm47xx arch code,
something like that should also be implemented for bcma. Without this
patch bcma panics on SoCs.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Olivier Sobrie [Sat, 9 Jul 2011 10:57:05 +0000 (12:57 +0200)]
libertas: fix errors in functions accessing module registers
Problems located in the two functions lbs_set_reg() and lbs_get_reg():
- The offset field of struct cmd_ds_reg_access was not filled in
- The test on the return code of lbs_cmd_with_response() in function
lbs_get_reg() was inverted
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Sat, 9 Jul 2011 04:17:51 +0000 (00:17 -0400)]
ath5k: fix typos, bad comment formatting and GHz in place of MHz
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Sat, 9 Jul 2011 04:17:45 +0000 (00:17 -0400)]
ath5k: validate mode in ath5k_ani_init() before trying to set it
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 9 Jul 2011 04:12:54 +0000 (11:12 +0700)]
ath9k_hw: add a missing delay for an analog register
AR_AN_SYNTH9 is in the analog shift register range and thus needs to be
written using the ath9k_hw_analog_shift_rmw function.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 9 Jul 2011 04:12:53 +0000 (11:12 +0700)]
ath9k_hw: fix synth delay for half/quarter channels
The radio needs twice / four times as much time to stabilize for half/quarter
channels.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 9 Jul 2011 04:12:52 +0000 (11:12 +0700)]
ath9k_hw: set 5 GHz half/quarter channels on AR9002 using fractional mode
The radio seems to perform better that way
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 9 Jul 2011 04:12:51 +0000 (11:12 +0700)]
ath9k_hw: remove ar9287 v1.3+ specific hardcoded register hacks
Now that the clock rate is initialized properly and SIFS, EIFS, USEC,
slot time and ACK timeout are properly calculated by the generic code,
the 'async FIFO' register hacks are no longer necessary.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 9 Jul 2011 04:12:50 +0000 (11:12 +0700)]
ath9k_hw: initialize more timing related registers for half/quarter channels
Initialize the the clock-to-TSF field of AR_USEC and the SIFS and EIFS time
registers based on the clock rate instead of relying on initvals.
With those changes, some of the hardcoded AR9287 1.3+ specific overrides
can be dropped.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 9 Jul 2011 04:12:49 +0000 (11:12 +0700)]
ath9k_hw: fix MAC clock rate for AR9287 v1.3+
This chip uses the async FIFO feature and runs the MAC at 117 MHz
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 9 Jul 2011 04:12:48 +0000 (11:12 +0700)]
ath9k_hw: fix MAC clock for half/quarter rate
Enabling half/quarter rate makes the MAC run at half/quarter clock speed.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 9 Jul 2011 04:12:47 +0000 (11:12 +0700)]
ath9k_hw: always enable 5 GHz fast clock for AR9280
All devices support this, but some disable it using an EEPROM flag
for some reason. Improves 5 GHz performance on those devices.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 9 Jul 2011 04:12:46 +0000 (11:12 +0700)]
ath9k_hw: remove hardcoded PLL overrides for AR9280
Use the proper masks for the register instead.
Fixes adding the (still unused) half/quarter PLL flags.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Sat, 9 Jul 2011 03:40:30 +0000 (20:40 -0700)]
mwifiex: 11n specific configuration for transmit
Currently device is not able to transmit in 40MHz in spite of
enabling 40MHz support in HTCapInfo IE in assoc req, because
11n specific FW capabilities for transmission are not initialized.
This patch adds code to initilize these capabilities.
Signed-off-by: Amitkumar Karwar <akarwar@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>
Don Fry [Fri, 8 Jul 2011 15:46:29 +0000 (08:46 -0700)]
iwlagn: remove iwlagn_hcmd_utils structure and call directly
Not needed since the driver split. Move single use routines to
calling location and keep static where possible.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:28 +0000 (08:46 -0700)]
iwlagn: separate and enhance the fixed rate from
For testing purpose, we need better control of msc from user application.
Separate the fixed_rate between debugfs and testmode and enforce it.
Signed-off-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:27 +0000 (08:46 -0700)]
iwlagn: block regular host commands if driver don't own uCode
The only host command allow to send to uCode is the one initiated from
testmode if testmode is the owner of uCode
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:26 +0000 (08:46 -0700)]
iwlagn: allow application own the uCode operation
Since we open the door to allow application control the device behavior through
testmode, add command to allow application request the ownership of the uCode
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:25 +0000 (08:46 -0700)]
iwlagn: add CMD_ON_DEMAND flag for host command from testmode
For all the hist command request from testmode, set the CMD_ON_DEMAND flag.
this flag will be used later to control the uCode behavior
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:24 +0000 (08:46 -0700)]
iwlagn: declare static
Declare iwl_mac_rssi_callback as "static"
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Meenakshi Venkataraman [Fri, 8 Jul 2011 15:46:23 +0000 (08:46 -0700)]
iwlagn: Enable/disable PS poll based on RSSI and BT coex traffic state
WiFi throughput drops drastically when BT is turned on, BT and WiFi
are simultaneously transmitting/receiving traffic. This is particularly true
when BT has higher priority over WiFi, and hence the device defers TX frames.
The AP assumes that the channel is bad and reduces the data rate, implying
longer airtime, which exacerbates the problem further, resulting ultimately
in what is popularly called the "death-spiral" phenomenon. The use of PS-poll
in such scenarios guarantees a low but consistent throughput.
Since the death-spiral phenomenon is observed only when the RSSI is low, use
PS-poll only when RSSI is low and disable when high, with a known hysterisis.
This feature specifies the high and low thresholds and implements the
callbacks registered with mac80211, which will be called when threshold events
occur.
iwlwifi: dynamic pspoll: optimize rssi monitor code
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Meenakshi Venkataraman [Fri, 8 Jul 2011 15:46:22 +0000 (08:46 -0700)]
mac80211: add driver RSSI threshold events
mac80211 maintains a running average of the RSSI when a STA
is associated to an AP. Report threshold events to any driver
that has registered callbacks for getting RSSI measurements.
Implement callbacks in mac80211 so that driver can set thresholds.
Add callbacks in mac80211 which is invoked when an RSSI threshold
event occurs.
mac80211: add tracing to rssi_reports api and remove extraneous fn argument
mac80211: scale up rssi thresholds from driver by 16 before storing
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:21 +0000 (08:46 -0700)]
iwlagn: use bt handler for 2030 and 135 series devices
For bt combo devices, need to use bt enabled handlers and functions
Reported-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:20 +0000 (08:46 -0700)]
iwlagn: remove double level temperature indirect call
No need to do double level indirect call after driver split
no functional changes
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fry, Donald H [Fri, 8 Jul 2011 15:46:19 +0000 (08:46 -0700)]
iwlagn: remove indirection for eeprom_query_addr
Not needed since the driver split. Eliminate redundant routine.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fry, Donald H [Fri, 8 Jul 2011 15:46:18 +0000 (08:46 -0700)]
iwlagn: remove the indirection for iwl_apm_init
Not needed since the driver split.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fry, Donald H [Fri, 8 Jul 2011 15:46:17 +0000 (08:46 -0700)]
iwlagn: remove the indirection for update_chain_flags
Not needed since the driver split.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:16 +0000 (08:46 -0700)]
iwlagn: provide heplers to access the transport ops
This removes the for priv->trans.ops->...
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:15 +0000 (08:46 -0700)]
iwlagn: remove the indirection for the dma channel num
Not needed since the driver split.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:14 +0000 (08:46 -0700)]
iwlagn: consolidate the API that sends host commands and move to transport
Now, there are only two functions to send a host command:
* send_cmd that receives a iwl_host_cmd
* send_cmd_pdu that builds the iwl_host_cmd itself and received flags
The flags CMD_ASYNC / CMD_SYNC / CMD_WANT_SKB are not changed by the API
functions.
Kill the unused flags CMD_SIZE_NORMAL / CMD_NO_SKB on the way.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:13 +0000 (08:46 -0700)]
iwlagn: remove code duplication
Code duplication was needed during the move, not needed any more.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:12 +0000 (08:46 -0700)]
iwlagn: add an API for TX stop
Tx stop moves to transport layer.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:11 +0000 (08:46 -0700)]
iwlagn: add an API for RX stop
Rx stop moves to transport layer.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:10 +0000 (08:46 -0700)]
iwlagn: add an API to free the TX context
Tx free functions move to the transport layer. Unify the functions that deal with tx queues and cmd queue.
Since the CMD queue is not fully allocated, but uses the q->n_bd / q->window trick, the release flow of TX queue and CMD queue was different.
iwlagn_txq_free_tfd receives now the index of the TFD to be freed, which allows to unify the release flow for all the queues.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:09 +0000 (08:46 -0700)]
iwlagn: remove the CMD_MAPPED flag
It is uneeded since Johannes removed the HUGE flag. The DMA mapping is always held in the same index as the command.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 11 Jul 2011 18:58:22 +0000 (14:58 -0400)]
Merge branch 'master' of /linux/kernel/git/padovan/bluetooth-next-2.6
Conflicts:
net/bluetooth/l2cap_core.c
John W. Linville [Mon, 11 Jul 2011 18:46:59 +0000 (14:46 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Conflicts:
drivers/net/wireless/ath/ath5k/sysfs.c
net/bluetooth/l2cap_core.c
net/mac80211/wpa.c
Ilia Kolomisnky [Sun, 10 Jul 2011 05:47:44 +0000 (08:47 +0300)]
Bluetooth: Fixes l2cap "command reject" reply according to spec
There can 3 reasons for the "command reject" reply produced
by the stack. Each such reply should be accompanied by the
relevand data ( as defined in spec. ). Currently there is one
instance of "command reject" reply with reason "invalid cid"
wich is fixed. Also, added clean-up definitions related to the
"command reject" replies.
Signed-off-by: Ilia Kolomisnky <iliak@ti.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Fri, 8 Jul 2011 21:31:46 +0000 (18:31 -0300)]
Bluetooth: Add support for returning the encryption key size
This will be useful when userspace wants to restrict some kinds of
operations based on the length of the key size used to encrypt the
link.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Fri, 8 Jul 2011 21:31:45 +0000 (18:31 -0300)]
Bluetooth: Add support for storing the key size
In some cases it will be useful having the key size used for
encrypting the link. For example, some profiles may restrict
some operations depending on the key length.
The key size is stored in the key that is passed to userspace
using the pin_length field in the key structure.
For now this field is only valid for LE controllers. 3.0+HS
controllers define the Read Encryption Key Size command, this
field is intended for storing the value returned by that
command.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Fri, 8 Jul 2011 21:31:44 +0000 (18:31 -0300)]
Bluetooth: Add support for communicating keys with userspace
As the key format has changed to something that has a dynamic size,
the way that keys are received and sent must be changed.
The structure fields order is changed to make the parsing of the
information received from the Management Interface easier.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:42 +0000 (18:59 -0300)]
Bluetooth: Remove unused field in hci_conn
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:41 +0000 (18:59 -0300)]
Bluetooth: Use the stored LTK for restabilishing security
Now that it's possible that the exchanged key is present in
the link key list, we may be able to estabilish security with
an already existing key, without need to perform any SMP
procedure.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:40 +0000 (18:59 -0300)]
Bluetooth: Use the link key list to temporarily store the STK
With this we can use only one place to store all keys, without
need to use a field in the connection structure for this
purpose.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:39 +0000 (18:59 -0300)]
Bluetooth: Add support for storing the LTK
Now when the LTK is received from the remote or generated it is stored,
so it can later be used.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:38 +0000 (18:59 -0300)]
Bluetooth: Fix SM pairing parameters negotiation
Before implementing SM key distribution, the pairing features
exchange must be better negotiated, taking into account some
features of the host and connection requirements.
If we are in the "not pairable" state, it makes no sense to
exchange any key. This allows for simplification of the key
negociation method.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:37 +0000 (18:59 -0300)]
Bluetooth: Reject an encryption request when the key isn't found
Now that we have methods to finding keys by its parameters we can
reject an encryption request if the key isn't found.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:36 +0000 (18:59 -0300)]
Bluetooth: Add functions to manipulate the link key list for SMP
As the LTK (the new type of key being handled now) has more data
associated with it, we need to store this extra data and retrieve
the keys based on that data.
Methods for searching for a key and for adding a new LTK are
introduced here.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:35 +0000 (18:59 -0300)]
Bluetooth: Add new structures for supporting SM key distribution
We need these changes because SMP keys may have more information
associated with them, for example, in the LTK case, it has an
encrypted diversifier (ediv) and a random number (rand).
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vinicius Costa Gomes [Thu, 7 Jul 2011 21:59:34 +0000 (18:59 -0300)]
Bluetooth: Add support for SMP phase 3 (key distribution)
This adds support for generating and distributing all the keys
specified in the third phase of SMP.
This will make possible to re-establish secure connections, resolve
private addresses and sign commands.
For now, the values generated are random.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Rajkumar Manoharan [Fri, 8 Jul 2011 12:42:03 +0000 (18:12 +0530)]
ath9k_htc: Inform stack about tx ack status
Recent firmware changes report tx ack status properly
to driver. Hence updating ath9k_htc driver capabilities.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 8 Jul 2011 12:42:02 +0000 (18:12 +0530)]
ath9k_hw: Remove read-only registers from AR9003 intervals
This patch removes read only registers that cause invalid
address access and also updates index for measurement filter
calibration window size.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 8 Jul 2011 12:42:01 +0000 (18:12 +0530)]
ath9k_hw: Disable power detector calibration for AR9003
The power detector calibration is disabled because this block
doesn't exist in AR9003 based chips and also parallel
calibration is enabled otherwise the calibration will never stop.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 8 Jul 2011 12:42:00 +0000 (18:12 +0530)]
ath9k_hw: Update AR9003 interval to improve 5G Tx EVM
The number of temperature reading samples to average
during a Tx packet is decreased to 1 from 2 to improve
5G Tx EVM with chain 0-only mode.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 8 Jul 2011 08:16:16 +0000 (11:16 +0300)]
cfg80211: return -ENOENT when stopping sched_scan while not running
If we try to stop a scheduled scan while it is not running, we should
return -ENOENT instead of simply ignoring the command and returning
success. This is more consistent with other parts of the code.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 8 Jul 2011 07:31:32 +0000 (13:01 +0530)]
ath9k_hw: Disable PAPRD based on paprd_ht20_mask for 5GHz
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yogesh Ashok Powar [Fri, 8 Jul 2011 00:37:09 +0000 (17:37 -0700)]
mwifiex: 4-byte alignment in mwifiex_process_sta_txpd()
In XMIT path, the skb that we get from the kernel itself is not
aligned with 4-byte boundary on some embedded platforms.
Had it not been the presence of tx_pkt_offset field in txpd, 4 byte
memory alignment was not possible without memmove of entire skb.
And that would have increased MIPS instead of reducing.
With this patch few memory cycles can be saved while fetching
interface header and txpd structure because of 4 bytes memory
alignment.
Reported-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Tested-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 8 Jul 2011 00:33:20 +0000 (17:33 -0700)]
mwifiex: fix minor issue in debugfs command 'info'
Debugfs command 'info' shows wrong interface type. The regression
occurred due to commit
eecd8250e (mwifiex: remove MWIFIEX_BSS_MODE_
macros) in which we replaced MWIFIEX_BSS_MODE_* macros by
NL80211_IFTYPE_*, for example,
MWIFIEX_BSS_MODE_IBSS (2) --> NL80211_IFTYPE_ADHOC (1)
The issue is fixed by swapping static character array used to
display interface type information.
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>
Amitkumar Karwar [Fri, 8 Jul 2011 00:33:19 +0000 (17:33 -0700)]
mwifiex: fix regression in WEP security mode
Htcapinfo is unnecessarily sent in assoc request in WEP security due
to a regression introduced by commit
2be50b8df53 (mwifiex: remove
redundant encryption_mode mapping).
The issue is fixed in this patch.
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>
Pavel Roskin [Thu, 7 Jul 2011 22:14:25 +0000 (18:14 -0400)]
ath5k: read sc->imask with sc->irqlock held
Signed-off-by: Pavel Roskin <proski@gnu.org>
sc->imask may change if ath5k_set_current_imask() races against itself.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:14:19 +0000 (18:14 -0400)]
ath5k: use kstrtoint() to parse numbers coming from sysfs
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:14:13 +0000 (18:14 -0400)]
ath5k: fix formatting errors found by checkpatch.pl
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:14:07 +0000 (18:14 -0400)]
ath5k: fix misplaced or extraneous braces found by checkpatch.pl
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:14:01 +0000 (18:14 -0400)]
ath5k: use parentheses around macro definitions
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:13:55 +0000 (18:13 -0400)]
ath5k: don't use volatile, it's not needed
Signed-off-by: Pavel Roskin <proski@gnu.org>
The reg variable is only used by __raw_writel() and __raw_readl(), which
should guarantee memory access in the right order.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:13:48 +0000 (18:13 -0400)]
ath5k: use more readable way to clear MAC address
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:13:42 +0000 (18:13 -0400)]
ath5k: use DEFINE_PCI_DEVICE_TABLE in led.c, mark users with __devinit
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:13:36 +0000 (18:13 -0400)]
ath5k: use KERN_WARNING in ATH5K_PRINTF
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:13:30 +0000 (18:13 -0400)]
ath5k: remove unneeded parentheses after return
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:13:24 +0000 (18:13 -0400)]
ath5k: replace spaces with tabs as suggested by checkpatch.pl
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 7 Jul 2011 22:13:17 +0000 (18:13 -0400)]
ath5k: remove PRIV_ENTRY and PRIV_ASSIGN macros, they obfuscate the code
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Thu, 7 Jul 2011 21:01:25 +0000 (23:01 +0200)]
carl9170: Implement tx_frames_pending mac80211 callback function
Implementing this callback function will cause mac80211 refrain from
going to powersave state when there are still untransmitted TX frames
in the queues.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sebastian Andrzej Siewior [Thu, 7 Jul 2011 19:58:10 +0000 (21:58 +0200)]
net/b43: don't return IRQ_HANDLED if nothing was done
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 7 Jul 2011 18:06:56 +0000 (20:06 +0200)]
b43: HT-PHY: define dummy TX power functions
Without them we get Oops with NULL pointer
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Thu, 7 Jul 2011 18:03:39 +0000 (23:33 +0530)]
mac80211: Restart STA timers only on associated state
A panic was observed when the device is failed to resume properly,
and there are no running interfaces. ieee80211_reconfig tries
to restart STA timers on unassociated state.
Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Thu, 7 Jul 2011 18:03:38 +0000 (23:33 +0530)]
ath9k_htc: do not configure filter before driver is started
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 7 Jul 2011 16:58:25 +0000 (18:58 +0200)]
b43: LCN-PHY: include new PHY in common code
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 7 Jul 2011 16:58:24 +0000 (18:58 +0200)]
b43: define firmwares for HT and LCN PHYs
We were uploading different firmwares to the hardware until finding
responding one.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 7 Jul 2011 16:58:01 +0000 (18:58 +0200)]
mac80211: allow driver to generate P1K for IV32
In order to support pre-populating the P1K cache in
iwlwifi hardware for WoWLAN, we need to calculate
the P1K for the current IV32. Allow drivers to get
the P1K for any given IV32 instead of for a given
packet, but keep the packet-based version around as
an inline.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 7 Jul 2011 16:58:00 +0000 (18:58 +0200)]
mac80211: allow drivers to access key sequence counter
In order to implement GTK rekeying, the device needs
to be able to encrypt frames with the right PN/IV and
check the PN/IV in RX frames. To be able to tell it
about all those counters, we need to be able to get
them from mac80211, this adds the required API.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 7 Jul 2011 16:45:03 +0000 (18:45 +0200)]
mac80211: simplify RX PN/IV handling
The current rx->queue value is slightly confusing.
It is set to 16 on non-QoS frames, including data,
and then used for sequence number and PN/IV checks.
Until recently, we had a TKIP IV checking bug that
had been introduced in 2008 to fix a seqno issue.
Before that, we always used TID 0 for checking the
PN or IV on non-QoS packets.
Go back to the old status for PN/IV checks using
the TID 0 counter for non-QoS by splitting up the
rx->queue value into "seqno_idx" and "security_idx"
in order to avoid confusion in the future. They
each have special rules on the value used for non-
QoS data frames.
Since the handling is now unified, also revert the
special TKIP handling from my patch
"mac80211: fix TKIP replay vulnerability".
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 7 Jul 2011 13:25:27 +0000 (15:25 +0200)]
b43: LCN-PHY add place for new PHY support
LCN-PHY was found in 14e4:4727 card. It uses LCN/1 and 0x2064/1 radio.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 6 Jul 2011 20:02:14 +0000 (22:02 +0200)]
mac80211: use AES_BLOCK_SIZE
mac80211 has a defnition of AES_BLOCK_SIZE and
multiple definitions of AES_BLOCK_LEN. Remove
them all and use crypto/aes.h.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 6 Jul 2011 18:27:25 +0000 (20:27 +0200)]
b43: read radio ID on new cores
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 6 Jul 2011 18:27:24 +0000 (20:27 +0200)]
b43: use radio ID reading code to older cores only
Newer ones need separated way
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 6 Jul 2011 16:05:14 +0000 (18:05 +0200)]
b43: select BLOCKIO for BCMA
We want PIO as fallback for BCMA as well.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 6 Jul 2011 15:41:55 +0000 (17:41 +0200)]
b43: change selecting ucode for newer cores
Older cores had unique PHY. This is not true anymore for newer ones.
For example core rev 16 can be LP, SSLPN or N (PHY).
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 6 Jul 2011 13:45:28 +0000 (15:45 +0200)]
b43: bus: add helpers for getting/setting wldev from/in bus core
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 6 Jul 2011 13:45:27 +0000 (15:45 +0200)]
b43: handle BCMA in bus switches
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 6 Jul 2011 13:45:26 +0000 (15:45 +0200)]
b43: use switches for SSB specific code
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 6 Jul 2011 20:00:35 +0000 (22:00 +0200)]
mac80211: fix CMAC races
Just like TKIP and CCMP, CMAC has the PN race.
It might not actually be possible to hit it now
since there aren't multiple ACs for management
frames, but fix it anyway.
Also move scratch buffers onto the stack.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>