Commit graph

479 commits

Author SHA1 Message Date
Meenakshi Venkataraman
8fb96d6e17 iwlwifi: move scan related declarations out of iwl-core.h
Move these as part of iwl-core.h 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:24:11 -07:00
Meenakshi Venkataraman
1dfdbdd291 iwlwifi: move utility functions out of iwl-core.h
Move these functions to iwl-agn.h as part of
iwl-core.h 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:59 -07:00
Meenakshi Venkataraman
1591129d54 iwlwifi: move iwl_send_statistics_request to iwl-agn.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:21 -07:00
Meenakshi Venkataraman
e4c52ab4d2 iwlwifi: move iwl_send_bt_config and mark it static
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:22:55 -07:00
Meenakshi Venkataraman
e6a62a6e5f iwlwifi: move iwl_set_tx_power and make it static
This function is used only in iwl-agn-rxon.c,
move it there and mark it static.

Move this function 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:22:41 -07:00
Meenakshi Venkataraman
bedec3a67d iwlwifi: move iwl_chswitch_done to iwl-mac80211.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:22:11 -07:00
Meenakshi Venkataraman
aecd44f00f iwlwifi: move iwl_set_rate to iwl-agn-rxon.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:21:58 -07:00
Meenakshi Venkataraman
47042ac285 iwlwifi: move iwl_connection_init_rx_config to iwl-agn-rxon.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:21:42 -07:00
Meenakshi Venkataraman
50319f74f5 iwlwifi: move iwl_set_flags_for_band to iwl-agn-rxon.c
Moving 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:21:30 -07:00
Meenakshi Venkataraman
fedfa87a52 iwlwifi: move iwl_set_rxon_channel to iwl-agn-rxon.c
Moving 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:21:17 -07:00
Meenakshi Venkataraman
dd64173e37 iwlwifi: move iwl_set_rxon_ht to iwl-agn-rxon.c
Moving 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:21:02 -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
Meenakshi Venkataraman
e381b21432 iwlwifi: move channel switch related functions
With the creation of iwl-agn-devices.c,
iwl-core.c can be cleaned up a bit more by
moving beacon time related functions from
iwl-core.c to iwl-agn-devices.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:18:37 -07:00
Johannes Berg
e96766958c iwlwifi: dynamically determine lib_ops
Having the pointer to lib_ops in the config
makes it impossible to split the driver into
different modules. Determine the ops based on
the device family enumeration to get rid of
the direct pointer.

Also move all the opmode specific code from
the iwl-[1256]000.c files into a new file
iwl-agn-devices.c so that the former only
have configuration data now.

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:10:48 -04:00
Johannes Berg
48dffd397e iwlwifi: split force_reset debugfs file
Split the force_reset debugfs file into two
different files:
 * "rf_reset" triggers a reset of the RF when
   written to and exposes statistics on RF
   resets when read
 * fw_restart triggers a firmware restart when
   written to and lives in the transport

This cleans up all sources of firmware restart
to originate within the transport layer and
allows us to simplify some code.

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
7c5ba4a830 iwlwifi: move queue watchdog into transport
This removes one of the two sources of device
restarts in the upper layer -- those are a bit
inconvenient because normal restarts originate
in the transport. By moving the watchdog down
it can be treated the same.

Also rewrite the watchdog logic. Timers are
much more efficient when they never fire, so
instead firing a timer every 500ms set up a
timer for each TX queue and fire it only when
the queue is really stuck. This avoids the CPU
waking up when everything is working well.

