Commit graph

221960 commits

Author SHA1 Message Date
Bruno Randolf
15d9675321 mac80211: Add antenna configuration
Allow antenna configuration by calling driver's function for it.

We disallow antenna configuration if the wiphy is already running, mainly to
make life easier for 802.11n drivers which need to recalculate HT capabilites.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:05 -05:00
Bruno Randolf
afe0cbf875 cfg80211: Add nl80211 antenna configuration
Allow setting of TX and RX antennas configuration via nl80211.

The antenna configuration is defined as a bitmap of allowed antennas to use.
This API can be used to mask out antennas which are not attached or should not
be used for other reasons like regulatory concerns or special setups.

Separate bitmaps are used for RX and TX to allow configuring different antennas
for receiving and transmitting. Each bitmap is 32 bit long, each bit
representing one antenna, starting with antenna 1 at the first bit. If an
antenna bit is set, this means the driver is allowed to use this antenna for RX
or TX respectively; if the bit is not set the hardware is not allowed to use
this antenna.

Using bitmaps has the benefit of allowing for a flexible configuration
interface which can support many different configurations and which can be used
for 802.11n as well as non-802.11n devices. Instead of relying on some hardware
specific assumptions, drivers can use this information to know which antennas
are actually attached to the system and derive their capabilities based on
that.

802.11n devices should enable or disable chains, based on which antennas are
present (If all antennas belonging to a particular chain are disabled, the
entire chain should be disabled). HT capabilities (like STBC, TX Beamforming,
Antenna selection) should be calculated based on the available chains after
applying the antenna masks. Should a 802.11n device have diversity antennas
attached to one of their chains, diversity can be enabled or disabled based on
the antenna information.

Non-802.11n drivers can use the antenna masks to select RX and TX antennas and
to enable or disable antenna diversity.

While covering chainmasks for 802.11n and the standard "legacy" modes "fixed
antenna 1", "fixed antenna 2" and "diversity" this API also allows more rare,
but useful configurations as follows:

1) Send on antenna 1, receive on antenna 2 (or vice versa). This can be used to
have a low gain antenna for TX in order to keep within the regulatory
constraints and a high gain antenna for RX in order to receive weaker signals
("speak softly, but listen harder"). This can be useful for building long-shot
outdoor links. Another usage of this setup is having a low-noise pre-amplifier
on antenna 1 and a power amplifier on the other antenna. This way transmit
noise is mostly kept out of the low noise receive channel.
(This would be bitmaps: tx 1 rx 2).

2) Another similar setup is: Use RX diversity on both antennas, but always send
on antenna 1. Again that would allow us to benefit from a higher gain RX
antenna, while staying within the legal limits.
(This would be: tx 0 rx 3).

3) And finally there can be special experimental setups in research and
development even with pre 802.11n hardware where more than 2 antennas are
available. It's good to keep the API simple, yet flexible.

Signed-off-by: Bruno Randolf <br1@einfach.org>

--
v7:	Made bitmasks 32 bit wide and rebased to latest wireless-testing.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:05 -05:00
Joe Perches
0e67d6cb75 drivers/net/wireless/b43legacy/main.c: Use printf extension %pV
Using %pV reduces the number of printk calls and
eliminates any possible message interleaving from
other printk calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:05 -05:00
Joe Perches
5b736d42bc drivers/net/wireless/b43/main.c: Use printf extension %pV
Using %pV reduces the number of printk calls and
eliminates any possible message interleaving from
other printk calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:04 -05:00
Joe Perches
7e559ec31c drivers/net/wireless/ath/debug.c: Use printf extension %pV
Using %pV reduces the number of printk calls and
eliminates any possible message interleaving from
other printk calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:04 -05:00
Jussi Kivilinna
5cb56af29b rndis_wlan: workaround poor scanning with BCM4320a
BCM4320a devices seem to sometimes do scanning pretty poorly. This can be
workaround by issuing new scan every second, while not yet connected. By this
new scanning method device catches beacons much faster. Fixes bug #20822.

Reported-by: Luís Picciochi <Pitxyoki@gmail.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:04 -05:00
Jussi Kivilinna
b5257c952d rndis_wlan: workaround device not returning bss for currently connected AP
BCM4320a devices do not return bss for currently connected AP in bss-list,
althought this is required by NDIS specs. Missing bss leads to warning at
net/wireless/sme.c:__cfg80211_connect_result(), WARN_ON(!bss).

