GitHub/mt8127/android_kernel_alcatel_ttab.git
12 years agoBluetooth: Rename function bt_err to bt_to_errno
Joe Perches [Thu, 30 Jun 2011 01:18:29 +0000 (18:18 -0700)]
Bluetooth: Rename function bt_err to bt_to_errno

Make it easier to use more normal logging styles later.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: ERTM timeouts need to be converted to jiffies
Mat Martineau [Wed, 29 Jun 2011 21:35:21 +0000 (14:35 -0700)]
Bluetooth: ERTM timeouts need to be converted to jiffies

ERTM timeouts are defined in milliseconds, but need to be converted
to jiffies when passed to mod_timer().

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Fix indentation whitespace
Mat Martineau [Wed, 29 Jun 2011 21:35:20 +0000 (14:35 -0700)]
Bluetooth: Fix indentation whitespace

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: uses crypto interfaces, select CRYPTO
Randy Dunlap [Wed, 22 Jun 2011 17:08:11 +0000 (10:08 -0700)]
Bluetooth: uses crypto interfaces, select CRYPTO

Recent changes to hci_core.c use crypto interfaces, so select CRYPTO
to make sure that those interfaces are present.

Fixes these build errors when CRYPTO is not enabled:

net/built-in.o: In function `hci_register_dev':
(.text+0x4cf86): undefined reference to `crypto_alloc_base'
net/built-in.o: In function `hci_unregister_dev':
(.text+0x4f912): undefined reference to `crypto_destroy_tfm'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: include scatterlist.h where needed
Stephen Rothwell [Thu, 23 Jun 2011 02:58:55 +0000 (12:58 +1000)]
Bluetooth: include scatterlist.h where needed

net/bluetooth/smp.c: In function 'smp_e':
net/bluetooth/smp.c:49:21: error: storage size of 'sg' isn't known
net/bluetooth/smp.c:67:2: error: implicit declaration of function 'sg_init_one'
net/bluetooth/smp.c:49:21: warning: unused variable 'sg'

Caused by commit d22ef0bc83c5 ("Bluetooth: Add LE SMP Cryptoolbox
functions").  Missing include file, presumably.  This batch has been in
the bluetooth tree since June 14, so it may have been exposed by the
removal of linux/mm.h from netdevice.h ...

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: add __devinit to some functions
Hauke Mehrtens [Tue, 21 Jun 2011 18:57:16 +0000 (20:57 +0200)]
ssb: add __devinit to some functions

Two functions in ssb are using register_pci_controller() which is
__devinit. The functions ssb_pcicore_init_hostmode() and
ssb_gige_probe() should also be __devinit.

This fixes the following warning:
WARNING: vmlinux.o(.text+0x2727b8): Section mismatch in reference from the function ssb_pcicore_init_hostmode() to the function .devinit.text:register_pci_controller()
The function ssb_pcicore_init_hostmode() references
the function __devinit register_pci_controller().
This is often because ssb_pcicore_init_hostmode lacks a __devinit
annotation or the annotation of register_pci_controller is wrong.

WARNING: vmlinux.o(.text+0x273398): Section mismatch in reference from the function ssb_gige_probe() to the function .devinit.text:register_pci_controller()
The function ssb_gige_probe() references
the function __devinit register_pci_controller().
This is often because ssb_gige_probe lacks a __devinit
annotation or the annotation of register_pci_controller is wrong.

Reported-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: enable support for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:52 +0000 (11:23 +0200)]
ath9k: enable support for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add external_reset callback to ath9k_platfom_data for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:51 +0000 (11:23 +0200)]
ath9k: add external_reset callback to ath9k_platfom_data for AR9330

The patch adds a callback to ath9k_platform_data. If the
callback is provided by the platform code, then it can be
used to hard reset the WMAC device.