While at it, remove the wd_disable config item
and replace it by simply setting wd_timeout to
IWL_WATCHHDOG_DISABLED (0).

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:08 -04:00
Meenakshi Venkataraman
c736f2358b iwlwifi: move iwl_get_single_channel_number and mark it static
iwl_get_single_channel_number is used only in
iwl-scan.c, move it there and mark it static.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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-09 16:37:45 -04:00
Meenakshi Venkataraman
5562092131 iwlwifi: move iwl_full_rxon_required and mark it static
iwl_full_rxon_required is used only in
iwl-agn-rxon.c. Move it there and mark it
static.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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-09 16:37:44 -04:00
Meenakshi Venkataraman
8931b5761b iwlwifi: move iwl_check_rxon_cmd and mark it static
iwl_check_rxon_cmd is used only in
iwl-agn-rxon.c. Move it there and mark it
static.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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-09 16:37:43 -04:00
Meenakshi Venkataraman
354a4530ab iwlwifi: move iwl_set_rxon_hwcrypto and mark it static
iwl_set_rxon_hwcrypto is used only in
iwl-agn-rxon.c. Move it there and mark it
static.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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-09 16:37:40 -04:00
Meenakshi Venkataraman
dff96c1e63 iwlwifi: Move iwl_send_rxon_timing and make it static
iwl_send_rxon_timing is used only in
iwl-agn-rxon.c, move it there and mark it
static.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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-09 16:37:37 -04:00
Meenakshi Venkataraman
533b426539 iwlwifi: move iwl_init_geos to iwl-agn.c
This is used only in one file, move it there
and make it static.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@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-09 16:37:34 -04:00
Johannes Berg
a75a79a84f iwlwifi: move BT/HT params to shared
Hardware parameters will be shared, so
move the definitions into the shared
header file.

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 13:59:48 -05:00
Johannes Berg
562f08eb80 iwlwifi: remove BT handlers from lib_ops
There's no need to have operations for
these as they simply depend on whether
the device has built-in bluetooth, so
just duplicate the information already
there (whether bt_params is present or
not).

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 13:59:48 -05:00
Johannes Berg
b443d8d8a2 iwlwifi: make iwl_fill_probe_req static
This function is only used in iwl-scan.c, so
if we move it up a little in the file it can
be made static.

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:36 -05:00
Johannes Berg
702e0630ee iwlwifi: move iwl_base_params to shared header
This is used from there, so should be in it.

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:16 -05:00
Johannes Berg
61f0439277 iwlwifi: move traffic log definitions
These are DVM specific, and shouldn't be
in iwl-shared.h.

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
Emmanuel Grumbach
4d660ce52e iwlwifi: remove iwl_reset_traffic_log from shared
It is op_mode related

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-27 13:56:39 -08:00
Wey-Yi Guy
dd63b84eb4 iwlwifi: remove un-necessary return
Already return 0, change to void

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17 10:58:31 -08:00
Emmanuel Grumbach
6d4dec7ba4 iwlwifi: iwl_set_hw_params returns always 0
Remove the return value.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17 10:53:41 -08:00
Emmanuel Grumbach
1df06bdc6f iwlwifi: stop_hw replace enable_rfkill_int
This trans_ops->stop_hw leaves the RFKILL interrupt enabled,
we can call that one instead of enable_rfkill_int. By that,
we reduce the numbers of acceesses to the NIC from the upper
layers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:37:52 -08:00
Emmanuel Grumbach
1042db2af1 iwlwifi: give trans to all the read / write functions
From now on, the transport layer in charge of providing access to the
device. So change all the driver to give a pointer to the transport
to all the low level functions that actually access the device.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:35:45 -08:00
Wey-Yi Guy
4e3182626a iwlwifi: update Copyright
Update Copyright to 2012

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-01-06 13:03:24 -08:00
Johannes Berg
7a0b3b08df iwlwifi: remove unused AMPDU factor/density configuration
These are unused, so can be removed safely. They also
don't make a lot of sense in Bluetooth configuration.

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:23:58 -08:00
Don Fry
3862241945 iwlwifi: move iwl_cfg from iwl_priv to iwl_shared
Move the configuration pointer from the upper level iwl_priv to the
lower level iwl_shared structure, with associated code fixes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16 07:22:16 -08:00
John W. Linville
d7a4858c0f Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn.c
	drivers/net/wireless/libertas/cfg.c
