Commit Graph

52 Commits (37a579903efaf25b74fcf1fd645817af94d36152)

Author SHA1 Message Date
Meenakshi Venkataraman f4c37176ef iwlwifi: do not send lq cmd when station add fails
When adding a station fails in
iwl_restore_stations, the driver treats it
like a successful station add and sends a
link quality command, when it it shouldn't.

This patch fixes one of the potential
sources for kernel warnings like this one:

WARNING: at drivers/net/wireless/iwlwifi/iwl-agn-sta.c:905 iwl_send_lq_cmd+0x130/0x217 [iwlwifi]()
Hardware name: 3323A2G
Modules linked in: ...
Pid: 17359, comm: kworker/u:2 Tainted: G           O 3.3.0-wl+ #1
Call Trace:
 [<ffffffff81039620>] warn_slowpath_common+0x7e/0x96
 [<ffffffff8103964d>] warn_slowpath_null+0x15/0x17
 [<ffffffffa02a9f0b>] iwl_send_lq_cmd+0x130/0x217 [iwlwifi]
 [<ffffffffa02aa1fb>] iwl_restore_stations+0x209/0x289 [iwlwifi]
 [<ffffffffa02b07c2>] iwlagn_commit_rxon+0x602/0x7bd [iwlwifi]
 [<ffffffffa02b111f>] iwlagn_bss_info_changed+0x247/0x31a [iwlwifi]
 [<ffffffffa0861437>] ieee80211_bss_info_change_notify+0x1a5/0x1ba [mac80211]
 [<ffffffffa088afad>] ieee80211_destroy_auth_data+0x4b/0x70 [mac80211]
 [<ffffffffa088df26>] ieee80211_sta_work+0xb5/0x954 [mac80211]

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-25 11:12:41 -04:00
Joe Perches 2e42e4747e drivers/net: Convert compare_ether_addr to ether_addr_equal
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-05-10 23:33:01 -04:00
Johannes Berg 56322f5e0d iwlwifi: remove TX/RX frame statistics
Keeping statistics per frame type really isn't
very useful, and needs a huge amount of code
so remove it. Since that is the only thing in
iwl-core.{c,h} now, those files can be killed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:27:56 -07:00
Meenakshi Venkataraman f32cadfc0d iwlwifi: move iwl_bcast_addr to iwl-agn-sta.c
Move this as part of iwl-core.c cleanup.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-12 14:23:48 -07:00
Meenakshi Venkataraman 5edc565d60 iwlwifi: move iwl_is_ht40_tx_allowed out of iwl-core.c
This is really something determined by
station parameters, so move it to
iwl-agn-sta.c.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-12 14:19:39 -07:00
Johannes Berg 4dcba6d3c5 iwlwifi: make iwl_sta_fill_lq static
It's only used in a single place.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-12 14:18:03 -07:00
Johannes Berg 9e295116bb iwlwifi: move hw_params into priv
The hw_params are mostly values that are
derived from the actual hardware config.
As such, while it is possible that MVM
will require similar ones, it makes more
sense -- at least for now -- to put them
into the DVM struct.

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>
2012-04-12 15:06:09 -04:00
Johannes Berg 974205153b iwlwifi: don't delete AP station directly
With the mac80211 deauth sequence changes, the
station is deleted before the device is set
unassociated. This can cause the device to get
confused as it expects the station to be there
while the associated bit is set.

To fix this, do not delete the AP station from
the device when mac80211 asks for deletion,
instead just mark it as unused and rely on the
unassociated RXON to drop it from the station
database in the device.

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>
2012-03-08 14:02:29 -05:00
Don Fry 83626404a7 iwlwifi: more status bit factoring
Continue splitting the status bits between transport and op_mode.
All but a few are separated.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-08 13:59:55 -05:00
Johannes Berg e7a0d0c449 iwlwifi: clean up iwl-commands.h
Do some cleanups here:
 * remove an unused prototype
 * remove some unused constants
 * clean up includes

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-07 13:56:36 -05:00
Johannes Berg f8d7c1a18d iwlwifi: move packet to transport
The base packet structure will (hopefully) be
the same for all transports, but what is in it
differs. Remove the union of all the possible
contents and move the packet itself into the
transport header file. This requires changing
all users of the union to just use pkt->data.

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>
2012-03-07 13:56:34 -05:00
Johannes Berg b1eea297d6 iwlwifi: move mutex out of shared
Now the mutex no longer needs to be
shared, so move it into iwl_priv.

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>
2012-03-07 13:51:49 -05:00
Johannes Berg e10a0533a9 iwlwifi: add wrappers for command sending
Add wrappers to send commands from the DVM
op-mode (which essentially consists of the
current driver). This will allow us to move
specific sanity checks there.

