Commit Graph

43 Commits (a777c892cea917b6c67c61f8dff47d8caae7b8a1)

Author SHA1 Message Date
Stanislaw Gruszka 883a649b73 iwlegacy: do not nulify il->vif on reset
This il->vif is dereferenced in different part of iwlegacy code, so do
not nullify it. This should fix random crashes observed in companion
with microcode errors i.e. crash in il3945_config_ap().

Additionally this should address also
WARNING: at drivers/net/wireless/iwlegacy/common.c:4656 il_mac_remove_interface
at least one of the possible reasons of that warning.

Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-26 15:07:22 -04:00
David S. Miller 4da0bd7365 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-18 23:29:41 -04:00
Stanislaw Gruszka 210787e82a iwl3945: fix possible il->txq NULL pointer dereference in delayed works
On il3945_down procedure we free tx queue data and nullify il->txq
pointer. After that we drop mutex and then cancel delayed works. There
is possibility, that after drooping mutex and before the cancel, some
delayed work will start and crash while trying to send commands to
the device. For example, here is reported crash in
il3945_bg_reg_txpower_periodic():
https://bugzilla.kernel.org/show_bug.cgi?id=42766#c10

Patch fix problem by adding il->txq check on works that send commands,
hence utilize tx queue.

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12 14:00:16 -04:00
Stanislaw Gruszka bc269a8e27 iwlegacy: s/S_RF_KILL_HW/S_RFKILL/g
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:17 -05:00
Stanislaw Gruszka 775ed8abde iwlegacy: do not grab nic access if rfkill
If rfkill is on il_grab_nic_access() fail and we can not write to the
various registers during stop procedure. Write to those registers
unconditionally instead.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:16 -05:00
Stanislaw Gruszka c37281a076 iwleagcy: fix ident code damage
Using ident is not always good.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:16 -05:00
Stanislaw Gruszka 9ce7b73c76 iwlegacy: improve mac operation debuggability a bit
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:15 -05:00
Stanislaw Gruszka 288f995413 iwlegacy: get rid of tx/rx traffic log
The same data can be gathered using monitor mode.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:15 -05:00
Stanislaw Gruszka 1600b87542 iwlegacy: merge il_lib_ops into il_ops
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:15 -05:00
Stanislaw Gruszka f03ee2a87e iwlegacy: remove il_apm_ops
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:14 -05:00
Stanislaw Gruszka 93b7654ec5 iwlegacy: move debugfs_ops to il_priv
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:13 -05:00
Stanislaw Gruszka a5f16137ab iwlegacy: use writeb,writel,readl directly
That change will save us some CPU cycles at run time. Having
port-based I/O seems to be not possible for PCIe devices.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:12 -05:00
Stanislaw Gruszka 00ea99e1d8 iwlegacy: remove struct il_tx_info
It's just wrapper to sk_buff pointers ...

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:13 -05:00
Stanislaw Gruszka c39ae9fd50 iwlegacy: move ops out of config
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:11 -05:00
Stanislaw Gruszka 8300719603 iwlegacy: get rid of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:11 -05:00
Stanislaw Gruszka 8c9c48d5a9 iwlegacy: remove ctx interface_modes
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:05 -05:00
Stanislaw Gruszka 6aa0c25435 iwlegacy: get rid of ctxid
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:02 -05:00
Stanislaw Gruszka 0f8b90f526 iwlegacy: get rid of *_devtype
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:01 -05:00
Stanislaw Gruszka b16db50a6d iwlegacy: move bcast_sta_id to hw_params
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:00 -05:00
Stanislaw Gruszka 8f9e564553 iwlegacy: get rid of ap_sta_id
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:59 -05:00
Stanislaw Gruszka d98e294231 iwlegacy: get rid of wep_key_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:59 -05:00
Stanislaw Gruszka b96ed60cd0 iwlegacy: get rid of qos_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:58 -05:00
Stanislaw Gruszka 5e349f0296 iwlegacy: get rid of rxon_assoc_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:57 -05:00
Stanislaw Gruszka 63d0f0c551 iwlegacy: get rid of ctx->rxon_timing_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:56 -05:00
Stanislaw Gruszka 6122d18236 iwlegacy: get rid of ctx->rxon_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:55 -05:00
Stanislaw Gruszka c8b03958d4 iwlegacy: move rxon commands out of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:55 -05:00
Stanislaw Gruszka 68acc4afb0 iwlegacy: 3945: fix hw passive scan on radar channels
Patch fix firmware error on "iw dev wlan0 scan passive" for
hardware scanning (with disable_hw_scan=0 module parameter).

 iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
 iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
 iwl3945 0000:03:00.0: Start IWL Error Log Dump:
 iwl3945 0000:03:00.0: Status: 0x0002A2E4, count: 1
 iwl3945 0000:03:00.0: Desc       Time       asrtPC blink2 ilink1  nmiPC   Line
 iwl3945 0000:03:00.0: SYSASSERT     (0x5) 0041263900 0x13756 0x0031C 0x00000 764
 iwl3945 0000:03:00.0: Error Reply type 0x000002FC cmd C_SCAN (0x80) seq 0x443E ser 0x00340000
 iwl3945 0000:03:00.0: Command C_SCAN failed: FW Error
 iwl3945 0000:03:00.0: Can't stop Rx DMA.

