summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/3945.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* wireless: delete non-required instances of include <linux/init.h>Paul Gortmaker2014-01-031-1/+0
| | | | | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlegacy: use ether_addr_equal_64bitsJulia Lawall2014-01-031-2/+2
| | | | | | | | | | | | | | | | Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be used when each argument is an array within a structure that contains at least two bytes of data beyond the array. The structures involved are: ieee80211_hdr defined in include/linux/ieee80211.h, il_priv defined in drivers/net/wireless/iwlegacy/common.h and il_rxon_cmd defined in drivers/net/wireless/iwlegacy/commands.h This was done using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwl3945: better skb management in rx pathEric Dumazet2013-07-241-12/+19
| | | | | | | | | | | | | | | | | | | Steinar reported reallocations of skb->head with IPv6, leading to a warning in skb_try_coalesce() It turns out iwl3945 has several problems : 1) skb->truesize is underestimated. We really consume PAGE_SIZE bytes for a fragment, not the frame length. 2) 128 bytes of initial headroom is a bit low and forces reallocations. 3) We can avoid consuming a full page for small enough frames. Reported-by: Steinar H. Gunderson <sesse@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Paul Stewart <pstew@google.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwl3945: workaround for firmware frame tx rejectionStanislaw Gruszka2013-06-121-0/+18
| | | | | | | | | Firmware can reject to transmit frame on passive channel, when it did not yet received any frame with valid CRC on that channel. Workaround this problem in the driver. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* drivers:net: Remove dma_alloc_coherent OOM messagesJoe Perches2013-03-151-3/+1
| | | | | | | | | | | | | | | | | I believe these error messages are already logged on allocation failure by warn_alloc_failed and so get a dump_stack on OOM. Remove the unnecessary additional error logging. Around these deletions: o Alignment neatening. o Remove unnecessary casts of dma_alloc_coherent. o Hoist assigns from ifs. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* iwlegacy: initialize rx_statusJohannes Berg2012-11-261-1/+1
| | | | | | | | | | The vendor radiotap patch added a few fields to struct ieee80211_rx_status that need to be zero, initialize the struct instead of using whatever was left on the stack. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* drivers/net: Convert compare_ether_addr to ether_addr_equalJoe Perches2012-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: add a truesize parameter to skb_add_rx_frag()Eric Dumazet2012-03-251-1/+2
| | | | | | | | | | | | | skb_add_rx_frag() API is misleading. Network skbs built with this helper can use uncharged kernel memory and eventually stress/crash machine in OOM. Add a 'truesize' parameter and then fix drivers in followup patches. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-03-191-3/+4
|\
| * iwl3945: fix possible il->txq NULL pointer dereference in delayed worksStanislaw Gruszka2012-03-121-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | iwlegacy: s/il_txq_mem/il_free_txq_mem/gStanislaw Gruszka2012-02-221-1/+1
| | | | | | | | | | | | | | Previous name was confusing. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: small queue initializations cleanupStanislaw Gruszka2012-02-221-7/+2
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: do not grab nic access if rfkillStanislaw Gruszka2012-02-221-13/+14
| | | | | | | | | | | | | | | | | | 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>
* | iwlegacy: get rid of tx/rx traffic logStanislaw Gruszka2012-02-221-2/+0
| | | | | | | | | | | | | | 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>
* | iwlegacy: merge all ops structures into oneStanislaw Gruszka2012-02-221-26/+13
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: merge il_lib_ops into il_opsStanislaw Gruszka2012-02-221-16/+13
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: remove il_apm_opsStanislaw Gruszka2012-02-221-7/+3
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: merge eeprom_ops into lib_opsStanislaw Gruszka2012-02-221-4/+2
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: move debugfs_ops to il_privStanislaw Gruszka2012-02-221-8/+0
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: regulatory_bands is not an opsStanislaw Gruszka2012-02-221-14/+25
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: remove struct il_tx_infoStanislaw Gruszka2012-02-061-10/+8
| | | | | | | | | | | | | | 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>
* | iwlegacy: merge il_base_params into il_cfgStanislaw Gruszka2012-02-061-13/+17
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: move ops out of configStanislaw Gruszka2012-02-061-8/+5
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: get rid of ctx structureStanislaw Gruszka2012-02-061-12/+11
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: move bcast_sta_id to hw_paramsStanislaw Gruszka2012-02-061-2/+3
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlegacy: move rxon commands out of ctx structureStanislaw Gruszka2012-02-061-11/+11
|/ | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlegacy: 3945: simplify calculations of retry limitStanislaw Gruszka2012-01-041-11/+4
| | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlegacy: 3945: get rid of hw_{set,get}_rateStanislaw Gruszka2012-01-041-2/+1
| | | | | | | | Remove these helpers, some are not unused at all, one can be unrolled in place of use. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlegacy: off by one in iwl3945_hw_build_tx_cmd_rate()Dan Carpenter2012-01-041-1/+1
| | | | | | | | | | | We use "rate_index" like this: rate = iwl3945_rates[rate_index].plcp; The iwl3945_rates[] array has IWL_RATE_COUNT_3945 elements so the limit here is off by one. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlegacy: debugfs_ops should depend on CONFIG_IWLEGACY_DEBUGFSGreg Dietsche2011-11-161-0/+2
| | | | | | | Only setup structs related to debugfs_ops when CONFIG_IWLEGACY_DEBUGFS is set. Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: checkpatch.pl fixesStanislaw Gruszka2011-11-151-21/+22
| | | | | | Fix most checkpatch.pl ERRORs and some WARNINGs. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: indentions and whitespacesStanislaw Gruszka2011-11-151-461/+459
| | | | | | | | | | | 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>
* iwlegacy: merge iwl-{eeprom,led}.h into common.hStanislaw Gruszka2011-11-151-3/+0
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: merge common header filesStanislaw Gruszka2011-11-151-4/+2
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: rename iwl-core.h to common.hStanislaw Gruszka2011-11-151-1/+1
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: rename iwl-commands.h to commands.hStanislaw Gruszka2011-11-151-2/+1
| | | | | | On the way remove also not needed iwl-fh.h include. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: rename other handlersStanislaw Gruszka2011-11-151-3/+3
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: s/rx_reply/hdl/Stanislaw Gruszka2011-11-151-5/+5
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: s/rx_handler/handler/Stanislaw Gruszka2011-11-151-3/+3
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: rename REPLY_ to N_ or C_Stanislaw Gruszka2011-11-151-12/+12
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: s/STATISTICS/STATS/Stanislaw Gruszka2011-11-151-1/+1
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: s/STATUS_/S_/Stanislaw Gruszka2011-11-151-5/+5
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: move iwl-3945-{,hw,fh,debugfs}.h to 3945.hStanislaw Gruszka2011-11-151-3/+1
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: merge iwl-3945-led.c into 3945.cStanislaw Gruszka2011-11-151-1/+19
| | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
* iwlegacy: rename base 4965 and 3945 file namesStanislaw Gruszka2011-11-151-0/+2740
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>