| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Alexander reported a strange crash in iwlagn that
Meenakshi and Wey couldn't reproduce. I just ran
into the same issue and tracked it down to stack
corruption. This fixes it.
The problem was introduced in
commit 4b8b99b6e650d0527f3a123744b7459976581d14
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Date: Fri Jul 8 14:29:48 2011 -0700
iwlagn: radio sensor offset in le16 format
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Cc: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Reported-by: Alexander Diewald <alex@diewald.cc>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
| |
| |
| |
| |
| |
| |
| | |
Same stack corruption problem as temperature offset
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
For retrieve calibration hdr related information, instead of using structure in
one place and #define in other place, unify the method to use data structure.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
For 2000 series of NICs, version 2 of temperature offset calibration
should be used.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reaches encapsulation for this file. In order to reach this:
* move priv->valid_context to iwl_shared
* move the last_rejected initialization to the upper layer
* define a wrapper iwl_nic_config in the upper layer that calls to
cfg->lib->ops->nic_config
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Another round of clean up on the transport layer.
Define a wrapper around wiphy_rfkill_set_hw_state to prevent the
transport layer from accessing priv->hw.
Also move wait_command_queue to the transport layer.
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In a near future, the upper layer won't be aware of the tx queues.
This allows to remove one place where the upper layer needed to
provide the tx queue index to the transport layer.
This also saves around 1.5MB.
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Which means that iwl-io.c doesn't need to include iwl-dev.h any more.
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since iwl-fh.h contains transport related data, it shouldn't be included by the
upper layer.
Only the transport layer and iwl-agn-ucode.c includes it.
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove iwl_transport_register which was a W/A. The bus layer knows what
transport to use. So now, the bus layer gives the upper layer a pointer to the
iwl_trans_ops struct that it wants to use. The upper layer then, allocates the
desired transport layer using iwl_trans_ops->alloc function.
As a result of this, priv->trans, no longer exists, priv holds a pointer to
iwl_shared, which holds a pointer to iwl_trans. This required to change all the
calls to the transport layer from upper layer. While we were at it, trans_X
inlines have been renamed to iwl_trans_X to avoid confusions, which of course
required to rename the functions inside the transport layer because of
conflicts in names. So the static API functions inside the transport layer
implementation have been renamed to iwl_trans_pcie_X.
Until now, the IRQ / Tasklet were initialized in iwl_transport_layer. This is
confusing since the registration doesn't mean to request IRQ, so I added a
handler for that.
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Since it is used by all the layers, it needs to move to iwl_shared.
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>
|
|/
|
|
|
|
|
|
|
|
| |
There are number of functions with "iwlcore_" prefix which not feels right,
rename those to "iwl_".
No functional changes by making the renames.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement WoWLAN support in iwlagn. The device
supports a number of wakeup triggers and can do
GTK rekeying when asleep (if HW crypto is used).
Unfortunately, we need to disconnect from the AP
after resume since we can't yet get all the info
out of the wowlan uCode to stay connected safely.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
| |
It still holds a pointer to iwl_priv. But hopefully this will disappear at some point.
Also add the multiple inclusion protection to iwl-trans.h that was forgotten.
Move iwl-trans structures to iwl-trans.h
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
| |
Basically all the nic_init flow should be in the transport layer.
iwl_prepare_card_hw will move to the transport too in a separate patch.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
| |
For temperature offset calibration, send radio sensor offset in le16 format
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
| |
Set calibration config flag for complete notification
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
| |
kick_nic means to remove the RESET bit from the embedded CPU
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
|
|
|
|
|
|
|
|
| |
tx start will start the tx queues: basically configure the SCD
Remove the IWLAGN prefix to SCD defines on the way.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
|
|
|
|
|
|
|
|
| |
Since iwlagn_stop_device was the only caller to the rx_stop / tx_stop,
these two don't need to be API any more.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
|
|
|
|
|
|
|
|
| |
This removes the for priv->trans.ops->...
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>
|
|
|
|
|
|
|
| |
Not needed since the driver split.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now, there are only two functions to send a host command:
* send_cmd that receives a iwl_host_cmd
* send_cmd_pdu that builds the iwl_host_cmd itself and received flags
The flags CMD_ASYNC / CMD_SYNC / CMD_WANT_SKB are not changed by the API
functions.
Kill the unused flags CMD_SIZE_NORMAL / CMD_NO_SKB on the way.
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>
|
|
|
|
|
|
| |
Assign memory boundary for SCD context, tx status and translation table
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
| |
Multiple places have similar code to construct calib header. Merge into
single inline function.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
| |
Temperature location in EEPROM is generic to all devices
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
| |
Instead use generic IWL_DEBUG_INFO, use IWL_DEBUG_FW for uCode related stuffs.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ucode subtypes keep changing, and there's no
particular reason to be checking them (other than
a paranoid sanity check). Since the numbers are
also in conflict between different ucode images
now, simply don't check them any more and rely on
the images being built correctly.
Also, to indicate that, rename the constants and
the enum, moving it to a different file.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
| |
All of these functions no longer need to be
accessed indirectly since they're shared in
all AGN devices.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
In a subsequent patch, I want to make commands use
multiple TBs in a TFD. This is a simple change to
prepare the data structures for this, with as of
now still just a single TB supported.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the feature to support the test mode operation through
the generic netlink channel NL80211_CMD_TESTMODE between intel
wireless device iwlwifi and the user space application svtool.
The main purpose is to create a transportation layer between the iwlwifi
device and the user space application so that the interaction between the
user space application svtool and the iwlwifi device in the kernel space is
in a way of generic netlink messaging.
The detail specific functions are:
1. The function iwl_testmode_cmd() is added to digest the svtool test command
from the user space application. The svtool test commands are categorized to
three types : commands to be processed by the device ucode, commands to access
the registers, and commands to be processed at the driver level(such as reload
the ucode). iwl_testmode_cmd() dispatches the commands the corresponding handlers
and reply to user space regarding the command execution status. Extra data is
returned to the user space application if there's any.
2. The function iwl_testmode_ucode_rx_pkt() is added to multicast all the spontaneous
messages from the iwlwifi device to the user space. Regardless the message types,
whenever there is a valid spontaneous message received by the iwlwifi ISR,
iwl_testmode_ucode_rx_pkt() is invoked to multicast the message content to user
space. The message content is not attacked and the message parsing is left to
the user space application.
Implementation guidelines:
1. The generic netlink messaging for iwliwif test mode is through NL80211_CMD_TESTMODE
channel, therefore, the codes need to follow the regulations set by cfg80211.ko
to get the actual device instance ieee80211_ops via cfg80211.ko, so that the iwlwifi
device is indicated with ieee80211_ops and can be actually accessed.
Therefore, a callback iwl_testmode_cmd() is added to the structure
iwlagn_hw_ops in iwl-agn.c.
2. It intends to utilize those low level device access APIs from iwlwifi device driver
(ie. iwlagn.ko) rather than creating it's own set of device access functions.
For example, iwl_send_cmd(), iwl_read32(), iwl_write8(), and iwl_write32() are reused.
3. The main functions are maintained in new files instead of spreading all over the
existing iwlwifi driver files.
The new files added are :
drivers/net/wireless/iwlwifi/iwl-sv-open.c
- to handle the user space test mode application command
and reply the respective command status to the user space application.
- to multicast the spontaneous messages from device to user space.
drivers/net/wireless/iwlwifi/iwl-testmode.h
- the commonly referenced definitions for the TLVs used in
the generic netlink messages
Signed-off-by: Cindy H. Kao <cindy.h.kao@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On new hardware, ucode images always come in
pairs: code and data. Therefore, combine the
variables into an appropriate struct and use
that when both code and data are needed.
Also, combine allocation and copying so that
we have less code in total.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current firmware loading mechanism in
iwlwifi is very hard to follow, and thus
hard to maintain. To make it easier, make
the firmware loading synchronous.
For now, as a side effect, this removes a
number of retry possibilities we had. It
isn't typical for this to fail, but if it
does happen we restart from scratch which
this also makes easier to do should it be
necessary.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The microcode may sometimes reject TX frames when
on a radar channel even after we associated as it
clears information during association and needs to
receive a new beacon before allowing that channel
again. This manifests itself as a TX status value
of TX_STATUS_FAIL_PASSIVE_NO_RX. So in this case,
stop the corresponding queue and give the frame
back to mac80211 for retransmission. We start the
queue again when a beacon from the AP is received
which will make the regulatory enforcement in the
device allow transmitting again.
Signed-off-by: Garen Tamrazian <garenx.tamrazian@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This generates a massive reduction in module size:
with debug:
text data bss dec hex filename
670300 13136 420 683856 a6f50 iwlagn.ko (before)
388347 13136 408 401891 621e3 iwlagn.ko (after)
without debug:
text data bss dec hex filename
528575 13072 420 542067 84573 iwlagn.ko (before)
294192 13072 408 307672 4b1d8 iwlagn.ko (after)
This also removes all the IO debug functionality since
it can easily be replaced by tracing, and makes the
code unnecessarily complex.
I haven't done any CPU utilisation measurements, but
given that the hotpaths don't use much IO it is not
likely to have a negative impact; in fact, the size
reduction will reduce cache pressure which possibly
improves performance.
Finally, an unused function or two were removed.
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>
|
|
|
|
|
|
|
|
|
| |
My previous patch left a message talking about
bootstrap, but that's clearly bogus.
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>
|
|
|
|
|
|
|
| |
In alive notify, we should check return code instead of assume everything ok
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
| |
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we loaded a ucode, there's no point in
checking any one that is present, we know
which one is supposed to be present so also
verify that it is exactly the right one.
That also simplifies the code and makes it
faster since it doesn't have to check all.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code in iwlcore_verify_inst_sparse really
doesn't need to keep track of the number of
errors it encountered since a single one is
fatal.
Also, the code in iwl_verify_inst_full is just
used to print out some things, so rename it to
iwl_print_inst and don't give it a return code
and just make it print out the values.
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>
|
|
|
|
|
|
|
| |
In alive notification call, return the status from iwl_send_calib_results()
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
| |
A number of places just use a variable to return
it right away, which is useless, so let's remove
the variables there.
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>
|
|
|
|
|
|
|
|
|
|
| |
All agn devices behave the same, so there's no
need to go through function pointers for any
of the ucode loading functionality.
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>
|
|
|
|
|
|
|
|
|
| |
Driver check alive message from ucode, if it is not ok, then need
to restart the loading process. instead of checking multiple places
for failure, only need to check in once place when receive alive
message from uCode.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PCI L1 Active needs to be disabled while loading the uCode so that the bus
doesn't go to sleep. The enablement of L1 Active should be done after
the uCode has sent the ALIVE response. The enablement of L1 Active was
missing.
Enabling L1 Active allows to save power if the BIOS / bus driver allows
it.
I measured the power consumption while not associated and
idle/associated:
L1 Active disabled: 39 mA = 130mW
L1 Active enabled: 6 mA = 20 mW
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Instead of hardcoding the numbers that must
match mac80211, use the constants. Not that
this means we could change the constants,
but at least this way it's clearer.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|