1
linux/drivers/net/wireless/iwlwifi
Johannes Berg 704da534af iwlagn: fix firmware loading TLV error path
gcc complains about the firmware loading:

iwl-agn.c: In function ‘iwlagn_load_firmware’:
iwl-agn.c:1860: warning: ‘tlv_len’ may be used uninitialized in this function
iwl-agn.c:1861: warning: ‘tlv_type’ may be used uninitialized in this function
iwl-agn.c:1862: warning: ‘tlv_data’ may be used uninitialized in this function

This is almost correct but we do do break out of the TLV
parsing loop when setting ret. However, the code is hard
to follow, and clearly even the compiler is having issues
with it too.

Additionally, however, the current code is wrong. If there
is a TLV length check error, the code will report
	invalid TLV after parsing: ...
because "len" will still be non-zero as we broke out of
the loop.

So to remove the warning and fix that issue, make the code
easier to read by doing length checking with an error label.
As a result, we can completely remove the "ret" variable.

Also, while at it, remove the "fixed_tlv_size" variable
since each TLV type has its own specified length, it just
happens that we have only variable length, flags (0 length)
and u32 TLVs right now. It should still be checked with more
explicit length checks to make it easier to understand.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-07-23 08:42:04 -07:00
..
iwl3945-base.c iwlwifi: display ucode SW Error in hex 2010-06-21 10:47:03 -07:00
iwl-1000.c iwlagn: add bluetooth stats to debugfs 2010-07-23 08:41:32 -07:00
iwl-3945-debugfs.c iwlwifi: separate statistics flag function for agn & 3945 2010-05-13 10:42:55 -07:00
iwl-3945-debugfs.h iwl3945: add ucode statistics 2010-04-30 15:34:31 -07:00
iwl-3945-fh.h
iwl-3945-hw.h
iwl-3945-led.c
iwl-3945-led.h
iwl-3945-rs.c drivers/net: Remove unnecessary returns from void function()s 2010-05-14 00:19:28 -07:00
iwl-3945.c iwlwifi: add a mechanism to disable plcp error checking 2010-06-25 14:52:47 -07:00
iwl-3945.h iwlwifi: track station IDs 2010-05-10 15:09:04 -07:00
iwl-4965-hw.h
iwl-4965.c iwlagn: add bluetooth stats to debugfs 2010-07-23 08:41:32 -07:00
iwl-5000-hw.h
iwl-5000.c iwlagn: add bluetooth stats to debugfs 2010-07-23 08:41:32 -07:00
iwl-6000-hw.h
iwl-6000.c iwlagn: add bluetooth stats to debugfs 2010-07-23 08:41:32 -07:00
iwl-agn-calib.c iwlagn: Add support for bluetooth statistics notification 2010-07-23 08:41:18 -07:00
iwl-agn-debugfs.c iwlagn: add bluetooth stats to debugfs 2010-07-23 08:41:32 -07:00
iwl-agn-debugfs.h iwlagn: add bluetooth stats to debugfs 2010-07-23 08:41:32 -07:00
iwl-agn-hcmd.c iwlwifi: add TLV to specify the size of phy calibration table 2010-07-23 08:41:46 -07:00
iwl-agn-hw.h
iwl-agn-ict.c wireless: update gfp/slab.h includes 2010-05-24 14:59:26 -04:00
iwl-agn-led.c
iwl-agn-led.h
iwl-agn-lib.c iwlagn: add statistic notification structure for WiFi/BT devices 2010-07-23 08:40:47 -07:00
iwl-agn-rs.c iwlwifi: turn on RTS/CTS after aggregation become operational 2010-06-25 15:20:41 -07:00
iwl-agn-rs.h
iwl-agn-rx.c iwlagn: Add support for bluetooth statistics notification 2010-07-23 08:41:18 -07:00
iwl-agn-tx.c iwlagn: fix the bit mask of a FH register in stop Tx DMA flow 2010-07-09 10:17:24 -07:00
iwl-agn-ucode.c iwlwifi: move ucode related function to iwl-agn-ucode.c 2010-05-13 10:45:36 -07:00
iwl-agn.c iwlagn: fix firmware loading TLV error path 2010-07-23 08:42:04 -07:00
iwl-agn.h iwlwifi: enable 6050 series Gen2 devices 2010-07-09 10:16:39 -07:00
iwl-calib.h iwlagn: Add support for bluetooth statistics notification 2010-07-23 08:41:18 -07:00
iwl-commands.h iwlwifi: add TLV to specify the size of phy calibration table 2010-07-23 08:41:46 -07:00
iwl-core.c mac80211: move QoS-enable to BSS info 2010-07-20 16:02:58 -04:00
iwl-core.h iwlagn: add bluetooth stats to debugfs 2010-07-23 08:41:32 -07:00
iwl-csr.h iwlwifi: enable 6050 series Gen2 devices 2010-07-09 10:16:39 -07:00
iwl-debug.h iwlwifi: add debugfs ops to iwlwifi 2010-04-16 13:51:31 -07:00
iwl-debugfs.c iwlagn: add bluetooth stats to debugfs 2010-07-23 08:41:32 -07:00
iwl-dev.h iwlwifi: add TLV to specify the size of phy calibration table 2010-07-23 08:41:46 -07:00
iwl-devtrace.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-04-15 16:21:34 -04:00
iwl-devtrace.h
iwl-eeprom.c iwlwifi: enable DC calibration based on config parameter 2010-06-25 14:52:18 -07:00
iwl-eeprom.h iwlwifi: enable 6050 series Gen2 devices 2010-07-09 10:16:39 -07:00
iwl-fh.h iwlagn: fix the bit mask of a FH register in stop Tx DMA flow 2010-07-09 10:17:24 -07:00
iwl-hcmd.c iwlwifi: tx fifo queue flush command 2010-07-02 11:10:15 -07:00
iwl-helpers.h iwlwifi: beacon format related helper function 2010-06-05 23:15:49 -07:00
iwl-io.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-04-15 16:21:34 -04:00
iwl-led.c
iwl-led.h
iwl-power.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-05-17 13:57:43 -04:00
iwl-power.h
iwl-prph.h iwlwifi: more code clean up for agn devices 2010-04-16 13:53:20 -07:00
iwl-rx.c iwlwifi: fix fw_restart module parameter 2010-07-02 11:08:52 -07:00
iwl-scan.c iwlwifi: turn on RTS/CTS after aggregation become operational 2010-06-25 15:20:41 -07:00
iwl-spectrum.h
iwl-sta.c iwlwifi: update LQ for bcast station on channel change 2010-06-25 14:53:49 -07:00
iwl-sta.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-07-13 15:31:51 -04:00
iwl-tx.c iwlwifi: kzalloc txb array 2010-06-05 23:18:11 -07:00
Kconfig iwlagn: more generic description for iwlagn devices 2010-07-09 10:17:09 -07:00
Makefile iwlwifi: move calibration from iwlcore to iwlagn 2010-06-21 10:47:32 -07:00