Commit graph

13154 commits

Author SHA1 Message Date
Kalle Valo 3b1b7d0985 ath6kl: convert ath6kl_dbg() and ath6kl_dbg_dump() into functions
That way it's possible to not export debug_mask outside the upcoming
ath6kl_core.ko and that makes it easier to ath6kl_core.ko in the
following patch.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:59:50 +02:00
Kalle Valo 5afa5aa796 ath6kl: get rid of AR_DBG_LVL_CHECK()
We don't need it as debug calls already have a log level and compiler
should be smart enough to optimise away the code when ath6kl debug code
is not enabled. Also it makes it easier to abstract core code to
ath6kl_core.ko.

In ath6kl_dump_registers() I had to change the debug level from ANY to IRQ
as I removed the AR_DBG_LVL_CHECK() check before calling the function.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:59:49 +02:00
Kalle Valo 45eaa78f75 ath6kl: create core.c
Currently core functions are spread between various files, group all
the functions into file and rename the functions to follow the style
used elsewhere in the driver. This will make it easier to a separate core
module.

Also fix a bug where wiphy is freed too early.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:59:49 +02:00
Kalle Valo f29af97853 ath6kl: add ATH6KL_CONF_UART_DEBUG
Add ATH6KL_CONF_UART_DEBUG which is set whenever uart_debug module
parameter is enabled. This way we can keep the uart_debug parameter
static when core.c file is introduced.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:51:13 +02:00
Kalle Valo 46d33a21cf ath6kl: unify cfg80211 init/cleanup functions
Group them together and change the naming to follow the common style in
ath6kl. No functional changes.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:51:13 +02:00
Kalle Valo c25889e8a6 ath6kl: rename vif init and cleanup functions
ath6kl_cfg80211_vif_init/cleanup() follow more closely the style used
elsewhere in ath6kl.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:51:11 +02:00
Alex Yang cd23c1c9b8 ath6kl: add testmode 2 for 6003 ART
Add testmode 2 for 6003 ART. When you insmod ath6kl_sdio.ko testmode=2, ath6kl
will load ART firmware utf.bin and testscript nullTestFlow.bin. These files
should be put in the firmware folder.

kvalo: add "ath6kl:" to the title, word wrap the commit log and remove
extra line in the code

Signed-off-by: Alex Yang <xiaojuny@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:47:31 +02:00
Kalle Valo e572602884 ath6kl: fix uninitialized warning in ath6kl_process_uapsdq()
Before I commited patch c1762a3fe ("ath6kl: Add support for uAPSD") I
did a minor change how up variable is initialised in
ath6kl_process_uapsdq(). But I was sloppy and caused this compiler
warning:

txrx.c:88:5: warning: 'up' may be used uninitialized in this function

