Commit graph

35 commits

Author SHA1 Message Date
Wey-Yi Guy 15b3f3b006 iwlagn: set smps mode after assoc for 1000 device
For some timing reason, 1000 device having problem to kick-in to aggregation
without sending rxon assoc command. This is a W/A until find the real reason

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-03 15:16:36 -04:00
Johannes Berg 2b9253d2a0 iwlagn: fix dual-mode RXON
The PAN context has three states: disabled, disassociated
 and associated. It seems that wasn't quite as much of an
 issue in previous versions of the microcode, but now we
 really have to use all the three states properly. So add
 code to switch accordingly.

Additionally, PAN parameters need to be sent differently
and the timing for PAN RXON needs to be inbetween.

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>
2011-06-01 15:36:32 -04:00
Wey-Yi Guy 891db88112 iwlagn: send tx power command if defer cause by RXON not match
During channge channel, tx power will not send to uCode, the tx power command
should send after scan complete. but should also can send after RXON command.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01 15:36:31 -04:00
Wey-Yi Guy 6dc0c7fc7c iwlagn: remove unused old_assoc parameter
old_assoc not used, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-05-13 12:03:17 -07:00
Wey-Yi Guy 3083d03c21 iwlagn: alwasy send RXON with disassociate falge before associate
Before send the RXON command with associated flag set, always do disassociate
first to make sure uCode is in the correct state.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-05-13 12:02:49 -07:00
Don Fry 9d143e9a0d iwlagn: mod param cleanup
All agn devices use the same module parameter structure.  Delete the
indirection and access the structure diretly.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-30 08:56:45 -07:00
Wey-Yi Guy c1821c95c1 iwlagn: connect and disconnect sequence for RXON
No functional changes, separate the connect and disconnect sequences in
RXON commit function, easier to read and understand.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-30 08:40:04 -07:00
Wey-Yi Guy 89e746b244 iwlagn: remove 5000 from rxon_assoc structure
The data structure is shared by all _agn devices, remove the reference to 5000

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-30 08:39:53 -07:00
Wey-Yi Guy c3f6e9cff9 iwlagn: make rxon_assoc static function
Move rxon_assoc to static function from ops

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-30 08:39:44 -07:00
John W. Linville 429576b97c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2011-04-26 15:39:10 -04:00
Johannes Berg a8674a1efc iwlagn: make iwlagn_wait_notification return error code
We're unlikely to care about the actual time spent
waiting, so make the function return an error code
which is less error prone in coding new uses.

Also, while at it, mark __must_check.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-22 10:02:55 -07:00
Johannes Berg 09f18afe76 iwlagn: extend notification wait function
A notification wait function is called with the
command, but currently has no way of passing
data back to the caller -- fix that by adding a
void pointer to the function that can be used
between the caller and the function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-22 10:02:47 -07:00
Daniel Halperin 7caa2316bf iwlwifi: fix frame injection for HT channels
For some reason, sending QoS configuration causes transmission to stop
after a single frame on HT channels when not associated. Removing the
extra QoS configuration has no effect on station mode, and fixes
injection mode.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-18 08:15:26 -07:00
Garen Tamrazian 68b993118f iwlagn: fix radar frame rejection
The microcode may sometimes reject TX frames when
on a radar channel even after we associated as it
clears information during association and needs to
receive a new beacon before allowing that channel
again. This manifests itself as a TX status value
of TX_STATUS_FAIL_PASSIVE_NO_RX. So in this case,
stop the corresponding queue and give the frame
back to mac80211 for retransmission. We start the
queue again when a beacon from the AP is received
which will make the regulatory enforcement in the
device allow transmitting again.

Signed-off-by: Garen Tamrazian <garenx.tamrazian@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-08 07:59:37 -07:00
Wey-Yi Guy 901069c714 iwlagn: change Copyright to 2011
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:37 -04:00
Johannes Berg 850bedcc10 iwlagn: fix iwlagn_check_needed_chains
This function was intended to calculate the
number of RX chains needed, but could only
work where the AP's streams were asymmetric,
i.e. 2 TX and 3 RX or similar. In the case
where IEEE80211_HT_MCS_TX_RX_DIFF was not
set, this function would calculate the wrong
information.

Additionally, mac80211 didn't pass through
the required values at all, so it couldn't
work anyway.

