Commit Graph

13 Commits (34aed73df3a9e75e313a7510b201f6755ae3e6bc)

Author SHA1 Message Date
Emmanuel Grumbach 397ede37a4 iwlagn: remove uneeded include to iwl-dev.h
iwl-core.c and iwl-trans-pcie-tx.c don't need to include iwl-dev.h

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:14 -04:00
Emmanuel Grumbach 6a686c6002 iwlagn: move iwl_enable_rfkill_int and kill iwl-helpers.h
Move iwl_enable_rfkill_int to iwl-core.h, and remove the empty
iwl-helpers.h

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:13 -04:00
Wey-Yi Guy 8921d4cab9 iwlagn: more info on warning for shutdown agg queue
When detect wrong state on shutdown aggregation queue, show more
information for debugging

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:12 -04:00
Wey-Yi Guy 281e27c809 iwlagn: do nothing when disable agg in wrong state
When disable aggregation request come in on wrong agg state. ignore it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:11 -04:00
Wey-Yi Guy 05c89b917d iwlagn: add WARN if tx cmd complete come back late
For error condition, STATUS_HCMD_ACTIVE already got clear before receive
tx cmd complete, give warning

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:09 -04:00
Wey-Yi Guy d10630aff7 iwlagn: add cmd queue pointer info when timeout
When detect cmd queue time out, display the current read/write pointer

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14 14:48:08 -04:00
Emmanuel Grumbach 132f98c2dc iwlagn: simplify the iwl_device_cmd layout
This simplifies both the transport layer and the upper layer.

Kill the union in the device command, which avoids the funny syntax
we had: cmd->cmd.payload.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:43 -04:00
Emmanuel Grumbach 247c61d625 iwlagn: remove the callback in host commands
Before this patch, the upper layer could register a callback for each
host command. This mechanism allowed the upper layer to have
different callbacks for the same command ID. In fact, it wasn't used
and the rx_handlers is enough: same callback for all the command with
a specific command ID.

The iwl_send_add_station needs the access the command that was sent
while handling the response (regardless if the command was sent in
SYNC or ASYNC mode). So now, all the handlers receive the host
command that was sent. This implies a change in the handler signature.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:42 -04:00
John W. Linville 4d8b61490c Merge branch 'master' of git://git.infradead.org/users/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-pci.c
	drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
	drivers/net/wireless/rt2x00/rt2800usb.c
	drivers/net/wireless/wl12xx/main.c
2011-09-20 14:11:55 -04:00
Wey-Yi Guy 143bb15de5 iwlagn: signedness bug
re-apply the unsigned shorts bug fixed by Dan Carpenter but get lost
after the file move.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:11 -04:00
Johannes Berg effd4d9aec iwlagn: do not use interruptible waits
Since the dawn of its time, iwlwifi has used
interruptible waits to wait for synchronous
commands and firmware loading.

This leads to "interesting" bugs, because it
can't actually handle the interruptions; for
example when a command sending is interrupted
it will assume the command completed fully,
and then leave it pending, which leads to all
kinds of trouble when the command finishes
later.

Since there's no easy way to gracefully deal
with interruptions, fix the driver to not use
interruptible waits.

This at least fixes the error
iwlagn 0000:02:00.0: Error: Response NULL in  'REPLY_SCAN_ABORT_CMD'

I have seen in P2P testing, but it is likely
that there are other errors caused by this.

Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: stable@kernel.org [2.6.24+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:10 -04:00
Johannes Berg 370ad313be iwlagn: generically provide iwl_trans_send_cmd_pdu
There's no need to have the transport layer have a
callback for iwl_trans_send_cmd_pdu() since it is
just a generic wrapper around iwl_trans_send_cmd().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:08:07 -04:00
Johannes Berg c17d0681b8 iwlagn: move PCI-E transport files
Move all the PCI-E specific transport files to
be iwl-trans-pcie*; specifically iwl-trans.c
which is really iwl-trans-pcie.c.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:08:07 -04:00