Revert my change to fix the warning.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:41:13 +02:00
Kalle Valo 3462735dad ath6kl: remove -D__CHECK_ENDIAN__ from Makefile
As drivers/net/wireless/ath/Makefile contains the flag to enable
endian checks there's no need to have it in ath6kl makefile anymore.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:41:12 +02:00
Kalle Valo d6f802612a ath6kl: use netdev_features_t
Commit c8f44affb7 ("net: introduce and use netdev_features_t for
device features sets") added netdev_features_t to ndo_set_features.
Change ath6kl to use the new type.

This fixes a warning:

ath6kl/main.c:1170: warning: initialization from incompatible pointer type

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-18 13:41:11 +02:00
Kalle Valo a0afd4f7c1 Merge remote branch 'wireless-next/master' into ath6kl-next
Conflicts:
	drivers/net/wireless/ath/ath6kl/usb.c
2012-01-13 13:57:45 +02:00
Raja Mani e80ec84d93 ath6kl: Remove useless initialization in ath6kl_read_fwlogs()
ath6kl_read_fwlogs() assigns the value zero to the variable 'ret'
at the time of declaration. Later, return value of ath6kl_diag_read32()
repalces the init value. Hence removing useless zero assignment.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-13 13:52:41 +02:00
Thirumalai Pachamuthu c1762a3fe1 ath6kl: Add support for uAPSD
* A new APSD power save queue is added in the station structure.
* When a station has APSD capability and goes to power save, the frame
  designated to the station will be buffered in APSD queue.
* When the host receives a frame which the firmware marked as trigger,
  host delivers the buffered frame from the APSD power save queue.
  Number of frames to deliver is decided by MAX SP length.
* When a station moves from sleep to awake state, all frames buffered
  in APSD power save queue are sent to the firmware.
* When a station is disconnected, all frames bufferes in APSD power save
  queue are dropped.
* When the host queues the first frame to the APSD queue or removes the
  last frame from the APSD queue, it is indicated to the firmware using
  WMI_AP_APSD_BUFFERED_TRAFFIC_CMD.

kvalo: fix buggy handling of sks queues, made it more obvious
the user priority when wmm is disabled, remove unneed else block and
combined some variable declarations

Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-13 13:48:25 +02:00
Sujith Manoharan 8232736dab ath6kl: Fix listen interval handling
This patch addresses a few problems with the commit:

"ath6kl: Implement support for listen interval from userspace"

* The debugfs file required for reading/writing the listen interval
  wasn't created. Fix this.

* The interface index was being hardcoded to zero. Fix this.

* Two separate parameters, "listen_interval_time and listen_interval_beacons"
  were being used. This fails to work as expected because the FW assigns
  higher precedence to "listen_interval_beacons" and "listen_interval_time"
  ends up being never used at all.

  To handle this, fix the host driver to exclusively use listen interval
  based on units of beacon intervals.

To set the listen interval, a user would now do something like this:

echo "10" > /sys/kernel/debug/ieee80211/*/ath6kl/listen_interval

kvalo: fix two checkpatch warnings

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-12 13:36:37 +02:00
Sujith Manoharan cbec267a51 ath6kl: Initialize a variable properly
This prevents 'comp_pktq' from being used in an
incorrect manner.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-12 13:36:37 +02:00
Sujith Manoharan 4a8ce2fd05 ath6kl: Remove redundant pointer check
'params' is already used earlier and there is no point
in checking for a NULL condition again.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-12 13:36:37 +02:00
Sujith Manoharan 866dc88607 ath6kl: Fix SDIO error path
sdio_release_host() would be called twice if sdio_set_block_size()
fails for some reason, which would result in the following warning.

WARNING: at /home/sujith/dev/wireless-testing/drivers/mmc/core/core.c:828 mmc_release_host+0x42/0x50 [mmc_core]()

Call Trace:
[<ffffffff81064fdf>] warn_slowpath_common+0x7f/0xc0
[<ffffffff8106503a>] warn_slowpath_null+0x1a/0x20
[<ffffffffa03beb42>] mmc_release_host+0x42/0x50 [mmc_core]
[<ffffffffa03c917e>] sdio_release_host+0x1e/0x30 [mmc_core]
[<ffffffffa053fac7>] ath6kl_sdio_config+0xc7/0x110 [ath6kl_sdio]
[<ffffffffa053fd2c>] ath6kl_sdio_probe+0x21c/0x320 [ath6kl_sdio]
[<ffffffffa03beb2a>] ? mmc_release_host+0x2a/0x50 [mmc_core]
[<ffffffffa03c7d2a>] sdio_bus_probe+0xfa/0x130 [mmc_core]
[<ffffffff813015ae>] driver_probe_device+0x7e/0x1b0
[<ffffffff8130178b>] __driver_attach+0xab/0xb0
[<ffffffff813016e0>] ? driver_probe_device+0x1b0/0x1b0
[<ffffffff813016e0>] ? driver_probe_device+0x1b0/0x1b0
[<ffffffff81300504>] bus_for_each_dev+0x64/0xa0
[<ffffffff8130123e>] driver_attach+0x1e/0x20
[<ffffffff81300e80>] bus_add_driver+0x1b0/0x280
[<ffffffffa0065000>] ? 0xffffffffa0064fff
[<ffffffff81301d06>] driver_register+0x76/0x140
[<ffffffffa0065000>] ? 0xffffffffa0064fff
[<ffffffffa03c7b71>] sdio_register_driver+0x21/0x30 [mmc_core]
[<ffffffffa0065012>] ath6kl_sdio_init+0x12/0x35 [ath6kl_sdio]
[<ffffffff81002042>] do_one_initcall+0x42/0x180
[<ffffffff810b025f>] sys_init_module+0x8f/0x200
[<ffffffff81425ac2>] system_call_fastpath+0x16/0x1b

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-12 13:36:37 +02:00
Stephen Hemminger 4269a93054 ath6kl: make net_device_ops const
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-09 16:33:23 +02:00
Vasanthakumar Thiagarajan 9d82682d45 ath6kl: Use a mutex_lock to avoid race in diabling and handling irq
Currently this race is handled but in a messy way an atomic
variable is being checked in a loop which sleeps upto ms
in every iteration. Remove this logic and use a mutex
to make sure irq is not disabled when irq handling is in
progress.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-09 16:20:11 +02:00
Vasanthakumar Thiagarajan 982767b8c9 ath6kl: Change ielen in ath6kl_add_new_sta() from u8 to size_t
Otherwise if (ielen <= ATH6KL_MAX_IE) is dead code. It looks safe to
change the type of ielen from u8 to size_t instead of removing this
if check, this ielen can have the length of more than one ies in future.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-09 12:46:13 +02:00
Vasanthakumar Thiagarajan 3d6aba260b ath6kl: Remove deadcode in main.c
In ath6kl_reset_device(), since control can never reach switch..case
when the target_type is neither TARGET_TYPE_AR6003 nor TARGET_TYPE_AR6004,
remove the default option of switch statement.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-09 12:44:41 +02:00
Vasanthakumar Thiagarajan 80abaf9b4c ath6kl: Implement ndo_set_rx_mode()
There are maximum of seven multicast filter are supported
by hw. When the requested number of filters exceeds the
maximum supported one, multicast filtering is completely
disabled, the requested filters will be configured in
firmware and the only multicast frames that host is interested
in will be passed to host for further processing otherwise.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
2012-01-09 12:29:17 +02:00
Vasanthakumar Thiagarajan f914edd389 ath6kl: Add a function in wmi.c to add/delete a multicast filter
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
2012-01-09 12:24:41 +02:00
Vasanthakumar Thiagarajan 3f3c4ee735 ath6kl: Add a function in wmi to send WMI_MCAST_FILTER_CMDID
This will be used to disable/enable multicast receive.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
2012-01-09 12:24:40 +02:00
John W. Linville 1032c736e8 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
	drivers/net/wireless/b43legacy/dma.c
2012-01-05 10:13:24 -05:00
John W. Linville cb00ec382b ath6kl: revert USB support
The ath6kl driver is causing build failures when the ath6kl bits are
not built as modules.  A better fix is forthcoming in a future release,
but for now lets revert the problematic code.

This reverts the following commits:

	fde57764ef
	d70385a26a
	59d954dda4

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-05 09:53:33 -05:00
David S. Miller 117ff42fd4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-01-04 21:35:43 -05:00
Yogesh Ashok Powar 00e8e69270 mwl8k: Changing the driver version to 0.13
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 20:19:52 -05:00
Yogesh Ashok Powar 6b6accc383 mwl8k: Recover from firmware crash
In case of firmware crash, reload the firmware and reconfigure it
by triggering ieee80211_hw_restart; mac80211 utility function.

V2 Addressed following comments from Lennert:
 - Stop the queues during reload
 - Removed atomic_t declaration for hw_restart
 - Extend the firmware reload support for sta firmware as well
 - Other misc changes

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:31:47 -05:00
Mohammed Shafi Shajakhan 98f0a5eb02 ath9k: tx queue enable is read only for EDMA chipsets
for EDMA chip AR_Q_TXE (tx enable for each queue) is read only

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:31:46 -05:00
Gertjan van Wingerde 7fbaf3efb0 rt2x00: Change RF3853 to RF3053.
According to the latest Ralink vendor drivers, this seems to be the real
RF chipset type.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:31:46 -05:00
Gertjan van Wingerde 5a87e7a706 rt2x00: RT3593 is also applicable to USB.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:31:46 -05:00
Jakub Kiciński d823a50e55 rt2x00usb: Zero USB padding before sending URB
When USB driver requires padding at the end of frame or URB it will report
this need by increasing return value of get_tx_data_len callback. Common
USB code uses that return value as desired URB length.

Ensure that appropriate part of skb's tailroom exists and is zeroed.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
--
 drivers/net/wireless/rt2x00/rt2x00usb.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:31:46 -05:00
Jakub Kiciński 4bcafac8c6 rt2800usb: Let rt2x00usb handle USB padding
Older USB drivers does not append end padding to skb but instead report
it in size of data to be transmitted to HW. rt2800usb should follow that
behaviour. Custom write_tx_data callback which was adding pad to skb
is not be needed any more.

Thanks to this patch frames handed back from rt2800usb to mac80211 will
no longer contain end padding.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:31:46 -05:00
Gertjan van Wingerde 5aa5701590 rt2x00: Convert big if-statements to switch-statements.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:31:45 -05:00
Gertjan van Wingerde 70127cb694 rt2x00: Whitespace cleanup.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:31:45 -05:00
Gertjan van Wingerde bc93eda7e9 rt2x00: Identify rt2800usb chipsets.
According to the latest USB ID database these are all RT2770 / RT2870 / RT307x
devices.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:31:45 -05:00
Christian Lamparter 65a692284d carl9170: move checksum and txseq into subfunctions
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:30:47 -05:00
Larry Finger 3f81f8f152 rt2800usb: Move ID out of unknown
Testing on the openSUSE wireless forum has shown that a Linksys
WUSB54GC v3 with USB ID 1737:0077 works with rt2800usb when the ID is
written to /sys/.../new_id. This ID can therefore be moved out of UNKNOWN.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:30:47 -05:00
Stanislav Yakovlev f961e34ebe ipw2x00: remove reset_port functionality
Removes reset_port since it isn't used anywhere as suggested by Johannes Berg.

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:30:46 -05:00
Rajkumar Manoharan 016c217791 ath9k_hw: increase tx status ring buffer size
AR9003 chips read tx status from ring buffer whose max number of
status descriptor is mininal compared to max number of tx buffers.
On a stress condition, it can be easily overflown which might cause
false tx hung detection. Though increasing number of max status
descriptors consumes more memory, it helps to avoid false positive
chip resets.

Cc: Paul Stewart <pstew@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:30:46 -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 5d0bef903a iwlegacy: random 3945-rs.c cleanups
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 5bf0dac47f iwlegacy: 4965: remove one il4965_hdl_beacon
We have two such functions.

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 280ade5ea9 iwlegacy: 3945: get rid of hw_{set,get}_rate
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-04 14:30:44 -05:00
Stanislaw Gruszka 616107ed81 iwlegacy: 4965: small tx_cmd build cleanup
Get rid of two inline functions related and simplify a bit
rts_retry_limit calculations.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:30:44 -05:00
Stanislaw Gruszka a0c1ef3b12 iwlegacy: 4965: toggle tx antenna inline
Make function static and change antenna number inline.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:30:44 -05:00
Stanislaw Gruszka 17d4eca643 iwlegacy: move some i/o helpers out of inline
This save us about 20k of text size, and should have no impact on
performance as hot paths do not use much I/O.

Before:
   text	   data	    bss	    dec	    hex	filename
 108512	   1784	    168	 110464	  1af80	drivers/net/wireless/iwlegacy/iwl3945.ko
 165730	   2164	    156	 168050	  29072	drivers/net/wireless/iwlegacy/iwl4965.ko
  91942	    328	     48	  92318	  1689e	drivers/net/wireless/iwlegacy/iwlegacy.ko

After:
   text	   data	    bss	    dec	    hex	filename
  95556	   1784	    168	  97508	  17ce4	drivers/net/wireless/iwlegacy/iwl3945.ko
 154853	   2164	    156	 157173	  265f5	drivers/net/wireless/iwlegacy/iwl4965.ko
  91634	    328	     48	  92010	  1676a	drivers/net/wireless/iwlegacy/iwlegacy.ko

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-04 14:30:44 -05:00
Dan Carpenter d71be93720 iwlegacy: off by one in iwl3945_hw_build_tx_cmd_rate()
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>
2012-01-04 14:30:44 -05:00