Also, this removes iwl_trans_send_cmd_pdu()
since that can now be taken care of in the
DVM-specific wrapper.

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>
2012-03-07 13:51:48 -05:00
Johannes Berg ab0bd5b32a iwlwifi: fix station HT parameters
My patch "iwlwifi: simplify auth/assoc flow"
caused a serious throughput degradation due
to me forgetting that there are HT settings
in the station table. To restore throughput,
set these parameters correctly when the sta
moves to assoc state.

This patch should probably be merged with
the auth/assoc redesign patch for upstream.
In that case, this paragraph should be added
to the commit log as the third paragraph
(before talking about RXON):

However, as we only get the station HT data
when the station moves into assoc state, we
also need to program this into the device
(and copy it into our database) then.

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>
2012-03-06 15:16:15 -05:00
Johannes Berg 48a2d66f58 iwlwifi: don't pass iwl_rx_mem_buffer to upper layers
struct iwl_rx_mem_buffer implementation details
(DMA address, list pointers) that the upper
layers don't need. Introduce iwl_rx_cmd_buffer
that is passed upstream and only contains the
needed data (the page). Additionally, access
this data only via accessor functions, allowing
us to change the implementation in the future.
These accessors are rxb_addr() (as before) and
rxb_steal_page() to take ownership of the data.

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>
2012-03-06 15:16:12 -05:00
Johannes Berg 65b94a4abf iwlwifi: pass response packet directly
When CMD_WANT_SKB is set for a (synchronous)
command, the response is passed back to the
caller which is then responsible for freeing
it. Make this more abstract with real API,
passing directly the response packet in the
new cmd.resp_pkt member and also introduce
iwl_free_resp() to free the pages -- this
way the upper layers don't have to directly
touch the page implementation.

NOTE: This breaks IDI -- the new code isn't reflected there yet!

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>
2012-03-06 15:16:12 -05:00
Johannes Berg 15b86bff99 iwlwifi: move wowlan bool into priv
With the new WoWLAN flow into the transport
there no longer is a need for this to be
shared, so move it into priv.

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>
2012-03-06 15:16:12 -05:00
Johannes Berg fb5fe5b9da iwlwifi: simplify auth/assoc flow
With mac80211 now giving us station information
(via the sta_state callback) before auth/assoc
we can get rid of tx_sync by adding the station
early for the case of managed interfaces. Keep
AP mode actions the same for now.

As we now get the BSSID early, we can also get
rid of iwl_reprogram_ap_sta().

We can still optimise the number of RXONs we
send to the device, but that can be done later.

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>
2012-03-06 15:16:10 -05:00
Johannes Berg fa23cb04b3 iwlwifi: make sta lock private & BH lock
Now that the transport has its own locking,
there's no need to have the sta_lock in the
shared data. Also, it can be a BH lock as
it's not used from IRQ handlers.

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>
2012-03-06 15:16:09 -05:00
Johannes Berg 9451ca1a31 iwlwifi: build some station commands directly
In the powersave related functions we only need
to set a few parameters for the station command
and can otherwise leave it blank -- there's no
need to copy it from the database.

This allows us to not use the sta lock here.

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>
2012-03-06 15:16:08 -05:00
Johannes Berg 40e4e6868c iwlwifi: simplify code in iwlagn_key_sta_id
Simplify the code by returning directly in the
error case and replacing the switch/if with a
single if statement.

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>
2012-03-06 15:16:08 -05:00
John W. Linville 8701ff0a88 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2012-02-29 14:53:21 -05:00
Johannes Berg 5dcbf48047 iwlwifi: fix key removal
When trying to remove a key, we always send key
flags just setting the key type, not including
the multicast flag and the key ID. As a result,
whenever any key was removed, the unicast key 0
would be removed, causing a complete connection
loss after the second rekey (the first doesn't
cause a key removal). Fix the key removal code
to include the key ID and multicast flag, thus
removing the correct key.