The callback is required for doing a hard reset of the AR9330
chips to get them working again after a hang.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: configure internal regulator for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:50 +0000 (11:23 +0200)]
ath9k: configure internal regulator for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: configure diversity based on eeprom contents for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:49 +0000 (11:23 +0200)]
ath9k: configure diversity based on eeprom contents for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix few register offsets for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:48 +0000 (11:23 +0200)]
ath9k: fix few register offsets for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: set diversity group for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:47 +0000 (11:23 +0200)]
ath9k: set diversity group for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add fast_div_bias configuration for diversity group 1
Gabor Juhos [Tue, 21 Jun 2011 09:23:46 +0000 (11:23 +0200)]
ath9k: add fast_div_bias configuration for diversity group 1

The patch adds the missing configuration code for diversity
group 1.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove superfluous parentheses
Gabor Juhos [Tue, 21 Jun 2011 09:23:45 +0000 (11:23 +0200)]
ath9k: remove superfluous parentheses

Also remove two empty lines.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix antenna diversity configuration for non AR9485 chips
Gabor Juhos [Tue, 21 Jun 2011 09:23:44 +0000 (11:23 +0200)]
ath9k: fix antenna diversity configuration for non AR9485 chips

The current values must be used only on AR9485 chips. Other chips
requires different values.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add a missing case statement to ath_ant_div_comb_alt_check
Gabor Juhos [Tue, 21 Jun 2011 09:23:43 +0000 (11:23 +0200)]
ath9k: add a missing case statement to ath_ant_div_comb_alt_check

The 'ar9003_hw_antdiv_comb_conf_get' function sets div_group to 2
however that value is not used in 'ath_ant_div_comb_alt_check'.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: use correct max_streams for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:42 +0000 (11:23 +0200)]
ath9k: use correct max_streams for AR9330

The AR9330 is a single stream chip.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: enable antenna diversity for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:41 +0000 (11:23 +0200)]
ath9k: enable antenna diversity for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: set NF limits for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:40 +0000 (11:23 +0200)]
ath9k: set NF limits for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: configure xpa bias level for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:39 +0000 (11:23 +0200)]
ath9k: configure xpa bias level for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: use correct EEPROM base for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:38 +0000 (11:23 +0200)]
ath9k: use correct EEPROM base for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: enable tuning capacitance configuration for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:37 +0000 (11:23 +0200)]
ath9k: enable tuning capacitance configuration for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: skip internal regulator configuration for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:36 +0000 (11:23 +0200)]
ath9k: skip internal regulator configuration for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: enable TX/RX data byte swap for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:35 +0000 (11:23 +0200)]
ath9k: enable TX/RX data byte swap for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: configure RF channel frequency for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:34 +0000 (11:23 +0200)]
ath9k: configure RF channel frequency for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix channel frequency calculation for AR9340
Gabor Juhos [Tue, 21 Jun 2011 09:23:33 +0000 (11:23 +0200)]
ath9k: fix channel frequency calculation for AR9340

A multiplication is missing from the current formula.

Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: read spur frequency information from eeprom for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:32 +0000 (11:23 +0200)]
ath9k: read spur frequency information from eeprom for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: don't enable LDPC for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:31 +0000 (11:23 +0200)]
ath9k: don't enable LDPC for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: use different BB watchdog timeout value for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:30 +0000 (11:23 +0200)]
ath9k: use different BB watchdog timeout value for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add AR9330 specific PLL initialization
Gabor Juhos [Tue, 21 Jun 2011 09:23:29 +0000 (11:23 +0200)]
ath9k: add AR9330 specific PLL initialization

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: initialize rx gain table for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:28 +0000 (11:23 +0200)]
ath9k: initialize rx gain table for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: initialize tx gain table for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:27 +0000 (11:23 +0200)]
ath9k: initialize tx gain table for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: initialize mode registers for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:26 +0000 (11:23 +0200)]
ath9k: initialize mode registers for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add AR9330 initvals
Gabor Juhos [Tue, 21 Jun 2011 09:23:25 +0000 (11:23 +0200)]
ath9k: add AR9330 initvals

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add platform device id for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:24 +0000 (11:23 +0200)]
ath9k: add platform device id for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add MAC revision detection for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:23 +0000 (11:23 +0200)]
ath9k: add MAC revision detection for AR9330

The AR9330 1.0 and 1.1 are using the same revision,
thus it is not possible to distinguish the two chips.
The platform setup code can distinguish the chips based
on the SoC revision.