We have disable ability to change passive scanning to active on
particular channel when traffic is detected on that channel. Otherwise
firmware will report error, when we try to do passive scan on radar
channels.

Reported-and-debugged-by: Pedro Francisco <pedrogfrancisco@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:30:45 -05:00
Stanislaw Gruszka 81fb461395 iwlegacy: 3945: simplify calculations of retry limit
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:30:45 -05:00
Stanislaw Gruszka 1722f8e12a iwlegacy: checkpatch.pl fixes
Fix most checkpatch.pl ERRORs and some WARNINGs.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:51:01 +01:00
Stanislaw Gruszka e7392364fc iwlegacy: indentions and whitespaces
Process iwlegacy source files using:

indent -npro -l500 -nhnl
indent -npro -kr -i8 -ts8 -sob -l80 -nbbo -ss -ncs -cp1 -il0 -psl

Plus manual compilation fixes.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:45:59 +01:00
Stanislaw Gruszka 53143a1809 iwlegacy: use FH39_ prefix in 3945 code
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:33 +01:00
Stanislaw Gruszka e94a4099ad iwlegacy: merge common header files
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:09 +01:00
Stanislaw Gruszka 98613be06e iwlegacy: rename iwl-core.h to common.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:19:34 +01:00
Stanislaw Gruszka 6278ddab9f iwlegacy: remove il_ieee80211_get_hw_conf
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:12:00 +01:00
Stanislaw Gruszka d4459a99c4 iwlegacy: rename iwl-commands.h to commands.h
On the way remove also not needed iwl-fh.h include.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:51:26 +01:00
Stanislaw Gruszka d2dfb33ec9 iwlegacy: rename other handlers
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:16:38 +01:00
Stanislaw Gruszka 6e9848b496 iwlegacy: s/rx_reply/hdl/
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:12:28 +01:00
Stanislaw Gruszka d0c72347be iwlegacy: s/rx_handler/handler/
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:12:24 +01:00
Stanislaw Gruszka 4d69c7521a iwlegacy: rename REPLY_ to N_ or C_
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:12:21 +01:00
Stanislaw Gruszka db7746f78c iwlegacy: s/STATISTICS/STATS/
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:11:50 +01:00
Stanislaw Gruszka a6766ccdaf iwlegacy: s/STATUS_/S_/
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:09:01 +01:00
Stanislaw Gruszka 6bbb1370c3 iwlegacy: move iwl-3945-{,hw,fh,debugfs}.h to 3945.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 12:59:59 +01:00
Stanislaw Gruszka 61fe55f61f iwlegacy: rename base 4965 and 3945 file names
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 12:40:26 +01:00