Cc: stable@vger.kernel.org
Reported-by: Alexander Schnaidt <alex.schnaidt@googlemail.com>
Tested-by: Alexander Schnaidt <alex.schnaidt@googlemail.com>
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>
2012-02-21 14:45:26 -05:00
Wey-Yi Guy fb4961dbc2 iwlwifi: update Copyright
Update Copyright to 2012

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-24 14:08:36 -05:00
Wey-Yi Guy 2da424b077 iwlwifi: Sanity check for sta_id
On my testing, I saw some strange behavior

[  421.739708] iwlwifi 0000:01:00.0: ACTIVATE a non DRIVER active station id 148 addr 00:00:00:00:00:00
[  421.739719] iwlwifi 0000:01:00.0: iwl_sta_ucode_activate Added STA id 148 addr 00:00:00:00:00:00 to uCode

not sure how it happen, but adding the sanity check to prevent memory
corruption

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-24 14:08:35 -05:00
Johannes Berg 69b172f796 iwlagn: remove iwlagn_build_addsta_hcmd
This function is not needed:
 * we already have the "cmd" input to it in the
   same type (and on the stack elsewhere)
 * the "legacy_reserved" parameter is never set,
   so will always be zero

Remove the function and the stack copy of the
input command.

This is still left from when iwlegacy was part
of the driver -- then we needed a translation
for the command for 3945.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16 07:24:09 -08:00
Emmanuel Grumbach 855c2ee85c iwlwifi: reset the tid_data when a station is removed
Since the station is removed, we need to reset the information that
was accounted for this station.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16 07:23:25 -08:00
Wey-Yi Guy 7f62cd17e0 iwlwifi: minor cleanup
Remove the defines only used by legacy devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08 15:54:07 -08:00
Johannes Berg a7e12c8e22 iwlagn: fix HW crypto for TX-only keys
Group keys in IBSS or AP mode are not programmed
into the device since we give the key to it with
every TX packet. However, we do need mac80211 to
create the MMIC & PN in all cases. Move the code
around to set the key flags all the time. We set
them even when the key is removed again but that
is obviously harmless.

Cc: stable@vger.kernel.org
Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-02 08:21:32 -08:00
Wey-Yi Guy 76b2933111 iwlwifi: move station functions to mac80211
The station related mac80211 callback functions should belong to _mac80211

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 12:32:54 -05:00
Johannes Berg aed0fd4acd iwlagn: fix NULL ptr deref when reprogramming sta w/o LQ
Reinette reports a crash in iwl_reprogram_ap_sta(). The
debugging shows:

  b1 16    mov    $0x16,%cl
 *f3 a5    rep movsl %ds     <-- trapping instruction:(%rsi),%es:(%rdi)

which is a memcpy of 22 (0x16) words (movsl). this points
to "priv->stations[sta_id].lq" being NULL since that is
the memcpy() of that size here.

The only way I see for this to happen is if we try to
do some RXON reprogramming while connecting to an AP,
after tx_sync() but before full setup, but that seems
like something that might very well happen.

Fix this by checking if the LQ is present and only then
reprogramming it.

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
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-11-11 12:32:52 -05:00
Todd Previte b36b110c57 iwlwifi: Suppress noisy syslog messages when RF_KILL switch engaged
When a station is associated with an AP and the RF_KILL switch is engaged,
numerous error messages were sent to the system log. The error messages
were the result of the failure(s) of the various submodules to perform
their tasks after the radios were disabled.

To resolve this situation, the messages were modified to use a new macro,
IWL_DEBUG_QUIET_RFKILL. This macro allows for the RF_KILL error messages
to be sent to the log provided that IWL_DEBUG is true and IWL_DL_RADIO
is '1'. For all other cases, the error messages resulting from an RFKILL
event will not be sent to the system log. Messages logged because of an
RFKILL will be tagged with the prefix '(RFKILL)' to clarify the cause of
the error.