2011-12-02 15:44:03 -05:00
Wey-Yi Guy
9995ffe5f5 iwlwifi: change the default behavior of watchdog timer
The current default watchdog timer is enabled, but we are seeing issues on
legacy devices. So change the default setting of watchdog timer to per
device based. But user still can use the "wd_disable" module parameter
to overwrite the system setting

Cc: stable@vger.kernel.org #3.0+
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-02 14:53:17 -05:00
Johannes Berg
c27bdc84d6 iwlagn: remove calibration knowledge
The init microcode knows very well which calibrations
are required and sends us results for those that are.
Consequently, we can just send all of those to the RT
uCode again.

The problem with having the driver know about this is
that it is a uCode feature, not a hardware feature so
the config is completely unsuitable.

The only thing we need to check is whether the device
needs crystal calibration or not, add a new parameter
to the configuration for that.

This makes new uCode work on 6000 series devices.

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-28 14:44:25 -05:00
Wey-Yi Guy
ba4c531984 iwlwifi: move hw_scan into _mac80211 file
iwlagn_mac_hw_scan should belong to _mac80211 callback.

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
Wey-Yi Guy
0b7a4c788f iwlwifi: move more mac80211 callback function
Move more mac80211 related functions to _mac80211 file

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
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
ade4c649a0 iwlagn: rename all the mac80211 callback functions
Use the same calling style for all the mac80211 callback functions

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
317d09f769 iwlagn: add "echo" test when command queue stuck
When detect command queue stuck, instead of reload the firmware
do the "echo" test to make sure it is really stuck before reload

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
Eliad Peller
8a3a3c85e4 mac80211: pass vif param to conf_tx() callback
tx params should be configured per interface.
add ieee80211_vif param to the conf_tx callback,
and change all the drivers that use this callback.

The following spatch was used:
@rule1@
struct ieee80211_ops ops;
identifier conf_tx_op;
@@
	ops.conf_tx = conf_tx_op;

@rule2@
identifier rule1.conf_tx_op;
identifier hw, queue, params;
@@
	conf_tx_op (
-		struct ieee80211_hw *hw,
+		struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		u16 queue,
		const struct ieee80211_tx_queue_params *params) {...}

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:41 -04:00
Johannes Berg
98efb4a52b iwlagn: make iwl_scan_cancel_timeout void
The return value of iwl_scan_cancel_timeout()
isn't used anywhere, so let's just remove it.

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-27 14:34:08 -04:00
Johannes Berg
0288356272 iwlagn: remove Kelvin support
Only 5150 series devices report their temperature
in Kelvin, and for those we already convert it to
Celsius when storing into priv->temperature, so
there's no way priv->temperature will ever be in
Kelvin. Remove support for this.

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-27 14:34:08 -04:00
Johannes Berg
6e809a16d9 iwlagn: move scan code to scan file
Since the driver split there's no longer a need
to have the scan code scattered across multiple
files, so move it all back to iwl-scan.c

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:41 -04:00
Wey-Yi Guy
c6f30347a7 iwlagn: add support for v2 of temperature offset calibration
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>
2011-09-19 16:10:10 -04:00
Fry, Donald H
b8c2b05e14 iwlagn: simplify chain_noise_num_beacons indirection
chain_noise_num_beacons is set and never changes.  Use the #define
rather than 3 levels of indirection.

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>
2011-09-19 15:58:29 -04:00
Emmanuel Grumbach
522376d206 iwlagn: clean up of transport layer
Move a few declarations needed by the transport layer to iwl-shared.h
Move iwl_cmd_meta, iwl_tx_queue and friends to the internal transport
header file.
Move iwl_device_cmd iwl_host_cmd and friends to iwl-trans.h since
these structs are used in the API to the transport layer.
Move get_cmd_string to the upper layer with a declaration in
iwl-shared.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-09-14 13:56:37 -04:00