Add a callback function to ath9k_platform_data in order
to allow getting the revision number from the platform code.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: define device id for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:22 +0000 (11:23 +0200)]
ath9k: define device id for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: define mac version for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:21 +0000 (11:23 +0200)]
ath9k: define mac version for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Fix calculation of PAPRD training power at 5Ghz
Mohammed Shafi Shajakhan [Tue, 21 Jun 2011 09:21:46 +0000 (14:51 +0530)]
ath9k_hw: Fix calculation of PAPRD training power at 5Ghz

higher the chainmask, lesser the power_delta to be added
to the paprd_training_power

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: use netlink consistent dump feature for BSS dumps
Johannes Berg [Tue, 21 Jun 2011 07:45:33 +0000 (09:45 +0200)]
nl80211: use netlink consistent dump feature for BSS dumps

Use the new consistent dump feature from (generic) netlink
to advertise when dumps are incomplete.

Readers may note that this does not initialize the
rdev->bss_generation counter to a non-zero value. This is
still OK since the value is modified only under spinlock
when the list is modified. Since the dump code holds the
spinlock, the value will either be > 0 already, or the
list will still be empty in which case a consistent dump
will actually be made (and be empty).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: remove casts of void pointers
Amitkumar Karwar [Mon, 20 Jun 2011 22:21:48 +0000 (15:21 -0700)]
mwifiex: remove casts of void pointers

In some cases local pointers are used to cast void pointers passed to
the function. Those unnecessary local pointers are also removed.

This patch was inspired by Joe Perches' patch
[PATCH net-next 1/2] wireless: Remove casts of void *;
and the comments from Julian Calaby.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Cc: Joe Perches <joe@perches.com>
Cc: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agozd1211rw: detect stalled beacon interrupt faster
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:54 +0000 (14:42 +0300)]
zd1211rw: detect stalled beacon interrupt faster

As USB_INT_ID_RETRY_FAILED can override USB_INT_ID_REGS, beacon interrupt
(CR_INTERRUPT) might be lost. Problem is that when device trigger CR_INTERRUPT
it disables HW interrupt. Now if USB_INT_ID_REGS with CR_INTERRUPT gets lost,
beacon interrupt stays disabled until beacon watchdog notices the stall. This
happen very often on heavy TX. Improve watchdog to trigger earlier, after three
missing beacon interrupts.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agozd1211rw: don't let zd_mac_config_beacon() run too long from beacon interrupt handler
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:49 +0000 (14:42 +0300)]
zd1211rw: don't let zd_mac_config_beacon() run too long from beacon interrupt handler

zd_mac_config_beacon() has only limited time to set up beacon when called from
beacon interrupt handler/worker. So do not let it retry acquiring beacon fifo
semaphore in interrupt handler. Beacon fifo semaphore should not be locked by
firmware anyway at this time, it's only locked when device is using/txing
beacon.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agozd1211rw: handle lost read-reg interrupts
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:44 +0000 (14:42 +0300)]
zd1211rw: handle lost read-reg interrupts

Device losses read-reg interrupts. By looking at usbmon it appears that
USB_INT_ID_RETRY_FAILED can override USB_INT_ID_REGS. This causes read
command to timeout, usually under heavy TX.

Fix by retrying read registers again if USB_INT_ID_RETRY_FAILED is received
while waiting for USB_INT_ID_REGS.

However USB_INT_ID_REGS is not always lost but is received after
USB_INT_ID_RETRY_FAILED and is usually received by the retried read
command. USB_INT_ID_REGS of the retry is then left unhandled and might
be received by next read command. Handle this by ignoring previous
USB_INT_ID_REGS that doesn't match current read command request.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agozd1211rw: only update HW beacon if new beacon differs from currect
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:39 +0000 (14:42 +0300)]
zd1211rw: only update HW beacon if new beacon differs from currect

Update HW beacon only when needed. This appears to make device work in AP-mode
(dtim_period=1) somewhat more stable.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agozd1211rw: make 'handle_rx_packet: invalid, small RX packet' message debug-only
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:33 +0000 (14:42 +0300)]
zd1211rw: make 'handle_rx_packet: invalid, small RX packet' message debug-only