Signed-off-by: Todd Previte <toddX.a.previte@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11 12:32:52 -05:00
Wey-Yi Guy c745f55baf iwlagn: merge station management functions
After driver split, no need to separate station management functions
in two files, merge 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:13 -04:00
Wey-Yi Guy 770c72c481 iwlagn: add debug for mac80211 callback
Add IWL_DEBUG_MAC80211 debug for all mac80211 callback function

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
Johannes Berg c079166e1b iwlagn: send simple LQ command for WoWLAN
For some reason, WoWLAN doesn't always seem to
be happy with more advanced LQ commands. Since
we don't need them as we're not going to send
a lot of data, simply program the station with
the very simple default LQ command.

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-10-14 14:48:10 -04:00
Emmanuel Grumbach 845a9c0d8a iwlagn: move all iwl_is_XXX helpers to iwl-shared.h
Logic move after all priv->status moved to struct 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>
2011-08-29 15:25:35 -04:00
Emmanuel Grumbach e6bb4c9c00 iwlagn: bus layer chooses its transport layer
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>
2011-08-29 15:25:32 -04:00
Emmanuel Grumbach f39c95e8d7 iwlagn: priv->sta_lock moves to iwl_shared
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>
2011-08-29 15:25:32 -04:00
Emmanuel Grumbach 6ac2f839b0 iwlagn: priv->mutex moves to iwl_shared
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>
2011-08-29 15:25:31 -04:00
Emmanuel Grumbach d618912417 iwlagn: hw_params moves to iwl_shared
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>
2011-08-29 15:25:30 -04:00
Johannes Berg e1b1c0875d iwlagn: rename iwlagn_set_dynamic_key
We now have iwlagn_set_dynamic_key() and
iwl_set_dynamic_key() which is confusing,
rename the former to iwlagn_send_sta_key()
to better reflect what it does -- it only
sends a command and doesn't change driver
state.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:32:03 -07:00
Johannes Berg 5a3d9882b8 iwlagn: rewrite HW crypto
As I just discovered while doing WoWLAN, HW crypto
is done wrong for GTKs: they should be programmed
for the AP station ID (in the managed mode case)
and the HW can actually deal with multiple group
keys per station as well (which is useful in IBSS
RSN but that I've chosen not to use this).

To fix all this, modify the way keys are sent to
the device and key offsets are allocated. After
these changes, key offsets are stored into the
hw_key_idx which we can then track for the key
lifetime, not relying on our sta_cmd array. WEP
default keys get special treatment, of course.

Additionally, since I had the API for it, we can
now pre-fill TKIP phase 1 keys for RX now that we
can obtain the P1K from mac80211, a capability I
had added for WoWLAN initially.

Finally, some keys simply don't need to be added
into the device's key cache -- a key that won't
be used for RX is only needed in the TX header,
so "pretend" to have accepted any key without
adding it into the device -- no need to use up
key space there for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:31:25 -07:00
Johannes Berg a920bffb88 iwlagn: remove keyinfo cache
iwlagn keeps a copy of key stuff internally but
never actually uses it, so remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21 07:30:53 -07:00
Emmanuel Grumbach 41c5054266 iwlagn: transport layer receives struct iwl_trans*
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>
2011-07-21 07:29:48 -07:00
Emmanuel Grumbach bdfbf0924a iwlagn: provide heplers to access the transport ops
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>
2011-07-11 15:02:04 -04:00
Emmanuel Grumbach e419d62d72 iwlagn: consolidate the API that sends host commands and move to transport
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>
2011-07-11 15:02:03 -04:00
Johannes Berg f775aa06d2 iwlagn: don't use CCK rates for P2P interfaces
P2P interfaces must not use CCK rates, only OFDM
rates are allowed. To set this up, we need to set
up the broadcast station to start with 6M instead
of starting with 1M.

Since the interface type can change, also reset
the broadcast station when RXON changes.

This will affect beacons as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24 11:54:51 -07:00
Johannes Berg 3fa507386d iwlagn: prepare for multi-TB commands
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>
2011-05-13 10:31:52 -07:00
Wey-Yi Guy 901069c714 iwlagn: change Copyright to 2011
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07 15:51:37 -04:00
Johannes Berg 3240cab3dd iwlagn: clean up some 3945/4965 remnants
When the driver was split, a bunch of definitions
for the 3945 and 4965 devices stayed around, but
they're now useless so remove (some of) them.

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-04-07 15:49:41 -04:00