Rewrite the logic in this function and add
appropriate comments to make it readable.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-25 15:33:39 -05:00
Stanislaw Gruszka f844a709a7 iwlwifi: do not set tx power when channel is changing
Mac80211 can request for tx power and channel change in one ->config
call. If that happens, *_send_tx_power functions will try to setup tx
power for old channel, what can be not correct because we already change
the band. I.e  error  "Failed to get channel info for channel 140 [0]",
can be printed frequently when operating in software scanning mode.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-28 15:46:24 -05:00
Johannes Berg 9b9190d968 iwlwifi: implement remain-on-channel
For device supporting PAN/P2P, use the PAN
context to implement the remain-on-channel
operation using device offloads so that the
filters in the device will be programmed
correctly -- otherwise we cannot receive
any probe request frames during off-channel
periods.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-01-21 15:50:58 -08:00
Wey-Yi Guy 5ed540aecc iwlwifi: use mac80211 throughput trigger
Instead of keeping track of LED blink speed
in the driver, use the new mac80211 trigger
and link it up with an LED classdev that we
now register. This also allows users more
flexibility in how they want to have the LED
blink or not.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-21 15:26:39 -08:00
Johannes Berg 2a1a78d240 iwlagn: return error if PAN disable timeout
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>
2011-01-21 15:32:21 -05:00
Johannes Berg 311dce71b6 iwlagn: properly wait for PAN disable
Previously I hacked this with an msleep(300)
which was fine since we never had longer PAN
time slots, but now that we will have them I
need to fix that. Use the new notification
wait support to properly wait for the WIPAN
deactivation complete signal from the ucode.

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>
2011-01-21 15:32:21 -05:00
Wey-Yi Guy 14a085e770 iwlagn: fix witespace damage
patch "iwlagn: check ready in iwlagn_bss_info_changed()" introduce
whitespace, fix it

please merge with the previous patch

Reported 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>
2010-12-15 17:03:55 -05:00
Shanyu Zhao ae0b693c12 iwlagn: check ready in iwlagn_bss_info_changed()
In function iwlagn_bss_info_changed(), we need to check if the driver
is ready before doing real work. Also, the previously put WARN() is
removed because the vif is not guaranteed to be valid. uCode restart
routine will clear the vif.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-12-13 15:51:18 -08:00
Wey-Yi Guy adb90a0037 iwlwifi: check for STATUS_EXIT_PENDING when send RXON command
If driver is on the way down, there is no need to send
RXON to uCode, check the condition before continuous the process.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-12-02 08:35:23 -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 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 b2769b84d8 iwlagn: fix RXON HT
When the HT information is changed due to
BSS changes (like legacy stations joining)
we need to recalculate HT RXON parameters.

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>
2010-11-15 13:26:55 -05:00
Johannes Berg 8da8e62851 iwlagn: re-enable calibration
During the RXON rewrite, this code got lost.
When we've just associated, we need to enable
all calibrations and see if some were already
finished. Add back the missing code.

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>
2010-11-15 13:26:53 -05:00
Johannes Berg 52d980c013 iwlagn: fix RXON issues
The RXON rework resulted in a massive loss of
throughput because we weren't programming the
device completely correctly -- the BSSID has
to be programmed into the device before the
AP station is uploaded. To fix this, simply
always send the unassoc RXON, i.e. even when
it was already unassoc so that the BSSID and
some other parameters are updated properly.

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>
2010-11-15 13:26:52 -05:00
Johannes Berg 2e1fea43aa iwlagn: fix needed chains calculation
Garen noticed that this was wrong. Fix
the calibration -- default to multiple
chains and fall back to single where
possible.

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>
2010-11-15 13:26:51 -05:00
Wey-Yi Guy 35a6eb3652 iwlwifi: resending QoS command when HT changes
"mac80211: Fix WMM driver queue configuration"
inadvertedly broke iwlwifi, because now mac80211
configures the QoS settings before assoc, and
therefore before HT. Thus, iwlwifi no longer told
the device about the HT setting, which it needs
to -- and thus throughput went down a lot. Fix
this by resending the QoS command to the device
not only when QoS/WMM settings change, but also
when HT changes.

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>
2010-11-15 13:26:49 -05:00
Johannes Berg ae79d23d0b iwlagn: fix non-5000+ build
When building 4965 without 5000+ there were a
lot of build errors due to functions being used
that weren't even compiled in. To fix this move
some code around and only compile the HCMD code
for 5000+ series as it's not used for 4965.

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>
2010-11-15 13:26:43 -05:00
Johannes Berg bd50a8ab9f iwlwifi: fix IBSS beaconing
My previous patch to clean up all RXON handling
inadvertently broke IBSS because it failed to
take into account that unlike in AP mode, IBSS
requires beacons to be sent only after setting
the RXON assoc.

Fix this, clean up the code a bit, improve the
error checking around this, and also react to
beacon changes in IBSS mode from mac80211.

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>
2010-11-15 13:24:54 -05:00
Johannes Berg 2295c66b68 iwlagn: new RXON processing for modern devices
In order to simplify the flow, and make new
enhancements easier, separate out the RXON
processing for modern AGN (5000 and newer)
from RXON processing for the older 3945 and
4965 devices. Avoid changing these old ones
to avoid regressions and move their code to
a new file (iwl-legacy.c). 4965 gets the
commit_rxon that used to be common for all
AGN devices, but with removed PAN support.

The new RXON processing is more central and
does more work in committing, so that it is
easier to follow.

To make it more evident what is split out
for legacy, split the necessary operations
for that into a new struct iwl_legacy_ops.
Those parts that still exist in the new AGN
code don't need to be parametrized.

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>
2010-11-15 13:24:53 -05:00