This message is should be debug-only as it tells almost nothing useful. It also
happens very often and just floods logs.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agozd1211rw: fix invalid signal values from device
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:28 +0000 (14:42 +0300)]
zd1211rw: fix invalid signal values from device

Driver uses IEEE80211_HW_SIGNAL_UNSPEC and so signal values reported to
mac80211 should be in range 0..100. Sometimes device return out of range
values. These out of range values can then trigger warning in
cfg80211_inform_bss_frame.

This patch adds checks to enforce range returned from driver to
mac80211 be in 0..100 range.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonetlink: advertise incomplete dumps
Johannes Berg [Mon, 20 Jun 2011 11:40:46 +0000 (13:40 +0200)]
netlink: advertise incomplete dumps

Consider the following situation:
 * a dump that would show 8 entries, four in the first
   round, and four in the second
 * between the first and second rounds, 6 entries are
   removed
 * now the second round will not show any entry, and
   even if there is a sequence/generation counter the
   application will not know

To solve this problem, add a new flag NLM_F_DUMP_INTR
to the netlink header that indicates the dump wasn't
consistent, this flag can also be set on the MSG_DONE
message that terminates the dump, and as such above
situation can be detected.

To achieve this, add a sequence counter to the netlink
callback struct. Of course, netlink code still needs
to use this new functionality. The correct way to do
that is to always set cb->seq when a dumpit callback
is invoked and call nl_dump_check_consistent() for
each new message. The core code will also call this
function for the final MSG_DONE message.

To make it usable with generic netlink, a new function
genlmsg_nlhdr() is needed to obtain the netlink header
from the genetlink user header.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: HT-PHY: calibrate radio after switching channel
Rafał Miłecki [Mon, 20 Jun 2011 01:12:19 +0000 (03:12 +0200)]
b43: HT-PHY: calibrate radio after switching channel

After uploading radio values calibration goes in. In MMIO dump it is:
 radio_read(0x002b) -> 0x0008
radio_write(0x002b) <- 0x0008
 radio_read(0x002e) -> 0x0004
radio_write(0x002e) <- 0x0000
 radio_read(0x002e) -> 0x0000
radio_write(0x002e) <- 0x0004
 radio_read(0x002b) -> 0x0008
radio_write(0x002b) <- 0x0009
To find masks and sets, MMIO hacks were used to fool closed driver.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: reset usb devices at probe
Stanislaw Gruszka [Sun, 19 Jun 2011 17:47:39 +0000 (19:47 +0200)]
rt2x00: reset usb devices at probe

When module is reloaded, device may fail to work, with messages:

[  342.211926] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x0059, type=2.
[  342.314254] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x004a, type=2.
[  342.416458] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 3183 max 2432.
[  342.518605] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x00c9, type=2.
[  342.620836] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x00ae, type=1.
[  342.723201] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 0 max 2432.
[  342.825399] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 0 max 2432.
[  342.927624] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 0 max 2432.
[  343.029804] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 2491 max 2432.
[  343.132008] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 2576 max 2432.
[  343.234326] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x004c, type=1.
[  343.438723] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x00e6, type=1.

Whereas replugging device make it functional. To solve that problem
force reset device during probe.

With patch messages are gone. Unfortunately device may sometimes
still does not operate correctly after module reload (fail to receive
data after associate), but such cases are rarer than without the patch.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: fix possible memory corruption in case of invalid rxdesc.size
Stanislaw Gruszka [Sun, 19 Jun 2011 17:46:02 +0000 (19:46 +0200)]
rt2x00: fix possible memory corruption in case of invalid rxdesc.size

Sometimes rxdesc descriptor provided by hardware contains invalid
(random) data. For example rxdesc.size can be bigger than actual
size of the buffer. When this happen rt2x00crypto_rx_insert_iv()
corrupt memory doing memmove outside of buffer boundaries.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: move declarations of chantables functions to correct files
Rafał Miłecki [Sun, 19 Jun 2011 11:30:21 +0000 (13:30 +0200)]
b43: N-PHY: move declarations of chantables functions to correct files

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: update switching analog on/off
Rafał Miłecki [Sun, 19 Jun 2011 11:30:20 +0000 (13:30 +0200)]
b43: N-PHY: update switching analog on/off

