aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/3945.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-01-03wireless: delete non-required instances of include <linux/init.h>Paul Gortmaker1-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>
2014-01-03iwlegacy: use ether_addr_equal_64bitsJulia Lawall1-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>
2013-07-24iwl3945: better skb management in rx pathEric Dumazet1-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>
2013-06-12iwl3945: workaround for firmware frame tx rejectionStanislaw Gruszka1-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>
2013-03-15drivers:net: Remove dma_alloc_coherent OOM messagesJoe Perches1-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>
2012-11-26iwlegacy: initialize rx_statusJohannes Berg1-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>
2012-05-10drivers/net: Convert compare_ether_addr to ether_addr_equalJoe Perches1-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>
2012-03-25net: add a truesize parameter to skb_add_rx_frag()Eric Dumazet1-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>
2012-03-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-3/+4
2012-03-12iwl3945: fix possible il->txq NULL pointer dereference in delayed worksStanislaw Gruszka1-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>
2012-02-22iwlegacy: s/il_txq_mem/il_free_txq_mem/gStanislaw Gruszka1-1/+1
Previous name was confusing. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: small queue initializations cleanupStanislaw Gruszka1-7/+2
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: do not grab nic access if rfkillStanislaw Gruszka1-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>
2012-02-22iwlegacy: get rid of tx/rx traffic logStanislaw Gruszka1-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>
2012-02-22iwlegacy: merge all ops structures into oneStanislaw Gruszka1-26/+13
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: merge il_lib_ops into il_opsStanislaw Gruszka1-16/+13
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: remove il_apm_opsStanislaw Gruszka1-7/+3
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: merge eeprom_ops into lib_opsStanislaw Gruszka1-4/+2
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: move debugfs_ops to il_privStanislaw Gruszka1-8/+0
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22iwlegacy: regulatory_bands is not an opsStanislaw Gruszka1-14/+25
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: remove struct il_tx_infoStanislaw Gruszka1-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>
2012-02-06iwlegacy: merge il_base_params into il_cfgStanislaw Gruszka1-13/+17
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: move ops out of configStanislaw Gruszka1-8/+5
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: get rid of ctx structureStanislaw Gruszka1-12/+11
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: move bcast_sta_id to hw_paramsStanislaw Gruszka1-2/+3
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: move rxon commands out of ctx structureStanislaw Gruszka1-11/+11
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04iwlegacy: 3945: simplify calculations of retry limitStanislaw Gruszka1-11/+4
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04iwlegacy: 3945: get rid of hw_{set,get}_rateStanislaw Gruszka1-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>
2012-01-04iwlegacy: off by one in iwl3945_hw_build_tx_cmd_rate()Dan Carpenter1-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>
2011-11-16iwlegacy: debugfs_ops should depend on CONFIG_IWLEGACY_DEBUGFSGreg Dietsche1-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>
2011-11-15iwlegacy: checkpatch.pl fixesStanislaw Gruszka1-21/+22
Fix most checkpatch.pl ERRORs and some WARNINGs. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: indentions and whitespacesStanislaw Gruszka1-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>
2011-11-15iwlegacy: merge iwl-{eeprom,led}.h into common.hStanislaw Gruszka1-3/+0
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: merge common header filesStanislaw Gruszka1-4/+2
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: rename iwl-core.h to common.hStanislaw Gruszka1-1/+1
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: rename iwl-commands.h to commands.hStanislaw Gruszka1-2/+1
On the way remove also not needed iwl-fh.h include. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: rename other handlersStanislaw Gruszka1-3/+3
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: s/rx_reply/hdl/Stanislaw Gruszka1-5/+5
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: s/rx_handler/handler/Stanislaw Gruszka1-3/+3
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: rename REPLY_ to N_ or C_Stanislaw Gruszka1-12/+12
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: s/STATISTICS/STATS/Stanislaw Gruszka1-1/+1
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: s/STATUS_/S_/Stanislaw Gruszka1-5/+5
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: move iwl-3945-{,hw,fh,debugfs}.h to 3945.hStanislaw Gruszka1-3/+1
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: merge iwl-3945-led.c into 3945.cStanislaw Gruszka1-1/+19
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15iwlegacy: rename base 4965 and 3945 file namesStanislaw Gruszka1-0/+2740
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>