Workaround this by crafting bss manually with information we can read from
device. Workaround is only used when device bss-list does not return current
bss, and so is only used with BCM4320a devices and not newer BCM4320b ones.

Fixes bug #20152.

Reported-by: Luís Picciochi <Pitxyoki@gmail.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:04 -05:00
Arik Nemtsov
f23a478075 mac80211: support hardware TX fragmentation offload
The lower driver is notified when the fragmentation threshold changes
and upon a reconfig of the interface.

If the driver supports hardware TX fragmentation, don't fragment
packets in the stack.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:04 -05:00
Rafał Miłecki
ca4a083191 ssb: return -ENOMEM on alloc fail (instead of CRC check's result)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:03 -05:00
Rafał Miłecki
54435f9ec8 ssb: workarounds: be verbose about hacking SPROM revision, don't duplicate code
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:03 -05:00
Brian Cavagnolo
d1f9e41d1d mwl8k: use const struct fw pointers throughout
This eliminates compiler warnings by doing things how the
firmware class expects.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:03 -05:00
Brian Cavagnolo
9902047100 mwl8k: make initial firmware load asynchronous
Introduce a firmware loading state machine to manage the process
of loading firmware asynchronously and completing initialization
upon success.  The state machine attempts to load the preferred
firmware image.  If that fails, and if an alternative firmware
image is available, it will attempt to load that one.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:03 -05:00
Brian Cavagnolo
952a0e963f mwl8k: add API version checking for AP firmware
The AP firmware specifies an API version in the GET_HW_SPEC
command response.  Currently, the driver only supports AP
firmware for the 8366, and only supports API v1.  In the future,
if higher API version firmwares emerge (possibly for different
chips), different ops can be selected based on the reported API
version.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:03 -05:00
Brian Cavagnolo
0863ade8d6 mwl8k: choose proper firmware image as directed by user
The mwl8k can operate in AP or STA mode, depending on the
firmware image that is loaded.  By default, STA firmware is
loaded.  Allow the user to override this default mode at
module load time.  This saves an unnecessary firmware reload
for users only interested in AP mode.

Also, the firmware image can be swapped to meet the user's
add_interface request.  For example, suppose the STA
firmware is loaded, no STA interface has been added, and the
user adds an AP interface.  In this case, the AP firmware
will be loaded to meet the request.

Based on contributions from Pradeep Nemavat <pnemavat@marvell.com>,
Yogesh Powar <yogeshp@marvell.com>, and
Lennert Buytenhek <buytenh@wantstofly.org>.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:03 -05:00
Brian Cavagnolo
3cc7772c0a mwl8k: factor out firmware loading and hw init code
This is in preparation for supporting different fw images for
different interface types, and for supporting asynchronous
firmware loading.

Based on a patch from Pradeep Nemavat <pnemavat@marvell.com>
and Yogesh Powar <yogeshp@marvell.com>

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:02 -05:00
Nishant Sarmukadam
41fdf0974d mwl8k: rf_tx_power cmd not supported by AP firmware APIv1
APIv1 AP firmware does not support the RF_TX_POWER command.  It
supports the similar TX_POWER command.

Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:02 -05:00
Brian Cavagnolo
a1fe24b0fd mwl8k: revert unnecessary modification of tx descriptor
This reverts change 783391c443728febc669e40597193308460e7b4f.
The stabilized AP v1 firmware uses the same tx descriptor as
the STA firmware.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:02 -05:00
Deepak Saxena
ae63a33ec9 libertas: EHS_REMOVE_WAKEUP is not always supported
Certain firmware versions, particularly the 8388 found on the XO-1,
do not support the EHS_REMOVE_WAKEUP command that is used to disable
WOL. Sending this command to the card will return a failure that
would get propagated up the stack and cause suspend to fail.

Instead, fall back to an all-zero wakeup mask.

This fixes http://dev.laptop.org/ticket/9967

Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: Daniel Drake <dsd@laptop.org>
[includes fixups by Paul Fox]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:02 -05:00
Daniel Drake
cf43298864 libertas: don't block usb8388 suspend if no wakeup conditions are set
This hunk added by commit 66fceb69b7 seems erroneous. We don't want to
prevent suspend of the whole system if no wakeup params are set.

In the case of the usb8388 we do want to keep the card powered up even
if there are no wakeup params. This is because it will continue acting
as a mesh node.

If the mesh is disabled, it would indeed make more sense to power down
the card during suspend, as the equivalent hunk does for the SD interface.
But that's a separate task; for now just restore the previous behaviour.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 16:37:02 -05:00
Luis R. Rodriguez
9236d838c9 cfg80211: fix extension channel checks to initiate communication
When operating in a mode that initiates communication and using
HT40 we should fail if we cannot use both primary and secondary
channels to initiate communication. Our current ht40 allowmap
only covers STA mode of operation, for beaconing modes we need
a check on the fly as the mode of operation is dynamic and
there other flags other than disable which we should read
to check if we can initiate communication.

Do not allow for initiating communication if our secondary HT40
channel has is either disabled, has a passive scan flag, a
no-ibss flag or is a radar channel. Userspace now has similar
checks but this is also needed in-kernel.

Reported-by: Jouni Malinen <jouni.malinen@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 15:59:39 -05:00
Rajkumar Manoharan
b5261cf4f3 ath9k_hw: Set proper eeprom offset for AR9287 HTC devices
AR9287 based PCI & USB devices are differed in eeprom start offset.
So set proper the offset for HTC devices to read nvram correctly.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 15:59:39 -05:00
Rajkumar Manoharan
7cbf2611da ath9k_htc: Add new devices into AR7010
Treat new PIDs (0xA704, 0x1200) as AR7010 devices.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 15:59:39 -05:00
Rajkumar Manoharan
32b089558c ath9k_htc: Update usb device ID list
Added new VID/PIDs into supported devices list

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 15:59:38 -05:00
Vivek Natarajan
e8364bb8d0 ath9k: Remove pm_qos request after hw unregister.
Update pm_qos before removing it in deinit_device to prevent this
warning:

pm_qos_update_request() called for unknown object.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-16 15:59:38 -05:00
Wey-Yi Guy
9e2e7422d0 iwlwifi: set STATUS_READY before commit_rxon
Have the STATUS_READY bit set before commit_rxon call to avoid fail
to send tx power to uCode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:47:35 -08:00
Shanyu Zhao
6163a3735a iwlagn: check change before commit RXON cmd
When setting rxon chain and filter, no need to commit RXON when the
chain flag is not changed. This reduces the number of RXON commands
we send down to uCode.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:47:22 -08:00
Wey-Yi Guy
21a5b3c6b1 iwlagn: use SKU information in the EEPROM
EEPROM contain the SKU information for the device, use it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:47:10 -08:00
Shanyu Zhao
f4115d4659 iwlagn: update QoS before commit associated RXON
RXON command without association bit can clear the QoS info in the
uCode. Therefore, before sending the associated RXON, we need to
send the QoS command just in case.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:46:58 -08:00
Johannes Berg
efe54db823 iwlagn: fix PAN slot timing wrt. DTIM
When the DTIM is not 1, then the slot timing is in
some cases required to be calclulated based on the
DTIM interval instead of the beacon interval, fix
that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:46:49 -08:00
Johannes Berg
2b5f7a679c iwlagn: reprogram AP STA after assoc
Instead of unconditionally sending unassoc RXON,
before any assoc RXON, re-send only the AP STA
entry which is required after the BSSID has been
programmed into the device to set up internal
filters in the microcode properly.

This fixes some issues that we correlated with
sending a lot of RXON commands to the device.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:46:35 -08:00
Johannes Berg
893654de3f iwlagn: avoid crash if vif is not assigned
For reasons that aren't entirely clear to me,
we sometimes get here during hardware reset
without the interface being set. Don't crash,
but keep a warning.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:46:26 -08:00
Johannes Berg
cfa1da7e91 iwlagn: fix PAN queues
Currently, when a PAN queue needs to be
stopped, we erroneously stop queue number 5
(for example) with mac80211 -- which doesn't
even exist!

To avoid that problem, recalculate the swq_id
for all queues when setting up the queues,
and don't use the default identity mapping
that is acceptable for devices which don't
support PAN.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:46:18 -08:00
Johannes Berg
ea9b307f8e iwlwifi: always build swq_id as virtual queue ID
Previously, we used the swq_id's mechanism
to have AC and HW queue different only for
aggregation queues. To be able to fix a bug
with iPAN simply always build the swq_id as
ac | (hwq << 2) and remove the flag bit.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:46:00 -08:00
Johannes Berg
549a04e092 iwlwifi: pass txq to wake/stop queue
Instead of passing the txq->swq_id, pass the
txq struct directly to make sure that in the
future nobody will pass an invalid number.
Only three places actually change from using
the txq_id or the skb's queue_mapping to now
using txq->swq_id as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:45:49 -08:00
Johannes Berg
4bea9b9902 iwlagn: remove a bogus AGG_OFF check
Even if this check were to happen, using the
txq_id here (which is a HW queue) would lead
to confusion in mac80211. Luckily, it doesn't
seem like this can ever happen.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:45:35 -08:00
Johannes Berg
8d56396ac3 iwlagn: remove unused variable swq_id
Simply remove the unused variable swq_id.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:44:57 -08:00
Johannes Berg
76f379cec6 iwlagn: fix some naming regarding FIFOs
Some variables are misnamed in the FIFO setup
code, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:44:41 -08:00
Wey-Yi Guy
564b344c10 iwlwifi: change default led mode for different devices
Set the default led mode for different devices.

For the newer devices such as 6000g2a, 6000g2b and newer,
the default led mode is On/Off instead of blinking.

The led_mode still can be control through module parameter
  0: system default
  1: On/Off
  2: blinking

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:44:24 -08:00
Wey-Yi Guy
05433df23c iwlagn: change default ACK/CTS MASK setting for WiFi/BT coex
Change the default BT_KILL_ACK_MASK and BT_KILL_CTS_MASK for BT coex

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:44:10 -08:00
Wey-Yi Guy
66e863a527 iwlagn: support dynamic aggregation for BT coex
Use dynamic aggregation threshold if bt traffic load is high
to reduce the impact on aggregated frame.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:44:00 -08:00
Wey-Yi Guy
95a5ede3ee iwlagn: set dynamic aggregation threshold for BT
Setting the max/min/def value for BT dynamic aggregation threshold.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:43:52 -08:00
Wey-Yi Guy
8829c9e2ec iwlagn: used frame count info in compressed ba packet
For newer devices, uCode provide both "number of frames sent"
and "number of frames acked" information inside the compressed_ba
packet. So instead of figure the success/failure information through
the bitmap, use those information which is much betrer approach.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16 07:43:42 -08:00
Christian Lamparter
dfa31fef5d carl9170: fix usb anchor wait timeout
usb_wait_anchor_empty_timeout's @timeout
wants milliseconds and not jiffies.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 15:03:13 -05:00
Jussi Kivilinna
309075cf08 cfg80211: fix WIPHY_FLAG_IBSS_RSN bit
WIPHY_FLAG_IBSS_RSN is BIT(7) as is WIPHY_FLAG_CONTROL_PORT_PROTOCOL. Change
to BIT(8).

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 15:00:42 -05:00
Arnd Hannemann
62370e2b93 b43legacy: Fix compile on ARM architecture
When b43legacy is compiled on the arm platform, the following errors are seen:

  CC [M]  drivers/net/wireless/b43legacy/xmit.o
In file included from include/net/dst.h:11,
from drivers/net/wireless/b43legacy/xmit.c:31:
include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__'
   before '____cacheline_aligned_in_smp'
include/net/dst_ops.h: In function 'dst_entries_get_fast':
include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_get_slow':
include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_add':
include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_init':
include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_destroy':
include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
make[3]: *** [drivers/net/wireless/b43legacy] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

The cause is a missing include of <linux/cache.h>, which is present for
i386 and x86_64 architectures, but not for arm.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 15:00:42 -05:00
Christian Lamparter
b1d771ee33 carl9170: use generic sign_extend32
This patch replaces the handcrafted
sign extension cruft with a generic
bitop function.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:27:05 -05:00
Andreas Herrmann
7919a57bc6 bitops: Provide generic sign_extend32 function
This patch moves code out from wireless drivers where two different
functions are defined in three code locations for the same purpose and
provides a common function to sign extend a 32-bit value.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:27:04 -05:00
Grazvydas Ignotas
e4b3fdb800 wl1251: use wl12xx_platform_data to pass data
Make use the newly added method to pass platform data for wl1251 too.
This allows to eliminate some redundant code.

Cc: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:27:02 -05:00
Grazvydas Ignotas
1d4b89f297 wl1251: add runtime PM support for SDIO
Add runtime PM support, similar to how it's done for wl1271.
This allows to power down the card when the driver is loaded but
network is not in use.

Cc: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:27:01 -05:00
Grazvydas Ignotas
cb7bbc7a55 wl1251: add power callback to wl1251_if_operations
Call interface specific power callback before calling board specific
one. Also allow that callback to fail. This is how it's done for
wl1271 and will be used for runtime_pm support.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15 13:27:00 -05:00