Specs were recently updated.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: HT-PHY: switch radio to requested channel
Rafał Miłecki [Sun, 19 Jun 2011 10:17:21 +0000 (12:17 +0200)]
b43: HT-PHY: switch radio to requested channel

Switching channel happens after specific SHM write to B43_SHM_SH_CHAN.
This is the way we found it in BCM4331 MMIO dumps. By comparing with
N-PHY code we noticed there is routing used for SYN and TX/RX.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: HT-PHY: add place for implementing channel switching
Rafał Miłecki [Sun, 19 Jun 2011 10:17:20 +0000 (12:17 +0200)]
b43: HT-PHY: add place for implementing channel switching

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: HT-PHY: define standard structs for channel switching
Rafał Miłecki [Sun, 19 Jun 2011 10:17:19 +0000 (12:17 +0200)]
b43: HT-PHY: define standard structs for channel switching

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: HT-PHY: enable radio
Rafał Miłecki [Sun, 19 Jun 2011 00:18:12 +0000 (02:18 +0200)]
b43: HT-PHY: enable radio

The trick was to find 0x810 PHY reg ops close to analog enabling code.
To find out proper masks and sets, MMIO hacks were used.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: HT-PHY: implement killing radio
Rafał Miłecki [Sun, 19 Jun 2011 00:18:11 +0000 (02:18 +0200)]
b43: HT-PHY: implement killing radio

Closed drivers kill radio right after reading radio version and MACCTL,
so it was easy to find related PHY ops:
 phy_read(0x0810) -> 0x0000
phy_write(0x0810) <- 0x0000
To find out the mask of above OP, MMIO hack was used to fake read val:
 phy_read(0x0810) -> 0xffff
phy_write(0x0810) <- 0x0000

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetoot...
John W. Linville [Wed, 22 Jun 2011 20:06:58 +0000 (16:06 -0400)]
Merge branch 'master' of /linux/kernel/git/padovan/bluetooth-next-2.6

12 years agoBluetooth: Fix not setting the chan state
Vinicius Costa Gomes [Mon, 20 Jun 2011 21:53:18 +0000 (18:53 -0300)]
Bluetooth: Fix not setting the chan state

When the connection is ready we should set the connection
to CONNECTED so userspace can use it.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-2.6
Gustavo F. Padovan [Tue, 21 Jun 2011 17:52:56 +0000 (14:52 -0300)]
Merge /linux/kernel/git/padovan/bluetooth-2.6

Conflicts:
net/bluetooth/l2cap_core.c

12 years agortlwifi: rtl8192{c,ce,cu,se}: Remove comparisons of booleans with true
Mike McCormack [Mon, 20 Jun 2011 01:47:51 +0000 (10:47 +0900)]
rtlwifi: rtl8192{c,ce,cu,se}: Remove comparisons of booleans with true

These are a potential source of confusion, as most C code treats all
non-zero values as true.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192cu: Remove unused parameter
Mike McCormack [Mon, 20 Jun 2011 01:46:05 +0000 (10:46 +0900)]
rtlwifi: rtl8192cu: Remove unused parameter

rtl_ps_set_rf_state's protect_or_not parameter is not set to
true anywhere, except for commented out code.

It enables some legacy locking code, which is no longer used,
so delete the parameter and the old locking code.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Fix typo in variable name
Mike McCormack [Mon, 20 Jun 2011 01:44:58 +0000 (10:44 +0900)]
rtlwifi: Fix typo in variable name

offchan_deley should be offchan_delay

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: clean exports of functions
Rafał Miłecki [Fri, 17 Jun 2011 23:01:59 +0000 (01:01 +0200)]
bcma: clean exports of functions

