Wey-Yi Guy [Wed, 8 Apr 2009 18:39:27 +0000 (11:39 -0700)]
iwlwifi: Display decoded rate/mcs information
This patch adding MCS information in rate_scale_table, it help for
debugging rate scaling algorithm, easy to understand what is the current
rate scale table and matching modulation, plus the last mcs used for tx.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 8 Apr 2009 10:54:41 +0000 (12:54 +0200)]
mac80211: update injection documentation
We don't currently support antenna or rate setting, so remove
that. Also update the link -- the current one is dead and the
wiki can be kept updated easier.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 8 Apr 2009 00:55:34 +0000 (02:55 +0200)]
mac80211: re-upload keys only after telling driver about association
In the normal WPA or RSN case keys are only configured after
associating, so we should do that in that order when resuming
as well. It shouldn't really matter since we do not send any
data at either point, but iwlwifi prefers it this way and it
does seem more natural.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Use RxPD->pkt_ptr to locate eth803 header in the packet
received since SD8688/v10 firmware allows a gap between
RxPD and eth803 header.
Set SDIO block size to 256 for CMD53.
The maximum block size for SD8688 WLAN function is set
to 512 in TPLFE_MAX_BLK_SIZE. But using 512 as block size
results upto 2K bytes data (4 blocks) being transferred
and causes buffer overflow in firmware.
Both changes above are backward compatible with earlier
firmware versions for SD8385/SD8686.
The SDIO_DEVICE_IDs for SD8688 chip are added in
include/linux/mmc/sdio_ids.h
Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Max Filippov [Sun, 5 Apr 2009 21:03:09 +0000 (01:03 +0400)]
p54spi: get rid of busy-wait loops
p54spi_wakeup and p54spi_tx_frame used busy-waiting loop
to poll for 'ready' bits in SPI_ADRS_HOST_INTERRUPTS register.
With this change in place 'WR_READY timeout' messages do not
show anymore.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Anna Neal [Thu, 2 Apr 2009 21:44:09 +0000 (14:44 -0700)]
libertas: increase spi driver thread priority
Currently, the libertas main thread contends with the spi driver thread
in the TX path. To improve throughput, ensure that the driver thread
has higher scheduling priority than the libertas main thread. Do this
by making the libertas spi driver thread a low priority real time
thread.
We measured an average throughput improvement of 13%.
Signed-off-by: Anna Neal <anna@cozybit.com> Signed-off-by: Andrey Yurovsky <andrey@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 2 Apr 2009 18:14:06 +0000 (20:14 +0200)]
cfg80211: add cipher capabilities
This adds the necessary code and fields to let drivers specify
their cipher capabilities and exports them to userspace. Also
update mac80211 to export the ciphers it has.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
cfg80211: send regulatory beacon hint events to userspace
This informs userspace when a change has occured on a world
roaming wiphy's channel which has lifted some restrictions
due to a regulatory beacon hint.
Because this is now sent to userspace through the regulatory
multicast group we remove the debug prints we used to use as
they are no longer necessary.
Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This adds a netlink channel put helper, nl80211_msg_put_channel(),
which we will also make use of later for the beacon hints events.
Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
cfg80211: respect API on orig_flags on channel for beacon hint
As part of our documented API we always respect the orig_flag
settings on a channel. We forgot to follow this for the beacon
hints.
Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Wed, 1 Apr 2009 21:33:25 +0000 (14:33 -0700)]
iwlwifi: add debug messages when start aggregation queue
This patch adding few more debug messages if encounter error when driver
try to start tx aggregation queue. Also change from IWL_ERR to
IWL_DEBUG_HT is the HW legacy queue is empty when driver request to move
to aggregation queue.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Wed, 1 Apr 2009 21:33:24 +0000 (14:33 -0700)]
iwlwifi: adding MIMO3 support in rate scaling
Separated the MIMO tpt matrix into MIMO2 and MIMO3, adding MIMO3 support
in rate scaling algorithm. If the device support 3x3, then utilize all
three antenna (A/B/C) for tx to improve throughput.
Adding rs_switch_to_mimo3() function to allow switch to mimo3 modulation
mode from other modes(legacy/siso/mimo2). Adding rs_move_mimo3_to_other()
function to allow switch from mimo3 modulation mode to either siso or mimo2;
also support toggle between SGI and NGI.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Wed, 1 Apr 2009 21:33:23 +0000 (14:33 -0700)]
iwlwifi: adding triple stream rate support for MIMO3
Adding ht triple_stream_basic_rates for MIMO3 supports
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
When the EEPROM contains weird values for the power levels we have to
fix the interpolation process.
Signed-off-by: Fabio Rossi <rossi.f@inwind.it> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: Report rejected association to user space SME
When using nl80211 association, we need to send association response
with a failure code to user space SME instead of just internally
trying to send out the same (re)association request again couple of
times. This fixes problems in association process getting stuck on a
failure when user space is not notified in any way that something
actually failed.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 31 Mar 2009 10:12:05 +0000 (12:12 +0200)]
cfg80211: introduce scan IE limit attribute
This patch introduces a new attribute for a wiphy that tells
userspace how long the information elements added to a probe
request frame can be at most. It also updates the at76 to
advertise that it cannot support that, and, for now until I
can fix that, iwlwifi too.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Tue, 31 Mar 2009 02:30:30 +0000 (22:30 -0400)]
ath: move more setup code into ath_regd_init
Setup the wiphy regulatory parameters when first initializing the
Atheros regulatory module. We can remove five exported symbols this
way and simplify the driver code for both ath5k and ath9k.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Tue, 31 Mar 2009 02:30:29 +0000 (22:30 -0400)]
atheros: introduce ath module containing common ath5k/ath9k/ar9170 code
This change creates a new module, ath.ko, which includes code that can
be shared between ath5k, ath9k and ar9170. For now, extract most of the ath9k
regulatory code so it can also be used in ath5k.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Tue, 31 Mar 2009 02:30:28 +0000 (22:30 -0400)]
ath9k: pass regd structure directly to regulatory functions
All regulatory information is encapsulated by the ath9k_regulatory
struct, so we can now change all the callers to take that directly
instead of struct ath_hw. This in turn will enable us to move the
regulatory functions to common code also used by ath5k, since both
can use this regulatory struct.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Tue, 31 Mar 2009 02:30:27 +0000 (22:30 -0400)]
ath9k: separate ath9k specific code from ath9k_regd_get_ctl()
Until ath5k and ath9k share common channel structures, they will have
to implement their own get_ctl() function. Split out the portion that
only relies on the current band and reg domain so that it can be common
code.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Fri, 27 Mar 2009 19:45:30 +0000 (12:45 -0700)]
iwlwifi: change check triggering device restart after rfkill change
The STATUS_ALIVE value cannot be used because it is cleared when
interface is brought down and will not be set if rfkill is enabled when
interface is started again. The interface can thus not be brought up if
rfkill was enabled before stopping the interface and disabled after
starting the interface.
Change the test to use priv->is_open instead, this will be set when
interface is started whether rfkill is enabled or not.
Thanks to Helmut Schaa for the suggested fix.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 26 Mar 2009 21:40:01 +0000 (23:40 +0200)]
rndis_wlan: convert get/set mode to cfg80211
Signed-off-by: John W. Linville <linville@tuxdriver.com>
[edit: made rndis_change_virtual_intf static] Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 26 Mar 2009 21:39:53 +0000 (23:39 +0200)]
rndis_wlan: initiate cfg80211 conversion
Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch hopefully finishes the SoftLED code:
- It adds two more LEDs (rx and radio).
(the FW claims it can support up to 16 LEDs,
but I doubt that any vendor put more than 4 on a board)
- update the LEDs in a _delayed_ workqueue.
No one reported any more crashes.
(see: "PATCH] p54: fix race condition in memory management")
So we can stop burning the mm code.
Signed-off-by: Christian Lamparter <chunkeey@web.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch rearrange and regroups most elements in p54_common.
Signed-off-by: Christian Lamparter <chunkeey@web.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Mon, 30 Mar 2009 12:05:29 +0000 (08:05 -0400)]
ath5k: reduce exported channel list
Claiming every available 5 ghz channel has a couple of negative
side-effects: scanning takes a long time, and the channel list
overflows the available buffer space for netlink commands,
resulting in:
$ iw phy phy0 info
command failed: No buffer space available (-105)
This patch adds a modparam so people who want to see all the channels
can do so by passing all_channels=1. By default users will see a
smaller list of channels. This also halves scan time, from 10 seconds
down to less than 5 when using world regulatory.
Changes-licensed-under: 3-Clause-BSD
Signed-off-by: Bob Copeland <me@bobcopeland.com> Reported-by: Simon Farnsworth <simon@farnz.org.uk> Tested-By: Simon Farnsworth <simon@farnz.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 30 Mar 2009 11:23:35 +0000 (13:23 +0200)]
mac80211: move ieee80211_enable_ht function to mlme.c
It really belongs into that file since it is only relevant
for managed mode. Move 1:1, not even whitespace changes,
but make it static and remove from header file.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Mon, 30 Mar 2009 09:58:57 +0000 (15:28 +0530)]
ath9k: Fix bug in determining HT40 mode
This patch fixes a bug in checking for HT40 mode.
The STA's mode can be determined from the cached HT capabilities,
use that and remove the redundant variable 'rc_phy_mode'.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Mon, 30 Mar 2009 09:58:38 +0000 (15:28 +0530)]
ath9k: Cleanup buffer status handling
Using a u32 to store a single flag is overkill.
Use a bool to store whether the buffer is stale or not.
Also, use u8 instead of u32 to store the buffer type.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Mon, 30 Mar 2009 08:47:00 +0000 (14:17 +0530)]
ath9k: No need to abort Rx path when autosleep is enabled.
For chipsets supporting autosleep feature, there is no need to abort
Rx engine since they are capable of automatically going back to sleep
after receiving a packet.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Sat, 28 Mar 2009 19:51:24 +0000 (20:51 +0100)]
rt2x00: Move Move pci_dev specific access to rt2x00pci
pci_dev->irq and pci_name(pci_dev) access should be limited
to rt2x00pci only. This is more generic and allows a rt2x00 pci
driver to be controlled as PCI device but also as platform driver
(needed for rt2800pci SoC support).
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fixes a locking problem which freezes the network core.
The deadlock goes as follows:
- ar9170_op_stop - is called
1. change the state to IDLE
2. > take the MUTEX <
3. cancel_SYNC all pending work, which means
"block until a work_struct's callback has terminated"
=> if filter_config_work was queued it tries to get the MUTEX,
before checking the device state...
Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Fri, 27 Mar 2009 19:59:49 +0000 (21:59 +0200)]
nl80211: Add Michael MIC failure event
Define a new nl80211 event, NL80211_CMD_MICHAEL_MIC_FAILURE, to be
used to notify user space about locally detected Michael MIC failures.
This matches with the MLME-MICHAELMICFAILURE.indication() primitive.
Since we do not actually have TSC in the skb anymore when
mac80211_ev_michael_mic_failure() is called, that function is changed
to take in the TSC as an optional parameter instead of as a
requirement to include the TSC after the hdr field (which we did not
really follow). For now, TSC is not included in the events from
mac80211, but it could be added at some point.
Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Fri, 27 Mar 2009 18:53:56 +0000 (20:53 +0200)]
nl80211: Generate deauth/disassoc event for locally generated frames
Previously, nl80211 mlme events were generated only for received
deauthentication and disassociation frames. We need to do the same for
locally generated ones in order to let applications know that we
disconnected (e.g., when AP does not reply to a probe). Rename the
nl80211 and cfg80211 functions (s/rx_//) to make it clearer that they
are used for both received and locally generated frames.
Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Fri, 27 Mar 2009 18:52:47 +0000 (20:52 +0200)]
nl80211: Require auth type for NL80211_CMD_AUTHENTICATE
NL80211_ATTR_AUTH_TYPE is a required parameter for
NL80211_CMD_AUTHENTICATE. We are currently (by chance) defaulting to
open system authentication if the attribute is not specified. It is
better to just reject the invalid command.
Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 27 Mar 2009 13:14:31 +0000 (14:14 +0100)]
rfkill: remove user_claim stuff
Almost all drivers do not support user_claim, so remove it
completely and always report -EOPNOTSUPP to userspace. Since
userspace cannot really drive rfkill _anyway_ (due to the
odd restrictions imposed by the documentation) having this
code is just pointless.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 30 Mar 2009 09:32:46 +0000 (11:32 +0200)]
rfkill: remove deprecated state constants
I only did superficial review, but these constants are stupid
to have and without proper warnings nobody will review the
code anyway, no amount of shouting will help.
Also fix wimax to use correct states.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 27 Mar 2009 11:40:28 +0000 (12:40 +0100)]
nl80211: validate some input better
This patch changes nl80211 to:
* validate that any IE input is a valid IE (stream)
* move some validation code before locking
* require that a reason code is given for both deauth/disassoc
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Max Filippov [Fri, 27 Mar 2009 04:50:53 +0000 (07:50 +0300)]
p54spi: compensate firmware alignment bug in p54spi_rx
Firmware may insert up to 4 padding bytes after the lmac header,
but it does not amend the size of SPI data transfer.
Such packets has correct data size in header, thus referencing
past the end of allocated skb. Put extra 4 bytes to the end of the
received skb to compensate for this case.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Thu, 26 Mar 2009 17:14:08 +0000 (10:14 -0700)]
iwlwifi: merge and better support of suspend/resume for iwlagn and iwl3945
With mac80211's help to call stop() and start() in mac80211
suspend/resume function, both iwlagn and iwl3945 no longer calling
stop() and start(); remove un-necessary STATUS_IN_SUSPEND bit from both
header files and functions,
Move apm_ops.stop() function into pci_suspend() to ensure
DMA is stopped before go into suspend mode.
iwl3945 has the similar suspend/resume function as iwlagn, so move both
functions to iwlcore to be shared by both drivers.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Max Filippov [Thu, 26 Mar 2009 03:38:25 +0000 (06:38 +0300)]
p54spi: fix p54spi_tx_frame DMA transfer initiation and skb cleanup
p54spi_tx_frame wasn't waiting for HOST_ALLOWED in SPI_ADRS_DMA_WRITE_CTRL.
This resulted in frequent 'WR_READY timeout' on beacon resubmission.
Also don't free skb on error path, as it gets freed on p54spi_wq_tx.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bing Zhao [Wed, 25 Mar 2009 16:51:16 +0000 (09:51 -0700)]
libertas: support mesh for various firmware versions
CMD_MESH_CONFIG command ID and a couple of structure members in TxPD,
RxPD have been changed in firmware version 10.x.y.z and newer.
Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Max Filippov [Wed, 25 Mar 2009 12:45:01 +0000 (13:45 +0100)]
p54spi: fix p54spi_upload_firmware
Instead of firmware itself p54_upload_firmware was sending to the device
content of struct firmware and the following random garbage.
Notice '&' before priv->firmware->data at p54spi_spi_write.
But simple removing of '&' sign triggered BUG_ON at dma_cache_maint.
Thus kmemdup - kfree workaround.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>