GitHub/moto-9609/android_kernel_motorola_exynos9610.git
12 years agoath9k: use ath9k_hw_update_regulatory_maxpower in ath9k_hw_def_set_txpower
Gabor Juhos [Sat, 14 Apr 2012 18:35:19 +0000 (20:35 +0200)]
ath9k: use ath9k_hw_update_regulatory_maxpower in ath9k_hw_def_set_txpower

We have a helper function for updating the max_power_level
value. Use that and remove the duplicated code.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonet/wireless: use module_pci_driver
Axel Lin [Sat, 14 Apr 2012 02:38:36 +0000 (10:38 +0800)]
net/wireless: use module_pci_driver

This patch converts the drivers in drivers/net/wireless/* to use
module_pci_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: Simon Kelley <simon@thekelleys.org.uk>
Cc: Jouni Malinen <j@w1.fi>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: linux-wireless@vger.kernel.org
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: add function retrieve average rssi
Wey-Yi Guy [Fri, 13 Apr 2012 19:02:57 +0000 (12:02 -0700)]
mac80211: add function retrieve average rssi

Add utility function to provide the average rssi per vif

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192ce: Remove false positives for kmemleak
Larry Finger [Fri, 13 Apr 2012 18:57:43 +0000 (13:57 -0500)]
rtlwifi: rtl8192ce: Remove false positives for kmemleak

When rtl8192ce is in operation, kmemleak indicates a number of leaks, yet
when the driver is removed all are gone. These false positives happen
in two locations:

unreferenced object 0xffff880041124000 (size 9536):
  comm "work_for_cpu", pid 9295, jiffies 4295037203 (age 20596.320s)
  hex dump (first 32 bytes):
    33 00 00 01 01 6d 00 00 00 00 b1 0e 21 0b 00 00  3....m......!...
    01 01 6d 00 00 00 00 8b 20 c0 e9 00 00 01 01 6d  ..m..... ......m
  backtrace:
    [<ffffffff8137a1b1>] kmemleak_alloc+0x21/0x50
    [<ffffffff8138d01f>] kmalloc_large_node+0x9a/0xa6
    [<ffffffff811335a5>] __kmalloc_node_track_caller+0x175/0x3b0
    [<ffffffff812ddfe3>] __alloc_skb+0x73/0x230
    [<ffffffff812de1b8>] dev_alloc_skb+0x18/0x30
    [<ffffffffa091a3b7>] rtl_pci_probe+0x10e0/0x17d2 [rtlwifi]
-- snip --
unreferenced object 0xffff8800b4d3f600 (size 256):
  comm "kworker/u:2", pid 13221, jiffies 4297830173 (age 9424.568s)
  hex dump (first 32 bytes):
    1c d6 45 b1 00 88 ff ff 1c d6 45 b1 00 88 ff ff  ..E.......E.....
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff8137a1b1>] kmemleak_alloc+0x21/0x50
    [<ffffffff81130f43>] kmem_cache_alloc_node+0x153/0x270
    [<ffffffff812ddfb6>] __alloc_skb+0x46/0x230
    [<ffffffff812de1b8>] dev_alloc_skb+0x18/0x30
    [<ffffffffa093264a>] rtl92c_set_fw_rsvdpagepkt+0x22a/0x5c0 [rtl8192c_common]
-- snip --

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: add PCI id
Yoshinori Sato [Fri, 13 Apr 2012 15:32:32 +0000 (00:32 +0900)]
ath5k: add PCI id

This device works fine of ath5k.

Details bellow
05:00.0 0200: 168c:ff1b (rev 01)
05:00.0 Ethernet controller: Atheros Communications Inc. Device ff1b (rev 01)
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at febf0000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: ath5k

ath5k 0000:05:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
ath5k 0000:05:00.0: setting latency timer to 64
ath5k 0000:05:00.0: registered as 'phy0'
ath: EEPROM regdomain: 0x67
ath: EEPROM indicates we should expect a direct regpair map
ath: Country alpha2 being used: 00
ath: Regpair used: 0x67
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
ath5k phy0: Atheros AR2425 chip found (MAC: 0xe2, PHY: 0x70)

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix beacon descriptor
Rajkumar Manoharan [Fri, 13 Apr 2012 11:14:22 +0000 (16:44 +0530)]
ath9k: fix beacon descriptor

The tx interrupt for beacon queue is configured only for edma chips.
As the edma chip does not support per descriptor interrupt, no need to
set INTREQ for every beacon descriptor. And also clear ps filter for
beacon frame.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: skip beaconing when reset work is pending
Rajkumar Manoharan [Fri, 13 Apr 2012 11:14:21 +0000 (16:44 +0530)]
ath9k: skip beaconing when reset work is pending

Whenever the reset work is queued up, do not generate beacon. And also
clear the beacon miss count once the beacon stuck was observed.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: reset noiseimmunity level to default
Rajkumar Manoharan [Fri, 13 Apr 2012 11:14:20 +0000 (16:44 +0530)]
ath9k: reset noiseimmunity level to default

After the chip reset, the noise immunity levels are restored with
history values. If the immunity levels are lower than the defaults,
lets start with the optimal values.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: increse bss expire time
Rajkumar Manoharan [Fri, 13 Apr 2012 11:08:40 +0000 (16:38 +0530)]
cfg80211: increse bss expire time

The background scan completion takes more time when the station is
having heavy uplink traffic. The scan state machine decides to fall
back to home channel on every off-channel visit when there are pending
frames in tx queue. bgscan completion took ~30sec on dual band US
regulatory card.

scan period = (20 active channels * probe timeout) +
              (12 passive channels * passive probe timeout) +
              (32 * timeout on home channel) +
              (32 * flush timeout)

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix ibss beacon next tbtt
Rajkumar Manoharan [Fri, 13 Apr 2012 07:46:34 +0000 (13:16 +0530)]
ath9k: fix ibss beacon next tbtt

Sync-up ibss beacon timer with the beacon frame's timestamp. When the
node acts as joiner, it has to sync with the received beacon timestamp
instead of reading tsf from hw. As the hw tsf wont wont be update till
bssid is configured. This patch programs hw tsf with the received beacon
timestamp if beacon timers are yet to be configured.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix ibss fair beacon distribution for AR9462
Rajkumar Manoharan [Fri, 13 Apr 2012 07:46:33 +0000 (13:16 +0530)]
ath9k: fix ibss fair beacon distribution for AR9462

Update AR9462 initval to fix unbalance beacon distribution
in Ad-Hoc network.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agohostap: GFP_ATOMIC/GFP_KERNEL cleanup
Matt Renzelmann [Thu, 12 Apr 2012 22:42:43 +0000 (17:42 -0500)]
hostap: GFP_ATOMIC/GFP_KERNEL cleanup

The driver is allocating memory during initialization with GFP_ATOMIC
even though GFP_KERNEL is sufficient.  This patch fixes it.

Signed-off-by: Matt Renzelmann <mjr@cs.wisc.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Take into account TSF adjustment latency in Toffset setpoint
Javier Cardona [Thu, 12 Apr 2012 21:32:23 +0000 (14:32 -0700)]
mac80211: Take into account TSF adjustment latency in Toffset setpoint

When testing mesh synchronization we observed a global TSF slowdown that
was dependent on the number of synchronized mesh stations.  This seems
to be caused by the TSF adjustment (read/write) latency.

Adding a small margin to the Toffset setpoint solved the problem.

Signed-off-by: Shinichi Hotori <hotorinn@gmail.com>
Signed-off-by: Yu Niiro <yu.niiro@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Choose a new toffset setpoint if a big tsf jump is detected.
Javier Cardona [Thu, 12 Apr 2012 21:32:22 +0000 (14:32 -0700)]
mac80211: Choose a new toffset setpoint if a big tsf jump is detected.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211_hwsim: fixup for tsf setting
Javier Cardona [Thu, 12 Apr 2012 21:32:21 +0000 (14:32 -0700)]
mac80211_hwsim: fixup for tsf setting

Last patch I sent failed to take into account the offset of each phy.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Set the correct values for hwmp (1) and airtimeLinkMetric (1)
Javier Cardona [Thu, 12 Apr 2012 21:32:20 +0000 (14:32 -0700)]
mac80211: Set the correct values for hwmp (1) and airtimeLinkMetric (1)

Per sections 8.4.2.100.2 and 8.4.2.100.3 of Std 802.11-2012

Reported-by: Shinichi Hotori <hotorinn@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: optimize the hardware hang check
Felix Fietkau [Thu, 12 Apr 2012 20:35:58 +0000 (22:35 +0200)]
ath9k: optimize the hardware hang check

Since it's only called when beacons are stuck, move it to the SWBA handler
tasklet, to avoid doing redundant checks on every single interrupt.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: do not register LEDs on AR913x
Felix Fietkau [Thu, 12 Apr 2012 20:35:57 +0000 (22:35 +0200)]
ath9k: do not register LEDs on AR913x

LED support is typically handled via system GPIO on these platforms.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: add support for 8 AP mode interfaces
Felix Fietkau [Thu, 12 Apr 2012 20:35:56 +0000 (22:35 +0200)]
ath9k_hw: add support for 8 AP mode interfaces

Also tweak beacon response times for better stability with the shorter
timer intervals.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: use compare_ether_addr on MAC addresses instead of memcmp
Jonathan Bither [Thu, 12 Apr 2012 19:44:47 +0000 (15:44 -0400)]
ath5k: use compare_ether_addr on MAC addresses instead of memcmp

Following Felix's recent patchset as an example I have replaced memcmp with
compare_ether_addr.

"Because of the constant size and guaranteed 16 bit alignment, the inline
compare_ether_addr function is much cheaper than calling memcmp."

Signed-off-by: Jonathan Bither <jonbither@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Gather and report IRQ sync_cause errors.
Ben Greear [Thu, 12 Apr 2012 17:04:00 +0000 (10:04 -0700)]
ath9k: Gather and report IRQ sync_cause errors.

Report all defined sync_cause errors in debugfs
to aid with debugging.

Use a macro to print out the interrupts file contents
to decrease code duplication.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Use macro to decrease code when priting recv stats.
Ben Greear [Thu, 12 Apr 2012 17:03:59 +0000 (10:03 -0700)]
ath9k: Use macro to decrease code when priting recv stats.

This hides some repetitive code, and will help if the
column widths ever need to change.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: check IEEE80211_HW_QUEUE_CONTROL in ieee80211_check_queues()
Luciano Coelho [Thu, 12 Apr 2012 13:09:49 +0000 (16:09 +0300)]
mac80211: check IEEE80211_HW_QUEUE_CONTROL in ieee80211_check_queues()

Commit 3a25a8c8 (mac80211: add improved HW queue control) introduced a
bug when running in AP mode without the IEEE80211_HW_QUEUE_CONTROL
flag set.  The ieee80211_check_queues() function always returns
-EINVAL, preventing AP mode from starting.  To fix this, check whether
this flag is set before checking if cab_queue is set properly.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: enforce lack of interface combinations
Johannes Berg [Thu, 15 Mar 2012 09:16:16 +0000 (10:16 +0100)]
cfg80211: enforce lack of interface combinations

My grand plan to allow drivers to gradually move over
to advertising virtual interface combinations and only
enforce with drivers that do want it enforced doesn't
seem to be working out, only Christian ever added the
advertising (to carl9170), nobody else did.

Begin enforcing combinations in cfg80211 so that users
can rely on the information reported about a device.

Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Bob Copeland <me@bobcopeland.com>
Cc: Bing Zhao <bzhao@marvell.com>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: Luciano Coelho <coelho@ti.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 16 Apr 2012 18:13:55 +0000 (14:13 -0400)]
Merge branch 'wireless-next' of git://git./linux/kernel/git/iwlwifi/iwlwifi

12 years agobrcm80211: smac: only provide valid regulatory hint
Arend van Spriel [Wed, 11 Apr 2012 09:52:50 +0000 (11:52 +0200)]
brcm80211: smac: only provide valid regulatory hint

The driver provides a regulatory hint to cfg80211 as obtained from the
SPROM. Mostly, this will be a two-letter ISO country code. However, it
may obtain special country code similar to the world regulatory domain
as used in cfg80211. This patch avoids setting these special codes as
the hint is lost to cfg80211.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: do not use US as fallback regulatory hint
Arend van Spriel [Wed, 11 Apr 2012 09:52:49 +0000 (11:52 +0200)]
brcm80211: smac: do not use US as fallback regulatory hint

The brcmsmac driver provides the country code from sprom as a regulatory
hint to cfg80211. When brcmsmac does not find a country code entry in
the sprom it passes 'US' as regulatory hint. Better approach is to rely
on the world regulatory domain in cfg80211/crda.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: clean up chip id table
Franky Lin [Wed, 11 Apr 2012 09:52:48 +0000 (11:52 +0200)]
brcm80211: fmac: clean up chip id table

Remove unsupported chip ID and rearrange the list in alphabetical
order

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: postpone dongle RF enabling.
Franky Lin [Wed, 11 Apr 2012 09:52:47 +0000 (11:52 +0200)]
brcm80211: fmac: postpone dongle RF enabling.

BRCMF_C_UP is the command that asks the firmware to enable RF of
dongle. Some firmware initialization steps must be performed during
RF is down. Postpone BRCMF_C_UP firing until brcmf_netdev_open get
called to ensure firmware have enough time to finish
initialization.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: add frame header extension support
Franky Lin [Wed, 11 Apr 2012 09:52:46 +0000 (11:52 +0200)]
brcm80211: fmac: add frame header extension support

A header extension is introduced in the received frame to provide
extra space for dongle information. This won't affect current
supported chipset since the data_offset is 0. But it's necessary for
adding support for future chipset.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: register primary net device with device mac address
Arend van Spriel [Wed, 11 Apr 2012 09:52:45 +0000 (11:52 +0200)]
brcm80211: fmac: register primary net device with device mac address

The primary net device was registered with a primary mac address and
upon IFUP it was set to match the actual mac address from the device.
This patch changes that and moves the brcmf_add_if() call to the common
part of the driver.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: remove primary mac address handling from brcmf_net_attach
Arend van Spriel [Wed, 11 Apr 2012 09:52:44 +0000 (11:52 +0200)]
brcm80211: fmac: remove primary mac address handling from brcmf_net_attach

The mac address for the primary interface was handled different from
the other interfaces. The code has been restructured such that the
brcmf_net_attach function treats the interfaces equal.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: make brcmf_net_attach() static
Arend van Spriel [Wed, 11 Apr 2012 09:52:43 +0000 (11:52 +0200)]
brcm80211: fmac: make brcmf_net_attach() static

The function brcmf_net_attach() is only used within dhd_linux.c so
it does not need to be extern. This patch makes the function static.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove ieee80211_rx_bss_get
Mohammed Shafi Shajakhan [Wed, 11 Apr 2012 09:46:12 +0000 (15:16 +0530)]
mac80211: remove ieee80211_rx_bss_get

its not used where, while we directly obtain ieee80211_bss's
pointer in ibss.c by calling cfg80211_get_bss

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Add Panasonic N5HBZ0000055 device id
Sujith Manoharan [Wed, 11 Apr 2012 08:28:15 +0000 (13:58 +0530)]
ath9k_htc: Add Panasonic N5HBZ0000055 device id

Reported-by: Ryan Roper <ryan.roper@gmail.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove hw.conf.channel usage where possible
Michal Kazior [Wed, 11 Apr 2012 06:47:56 +0000 (08:47 +0200)]
mac80211: remove hw.conf.channel usage where possible

Removes hw.conf.channel usage from the following functions:
 * ieee80211_mandatory_rates
 * ieee80211_sta_get_rates
 * ieee80211_frame_duration
 * ieee80211_rts_duration
 * ieee80211_ctstoself_duration

This is in preparation for multi-channel operation.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Remove BTCOEX initvals
Sujith Manoharan [Wed, 11 Apr 2012 04:04:08 +0000 (09:34 +0530)]
ath9k_hw: Remove BTCOEX initvals

The MAX_TXPWR table for BTCOEX is not needed for AR9462.
Programming these values to the HW results in undesirable
behavior - for example, large number of delimiter/data
underruns are seen in AES-CCMP mode. Also, registers like
AR_PCU_MISC_MODE2 return 0xdeadbeef after the BTCOEX_MAX
power table is programmed to the HW, and frames being transmitted
end up being looped back to the RX engine, an example being beacon
frames in IBSS mode.

Remove this table for now - this fixes CCMP performance and general
IBSS usage.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix an issue in ieee80211_tx_info count field management
Lorenzo Bianconi [Fri, 6 Apr 2012 18:48:15 +0000 (20:48 +0200)]
mac80211: fix an issue in ieee80211_tx_info count field management

I noticed a possible issue in the status count field management of the
ieee80211_tx_info data structure. In particular, when the AGGR
processing is employed,
status.rates[].count is set just for the first frame and not for
others belonging to the same burst, leading to wrong statistic data in
the mac80211 debug file system.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: Add channel information to NL80211_CMD_GET_INTERFACE
Pontus Fuchs [Tue, 3 Apr 2012 14:39:58 +0000 (16:39 +0200)]
cfg80211: Add channel information to NL80211_CMD_GET_INTERFACE

If the current channel is known, add frequency and channel type to
NL80211_CMD_GET_INTERFACE.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: zero registers of unused TX rings
Jakub Kicinski [Tue, 3 Apr 2012 01:40:50 +0000 (03:40 +0200)]
rt2800: zero registers of unused TX rings

This is needed if we take over after drivers which use those.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: initialize queues before giving up due to DMA error
Jakub Kicinski [Tue, 3 Apr 2012 01:40:49 +0000 (03:40 +0200)]
rt2800: initialize queues before giving up due to DMA error

Don't immediately abort .start if DMA is busy before we
initialize the queues. Some drivers do not deinitialize
queues properly and we would fail to take over after them.

This behaviour is consistent with legacy driver.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: add disabling of DMA before loading firmware
Jakub Kicinski [Tue, 3 Apr 2012 01:40:48 +0000 (03:40 +0200)]
rt2800: add disabling of DMA before loading firmware

Legacy driver disables DMA before loading firmware.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: introduce wpdma_disable function
Jakub Kicinski [Tue, 3 Apr 2012 01:40:47 +0000 (03:40 +0200)]
rt2800: introduce wpdma_disable function

Introduce wpdma_disable function to simplify the code.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: protect ->scanning by mutex in ieee80211_work_work()
Stanislaw Gruszka [Wed, 28 Mar 2012 14:01:20 +0000 (16:01 +0200)]
mac80211: protect ->scanning by mutex in ieee80211_work_work()

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: do not scan and monitor connection in parallel
Stanislaw Gruszka [Wed, 28 Mar 2012 14:01:19 +0000 (16:01 +0200)]
mac80211: do not scan and monitor connection in parallel

Before we send probes in connection monitoring we check if scan is not
pending. But we do that check without locking. Fix that and also do not
start scan if connection monitoring is in progress.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Fri, 13 Apr 2012 18:28:56 +0000 (14:28 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx

12 years agoiwlwifi: change the default P2P support to "Yes"
Wey-Yi Guy [Fri, 9 Mar 2012 17:22:53 +0000 (09:22 -0800)]
iwlwifi: change the default P2P support to "Yes"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: more generic name for bluetooth command
Wey-Yi Guy [Fri, 9 Mar 2012 15:15:04 +0000 (07:15 -0800)]
iwlwifi: more generic name for bluetooth command

Instead of hardcode 6000 and 2000, use more generic name

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move scan related declarations out of iwl-core.h
Meenakshi Venkataraman [Wed, 14 Mar 2012 23:25:22 +0000 (16:25 -0700)]
iwlwifi: move scan related declarations out of iwl-core.h

Move these as part of iwl-core.h cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move utility functions out of iwl-core.h
Meenakshi Venkataraman [Wed, 14 Mar 2012 23:16:19 +0000 (16:16 -0700)]
iwlwifi: move utility functions out of iwl-core.h

Move these functions to iwl-agn.h as part of
iwl-core.h cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_bcast_addr to iwl-agn-sta.c
Meenakshi Venkataraman [Wed, 14 Mar 2012 22:59:15 +0000 (15:59 -0700)]
iwlwifi: move iwl_bcast_addr to iwl-agn-sta.c

Move this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_force_rf_reset to iwl-agn-rx.c
Meenakshi Venkataraman [Wed, 14 Mar 2012 22:55:13 +0000 (15:55 -0700)]
iwlwifi: move iwl_force_rf_reset to iwl-agn-rx.c

Move this function as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_send_statistics_request to iwl-agn.c
Meenakshi Venkataraman [Wed, 14 Mar 2012 22:49:37 +0000 (15:49 -0700)]
iwlwifi: move iwl_send_statistics_request to iwl-agn.c

Move this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_print_rx_config_cmd to iwl-agn-rxon.c
Meenakshi Venkataraman [Wed, 14 Mar 2012 22:15:33 +0000 (15:15 -0700)]
iwlwifi: move iwl_print_rx_config_cmd to iwl-agn-rxon.c

Move this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_send_bt_config and mark it static
Meenakshi Venkataraman [Wed, 14 Mar 2012 01:23:51 +0000 (18:23 -0700)]
iwlwifi: move iwl_send_bt_config and mark it static

Move this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_set_tx_power and make it static
Meenakshi Venkataraman [Wed, 14 Mar 2012 01:10:19 +0000 (18:10 -0700)]
iwlwifi: move iwl_set_tx_power and make it static

This function is used only in iwl-agn-rxon.c,
move it there and mark it static.

Move this function as part of iwl-core.c
cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwlagn_fw_error to iwl-agn.c
Meenakshi Venkataraman [Wed, 14 Mar 2012 01:00:15 +0000 (18:00 -0700)]
iwlwifi: move iwlagn_fw_error to iwl-agn.c

Move this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_chswitch_done to iwl-mac80211.c
Meenakshi Venkataraman [Wed, 14 Mar 2012 00:47:23 +0000 (17:47 -0700)]
iwlwifi: move iwl_chswitch_done to iwl-mac80211.c

Move this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_set_rate to iwl-agn-rxon.c
Meenakshi Venkataraman [Wed, 14 Mar 2012 00:16:07 +0000 (17:16 -0700)]
iwlwifi: move iwl_set_rate to iwl-agn-rxon.c

Move this as part of  iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_connection_init_rx_config to iwl-agn-rxon.c
Meenakshi Venkataraman [Wed, 14 Mar 2012 00:07:48 +0000 (17:07 -0700)]
iwlwifi: move iwl_connection_init_rx_config to iwl-agn-rxon.c

Move this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_set_flags_for_band to iwl-agn-rxon.c
Meenakshi Venkataraman [Tue, 13 Mar 2012 23:45:00 +0000 (16:45 -0700)]
iwlwifi: move iwl_set_flags_for_band to iwl-agn-rxon.c

Moving this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_set_rxon_channel to iwl-agn-rxon.c
Meenakshi Venkataraman [Tue, 13 Mar 2012 23:31:34 +0000 (16:31 -0700)]
iwlwifi: move iwl_set_rxon_channel to iwl-agn-rxon.c

Moving this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_set_rxon_ht to iwl-agn-rxon.c
Meenakshi Venkataraman [Tue, 13 Mar 2012 23:25:38 +0000 (16:25 -0700)]
iwlwifi: move iwl_set_rxon_ht to iwl-agn-rxon.c

Moving this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_is_ht40_tx_allowed out of iwl-core.c
Meenakshi Venkataraman [Tue, 13 Mar 2012 23:15:09 +0000 (16:15 -0700)]
iwlwifi: move iwl_is_ht40_tx_allowed out of iwl-core.c

This is really something determined by
station parameters, so move it to
iwl-agn-sta.c.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_set_hw_rfkill_state and mark it static
Meenakshi Venkataraman [Tue, 13 Mar 2012 22:33:18 +0000 (15:33 -0700)]
iwlwifi: move iwl_set_hw_rfkill_state and mark it static

iwl_set_hw_rfkill_state is used only in
iwl-agn.c. Move it there and mark it static.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_free_skb and mark it static
Meenakshi Venkataraman [Tue, 13 Mar 2012 22:24:44 +0000 (15:24 -0700)]
iwlwifi: move iwl_free_skb and mark it static

iwl_free_skb is used only in iwl-agn.c, move
it there and mark it static.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move channel switch related functions
Meenakshi Venkataraman [Tue, 13 Mar 2012 22:18:07 +0000 (15:18 -0700)]
iwlwifi: move channel switch related functions

With the creation of iwl-agn-devices.c,
iwl-core.c can be cleaned up a bit more by
moving beacon time related functions from
iwl-core.c to iwl-agn-devices.c

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: calculate active legacy rates per station
Johannes Berg [Thu, 8 Mar 2012 08:18:04 +0000 (09:18 +0100)]
iwlwifi: calculate active legacy rates per station

Not all stations are guaranteed to have the same
active (available) legacy rates, so calculate them
on rate control init instead of hard-coding them
based on our own available rates. I have no idea
why that was done here before.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: make iwl_sta_fill_lq static
Johannes Berg [Thu, 8 Mar 2012 09:19:55 +0000 (10:19 +0100)]
iwlwifi: make iwl_sta_fill_lq static

It's only used in a single place.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwlagn_hw_valid_rtc_data_addr prototype
Meenakshi Venkataraman [Wed, 7 Mar 2012 21:54:08 +0000 (13:54 -0800)]
iwlwifi: move iwlagn_hw_valid_rtc_data_addr prototype

Since this function is now used only by
op_mode, remove it from iwl-shared.h and move
it to iwl-agn.h.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
Wey-Yi Guy [Thu, 12 Apr 2012 21:07:13 +0000 (14:07 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into wireless-next

12 years agoiwlwifi: dynamically determine lib_ops
Johannes Berg [Tue, 10 Apr 2012 21:10:28 +0000 (14:10 -0700)]
iwlwifi: dynamically determine lib_ops

Having the pointer to lib_ops in the config
makes it impossible to split the driver into
different modules. Determine the ops based on
the device family enumeration to get rid of
the direct pointer.

Also move all the opmode specific code from
the iwl-[1256]000.c files into a new file
iwl-agn-devices.c so that the former only
have configuration data now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonet/wireless: ipw2x00: add supported cipher suites to wiphy initialization
Stanislav Yakovlev [Wed, 11 Apr 2012 01:44:47 +0000 (21:44 -0400)]
net/wireless: ipw2x00: add supported cipher suites to wiphy initialization

Driver doesn't report its supported cipher suites through cfg80211
interface. It still uses wext interface and probably will not work
through nl80211, but will at least correctly advertise supported
features.

Bug was reported by Omar Siam.
https://bugzilla.kernel.org/show_bug.cgi?id=43049

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoprism54: replace open-coded ARRAY_SIZE with macro
Jim Cromie [Wed, 11 Apr 2012 00:56:34 +0000 (18:56 -0600)]
prism54: replace open-coded ARRAY_SIZE with macro

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: replace open-coded ARRAY_SIZE with the macro
Jim Cromie [Tue, 10 Apr 2012 23:02:34 +0000 (17:02 -0600)]
brcm80211: replace open-coded ARRAY_SIZE with the macro

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Fix LLCP link timeout typo
Samuel Ortiz [Tue, 10 Apr 2012 17:43:20 +0000 (19:43 +0200)]
NFC: Fix LLCP link timeout typo

We were sending the LTO TLV as a version TLV instead of the actual link
timeout one.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add MIUX to the local LLCP general bytes
Samuel Ortiz [Tue, 10 Apr 2012 17:43:19 +0000 (19:43 +0200)]
NFC: Add MIUX to the local LLCP general bytes

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: pn533 Rx chaining support
Samuel Ortiz [Tue, 10 Apr 2012 17:43:18 +0000 (19:43 +0200)]
NFC: pn533 Rx chaining support

When buffers on the receiption path exceed 262 bytes, the pn533 uses
a chaining mechanism where the initiator has to send NULL data frames
to fetch the remaining frames.
We do that from a workqueue context while holding the cmd lock. Once the
MI bit is gone, we aggregate the queued received skbs.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Convert pn533 from tasklet to workqueues
Samuel Ortiz [Tue, 10 Apr 2012 17:43:17 +0000 (19:43 +0200)]
NFC: Convert pn533 from tasklet to workqueues

There is no need for soft IRQ contexts, and workqueues are more flexible.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Call llcp_add_header properly when sending LLCP DM or DISC
Samuel Ortiz [Tue, 10 Apr 2012 17:43:16 +0000 (19:43 +0200)]
NFC: Call llcp_add_header properly when sending LLCP DM or DISC

dsap and ssap were swapped when sending DN or DISC.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Fix LLCP TLV building routine
Samuel Ortiz [Tue, 10 Apr 2012 17:43:15 +0000 (19:43 +0200)]
NFC: Fix LLCP TLV building routine

The if logic could lead to zero length TLVs.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: No need to apply twice the modulo op to LLCP's recv_n
Samuel Ortiz [Tue, 10 Apr 2012 17:43:14 +0000 (19:43 +0200)]
NFC: No need to apply twice the modulo op to LLCP's recv_n

recv_n is set properly when receiving an HDLC frame.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Dump LLCP frames
Samuel Ortiz [Tue, 10 Apr 2012 17:43:13 +0000 (19:43 +0200)]
NFC: Dump LLCP frames

At KERN_DEBUG level.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add Core support to generate tag lost event
Eric Lapuyade [Tue, 10 Apr 2012 17:43:12 +0000 (19:43 +0200)]
NFC: Add Core support to generate tag lost event

Some HW/drivers get notifications when a tag moves out of the radio field.
This notification is now forwarded to user space through netlink.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Changed target activated state logic
Eric Lapuyade [Tue, 10 Apr 2012 17:43:11 +0000 (19:43 +0200)]
NFC: Changed target activated state logic

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Fix next target_idx type and rename for clarity
Eric Lapuyade [Tue, 10 Apr 2012 17:43:10 +0000 (19:43 +0200)]
NFC: Fix next target_idx type and rename for clarity

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: The core part should generate the target index
Samuel Ortiz [Tue, 10 Apr 2012 17:43:09 +0000 (19:43 +0200)]
NFC: The core part should generate the target index

The target index can be used by userspace to uniquely identify a target
and thus should be kept unique, per NFC adapter. Moreover, some protocols
do not provide a logical index when discovering new targets, so we have to
generate one for them.
For NCI or pn533 to fetch their logical index, we added a logical_idx field
to the target structure.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add HCI documentation
Eric Lapuyade [Tue, 10 Apr 2012 17:43:08 +0000 (19:43 +0200)]
NFC: Add HCI documentation

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: SHDLC implementation
Eric Lapuyade [Tue, 10 Apr 2012 17:43:07 +0000 (19:43 +0200)]
NFC: SHDLC implementation

Most NFC HCI chipsets actually use a simplified HDLC link layer to
carry HCI payloads.
This implementation registers itself as an HCI device on behalf of the
NFC driver.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: HCI support
Eric Lapuyade [Tue, 10 Apr 2012 17:43:06 +0000 (19:43 +0200)]
NFC: HCI support

This is an implementation of ETSI TS 102 622 specification.
Many NFC chipsets use HCI as the host <-> target protocol on top of a
serial link like i2c.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Export target lost function
Eric Lapuyade [Tue, 10 Apr 2012 17:43:05 +0000 (19:43 +0200)]
NFC: Export target lost function

NFC drivers will call this routine when they detect that a tag leaves the
RF field. This will eventually lead to the corresponding netlink event
to be sent.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add a target lost netlink event
Samuel Ortiz [Tue, 10 Apr 2012 17:43:04 +0000 (19:43 +0200)]
NFC: Add a target lost netlink event

Some chips are capable of detecting when a tag is out of the field, so
they could send a netlink event about it to userspace.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove dead code
Zefir Kurtisi [Tue, 10 Apr 2012 11:18:04 +0000 (13:18 +0200)]
ath9k: remove dead code

Clean up some orphaned code lines containing
* unused variables (not referenced / write-only)
* non-implemented function prototypes

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix the assignment of PREQ's MAC address for Proactive RANN
Chun-Yeow Yeoh [Tue, 10 Apr 2012 04:31:56 +0000 (12:31 +0800)]
mac80211: fix the assignment of PREQ's MAC address for Proactive RANN

Record the RANN sender's address only for RANNs that meet the acceptance
criteria (per sections 13.10.12.4.2).

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Reviewed-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: use asynchronous firmware loading
Amitkumar Karwar [Tue, 10 Apr 2012 03:06:57 +0000 (20:06 -0700)]
mwifiex: use asynchronous firmware loading

Make use of request_firmware_nowait instead of request_firmware
to load FW asynchronously. This fixes timeouts introduced with
recent udev changes.

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: add support for WPS2.0
Avinash Patil [Tue, 10 Apr 2012 03:06:56 +0000 (20:06 -0700)]
mwifiex: add support for WPS2.0

This patches enables setting association request and probe request
IE for station interface. WPS exchange between WPS2.0 AP and mwifiex
STA Enrollee/External Registrar completes successfully.

Tested with wpa_supplicant 1.0 and 2.0 devel.

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: display correct country information in debugfs "info"
Amitkumar Karwar [Tue, 10 Apr 2012 03:06:55 +0000 (20:06 -0700)]
mwifiex: display correct country information in debugfs "info"

Use "priv->country_code" string to display country information in
debugfs command "info" instead of "adapter->region_code".

"adapter->region_code" contains default region code got from FW while
initialization, whereas "priv->country_code" is updated in reg_notifier
handler whenever there is a change in regulatory domain.

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: set default regulatory domain
Amitkumar Karwar [Tue, 10 Apr 2012 03:06:54 +0000 (20:06 -0700)]
mwifiex: set default regulatory domain

Driver gets region code from FW during initialisation. This patch
makes use of it for settting default regulatory domain using
regulatory_hint() API.

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: fix typo in RSSI_HIGH event handling
Bing Zhao [Tue, 10 Apr 2012 03:06:53 +0000 (20:06 -0700)]
mwifiex: fix typo in RSSI_HIGH event handling

This is a copy-n-paste error introduced in recent patch
"mwifiex: add set_cqm_rssi_config handler support".

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: introduce device family enum
Johannes Berg [Tue, 10 Apr 2012 00:47:00 +0000 (17:47 -0700)]
iwlwifi: introduce device family enum

This will later be used to dynamically bind
the configuration data for DVM and MVM.

For now, we can use it to get rid of the
additional_nic_config() hook.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>