Function managing IRQs is needed for external drivers like b43.
On the other side we do not expect writing any hosts drivers outside of
bcma, so this is safe to do not export functions related to this.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: add missing ieee80211_free_hw() on unload in AHB code
Pavel Roskin [Fri, 17 Jun 2011 21:59:02 +0000 (17:59 -0400)]
ath5k: add missing ieee80211_free_hw() on unload in AHB code

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: free sc->ah in ath5k_deinit_softc
John W. Linville [Fri, 17 Jun 2011 20:41:30 +0000 (16:41 -0400)]
ath5k: free sc->ah in ath5k_deinit_softc

Nothing else is freeing it, and this mirrors the error handling path
already in ath5k_init_softc.

https://bugzilla.kernel.org/show_bug.cgi?id=37592

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Tsyvarev Andrey <tsyvarev@ispras.ru>
12 years agobcma: fix BCM43224 rev 0 workaround
Rafał Miłecki [Fri, 17 Jun 2011 11:15:24 +0000 (13:15 +0200)]
bcma: fix BCM43224 rev 0 workaround

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: enable support for 14e4:4357 (BCM43225)
Rafał Miłecki [Fri, 17 Jun 2011 11:15:23 +0000 (13:15 +0200)]
bcma: enable support for 14e4:4357 (BCM43225)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: make sure PAPRD training is properly done
Mohammed Shafi Shajakhan [Fri, 17 Jun 2011 08:38:42 +0000 (14:08 +0530)]
ath9k_hw: make sure PAPRD training is properly done

checking the status of PAPRD_AGC2_POWER(Log(ADC_power) measured after
last gain-change in dB) field suggests whether the PAPRD is completely/properly
done. This is an additional check apart from polling for PAPRD done bit being set.
        Susinder suggests that the ideal power range value should be
0xf0 to 0xfe. With AR9382 we do have the values in this range. to have a
common check for all platforms we take agc2_power should be atleast greater
than 0xe0

Cc: susinder@qca.qualcomm.com
Cc: senthilb@qca.qualcomm.com
Cc: kmuthusa@qca.qualcomm.com
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix a corner case failure in sending PAPRD frames in HT40
Mohammed Shafi Shajakhan [Fri, 17 Jun 2011 05:37:32 +0000 (11:07 +0530)]
ath9k: Fix a corner case failure in sending PAPRD frames in HT40

when the AP is configured with HT40/2.4GHz and when PAPRD is enabled in station
we have PAPRD training frames never sent out because of the following
failure "PAPRD target power delta out of range". This consistently happens
in channel 10,11 in Over The Air testing and rarely in channel 6 under wired
setup.
        the reason behind this issue is all the HT40 rates target power
are 0 when we operate in channel 10/11 at 2.4GHz

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: quiesce vif before suspending
Eliad Peller [Thu, 16 Jun 2011 08:49:33 +0000 (11:49 +0300)]
mac80211: quiesce vif before suspending

Cancel all relevant timers/works before suspending (wowlan).

This patch handles the following warning:
WARNING: at net/mac80211/util.c:565 queueing ieee80211 work while going to suspend
Backtrace:
[<bf07b598>] (ieee80211_can_queue_work+0x0/0x4c [mac80211])
[<bf07c28c>] (ieee80211_queue_work+0x0/0x30 [mac80211])
[<bf0690dc>] (ieee80211_sta_timer+0x0/0x3c [mac80211])
[<c00a3008>] (run_timer_softirq+0x0/0x220)
[<c009e530>] (__do_softirq+0x0/0x130)
[<c009e660>] (irq_exit+0x0/0xb4)
[<c004c4a0>] (ipi_timer+0x0/0x4c)
[<c0046350>] (do_local_timer+0x0/0x88)
[<c00488ec>] (cpu_idle+0x0/0xe0)
[<c05294e8>] (rest_init+0x0/0xe0)
[<c0008958>] (start_kernel+0x0/0x314)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoBluetooth: Remove useless access to the socket
Vinicius Costa Gomes [Sat, 18 Jun 2011 01:46:27 +0000 (22:46 -0300)]
Bluetooth: Remove useless access to the socket

We already have access to the chan, we don't have to access the
socket to get its imtu.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoBluetooth: Fix crash when setting a LE socket to ready
Vinicius Costa Gomes [Sat, 18 Jun 2011 01:46:26 +0000 (22:46 -0300)]
Bluetooth: Fix crash when setting a LE socket to ready

We should not try to do any other type of configuration for
LE links when they become ready.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Mon, 20 Jun 2011 19:28:44 +0000 (15:28 -0400)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6

12 years agortlwifi: include mac80211.h from core.h
Kalle Valo [Mon, 13 Jun 2011 22:35:04 +0000 (01:35 +0300)]
rtlwifi: include mac80211.h from core.h

core.h references ieee80211_ops but doesn't include mac80211.h, which issues
a warning once mac80211-compat.h is taken into use.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agozd1211rw: include mac80211.h from zd_chip.h
Kalle Valo [Mon, 13 Jun 2011 22:34:57 +0000 (01:34 +0300)]
zd1211rw: include mac80211.h from zd_chip.h

zd_chip.h contains one function with a pointer to ieee80211_hw but doesn't
include mac80211.h. As a temporary solution include mac80211.h to avoid
a warning.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: fix stop/wake queue hacks
Kalle Valo [Mon, 13 Jun 2011 22:34:50 +0000 (01:34 +0300)]
iwlwifi: fix stop/wake queue hacks

The hacks break once mac80211-compat.h is taken into use. Fix it by adding
an ifdef check.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: fix stop/wake queue hacks
Kalle Valo [Mon, 13 Jun 2011 22:34:38 +0000 (01:34 +0300)]
iwlegacy: fix stop/wake queue hacks

The hacks break once mac80211-compat.h is taken into use. Fix it by adding
an ifdef check.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove incorrect define
Wey-Yi Guy [Tue, 14 Jun 2011 22:23:40 +0000 (15:23 -0700)]
iwlagn: remove incorrect define

Remove unused and incorrect EEPROM define

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: merge duplicate code into single function
Wey-Yi Guy [Tue, 14 Jun 2011 22:23:39 +0000 (15:23 -0700)]
iwlagn: merge duplicate code into single function

Same operation needed by multiple devices, move to single function.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: code alignment
Wey-Yi Guy [Tue, 14 Jun 2011 20:00:07 +0000 (13:00 -0700)]
iwlagn: code alignment

Code alignment, no functional changes.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: add offset define for subsystem id
Wey-Yi Guy [Mon, 13 Jun 2011 22:34:25 +0000 (15:34 -0700)]
iwlagn: add offset define for subsystem id

Add offset define for subsystem id in EEPROM

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: Add power_level module parameter
Wey-Yi Guy [Sat, 11 Jun 2011 17:00:06 +0000 (10:00 -0700)]
iwlagn: Add power_level module parameter

Add power_level module parameter to set the default power save level.
Power save level has range from 1 - 5, default power save level is 1.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: add power_save module parameter
Wey-Yi Guy [Sat, 11 Jun 2011 17:00:05 +0000 (10:00 -0700)]
iwlagn: add power_save module parameter

Add power_save module parameter to enable power management if needed
Default power management is disabled.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: store the irq number to iwl_bus just like dev
Emmanuel Grumbach [Sat, 18 Jun 2011 15:21:12 +0000 (08:21 -0700)]
iwlagn: store the irq number to iwl_bus just like dev

Since the irq number is just an unsigned int, store it inside iwl_bus
instead of calling the get_irq ops every time it is needed.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: warn about nested SYNC commands
Emmanuel Grumbach [Thu, 9 Jun 2011 12:48:36 +0000 (05:48 -0700)]
iwlagn: warn about nested SYNC commands

Since there is no protection around SYNC host command mechanism, at least WARN
when collision happens between two SYNC host comamnds. I am not sure there is a
real  issue (beyond the HCMD_ACTIVE flag maintenance) with having two SYNC host
commands at the same time, but at least now, we will know about it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: fix misplaced bracket
Emmanuel Grumbach [Thu, 9 Jun 2011 09:55:55 +0000 (02:55 -0700)]
iwlagn: fix misplaced bracket

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: waterfall the bus level if prepare card failed
Emmanuel Grumbach [Thu, 9 Jun 2011 09:55:54 +0000 (02:55 -0700)]
iwlagn: waterfall the bus level if prepare card failed

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: finally kill the pointer to pci_dev from iwl-dev.h
Emmanuel Grumbach [Tue, 31 May 2011 07:07:00 +0000 (10:07 +0300)]
iwlagn: finally kill the pointer to pci_dev from iwl-dev.h

All pci related stuff is in iwl-pci.c.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: add a get_irq method to iwl_bus_ops and use it
Emmanuel Grumbach [Fri, 10 Jun 2011 18:30:30 +0000 (11:30 -0700)]
iwlagn: add a get_irq method to iwl_bus_ops and use it

In order to remove a few more dereference to priv->pdev that will be killed
[Asoon, there is now a method to get the IRQ number.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: don't read the PCI_REVISION_ID from iwl-agn.c
Emmanuel Grumbach [Tue, 31 May 2011 06:58:18 +0000 (09:58 +0300)]
iwlagn: don't read the PCI_REVISION_ID from iwl-agn.c

The PCI_REVISION_ID is read and printed in iwl_pci_probe anyway using pr_info

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: add a method to get the HW ID description as a string to iwl_bus_ops
Emmanuel Grumbach [Fri, 10 Jun 2011 18:28:56 +0000 (11:28 -0700)]
iwlagn: add a method to get the HW ID description as a string to iwl_bus_ops

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: move PCI power related functions to the PCI layer
Wey-Yi Guy [Fri, 10 Jun 2011 18:23:36 +0000 (11:23 -0700)]
iwlagn: move PCI power related functions to the PCI layer

Continue to popule the PCI layer and the iwl_bus_ops with the power related
stuff.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: don't use the PCI wrappers for DMA operation
Emmanuel Grumbach [Sat, 18 Jun 2011 15:12:57 +0000 (08:12 -0700)]
iwlagn: don't use the PCI wrappers for DMA operation

Get a pointer to the struct device during probe and get the rid of all the PCI
specific DMA wrappers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: move PCI related operations from probe and remove to PCI layer
Emmanuel Grumbach [Tue, 31 May 2011 06:07:00 +0000 (09:07 +0300)]
iwlagn: move PCI related operations from probe and remove to PCI layer

Since we have now a PCI layer, all the init and deinit code that is PCI
related should move to there.

Also move the IO functions: read8/read32/write32. They need hw_base which
is killed from priv.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: add get_dev to iwl_bus_ops
Emmanuel Grumbach [Tue, 31 May 2011 05:52:10 +0000 (08:52 +0300)]
iwlagn: add get_dev to iwl_bus_ops

Bus specific layer must know how to return the struct device* of the device.
Implement that as a callback of iwl_bus_ops and use that callback instead of
using the priv->pdev pointer which is meant to disappear soon.

Since the struct device * is needed in hot path, iwl_bus holds a pointer to it
instead of calling get_dev all the time.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: introduce iwl_bus and iwl_bus_ops
Emmanuel Grumbach [Tue, 31 May 2011 05:22:30 +0000 (08:22 +0300)]
iwlagn: introduce iwl_bus and iwl_bus_ops

iwl_bus will represent a bus, and iwl_bus_ops all the operations that can be
done on this bus.
For the moment only set_prv_data is implemented. More to come...

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: remove uneeded include to pci.h and dma_mapping.h from a few files
Emmanuel Grumbach [Mon, 30 May 2011 04:36:49 +0000 (07:36 +0300)]
iwlagn: remove uneeded include to pci.h and dma_mapping.h from a few files

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlagn: add a iwl_pci.[ch] files that will contain all PCI specific code
Emmanuel Grumbach [Tue, 24 May 2011 08:39:02 +0000 (11:39 +0300)]
iwlagn: add a iwl_pci.[ch] files that will contain all PCI specific code

Move some PCI functionality to the new iwl_pci.[ch] files:
* the PCI_DEVICE_TABLE
* the pci_driver struct definition
* the PCI probe / remove functions
* the PCI suspend / resume functions

All these functions are now split: the trigger comes from the PCI layer which
calls to the bus generic code located in the other files.

This is the beginning only. There are still a lot of PCI related code needs
to be gathered.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>