Commit Graph

589 Commits (5eb82498e3a6da8a979c48945e3c1a85c10ccc25)

Author SHA1 Message Date
Zhu Yi 808e72a088 iwlwifi: fix software rf_kill problem when interface is down
The patch fixes the problem that software rf_kill messes up the
card status when it is disabled if the interface is down.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:09 -04:00
Emmanuel Grumbach 95483b69c8 iwlwifi: remove dead code iwl4965_calc_db_from_ratio
This patch removes iwl4965_calc_db_from_ratio which is dead code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:09 -04:00
Emmanuel Grumbach 91dbc5bdba iwlwifi: retfactor get_temperature functions
This patch renames iwl4965_get_tempearture to iwl4965_hw_get_temperature
and replaces usage of original iwl4965_hw_get_temperature by
direct access to priv->temperature.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:09 -04:00
Emmanuel Grumbach 47f4a58716 iwlwifi: move iwl4965_rf_kill_ct_config to iwl-core.c
This patch moves iwl4965_rf_kill_ct_config to iwl-core.c.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:09 -04:00
Tomas Winkler f53696de67 iwlwifi: cleans up scanning code
This patch
1. cleans up scanning code.
2. It adds round robin of TX antannas/chains.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:08 -04:00
Tomas Winkler e7d326ac43 iwlwifi: move rate helpers to iwlcore
This patch moves rate helpers to iwlcore.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:08 -04:00
Tomas Winkler 2a421b91d6 iwlwifi: move scan to iwl-scan.c iwlcore
This patch moves scan code to iwl-scan.c file in iwlcore module.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:08 -04:00
Emmanuel Grumbach 4564ce8b0e iwlwifi: add bad length check for WEP keys
This patch adds a check for bad length in set key flow. This solves the
Oops reported by Thomas Backlund, Joonwoo Park and Ian Schram.
It also adds some debug printing that can be useful.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:08 -04:00
Tomas Winkler 630fe9b6f7 iwlwifi: refactor setting tx power
This patch
1. Refactors settings of tx power
2. enables iwconfig txpower <value>
3. adds 5000 HW tx power

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:08 -04:00
Tomas Winkler 25a6572cc1 iwlwifi: refactor tx aggregation response flow
This patch refactors tx aggregation respnse flow
and fixes bug revealed by tx_info to cb patch

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:07 -04:00
Assaf Krauss 398f9e765f iwlwifi: Fix mode changes (ad-hoc <--> managed)
This fix allows to move between modes (ad-hoc to managed, and vice versa).
Since mode changes can only be done while driver is down, check for ibss
support can only be made when the channel is set (afte the driver goes up).

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:07 -04:00
Assaf Krauss c46fbefa32 iwlwifi enabling IBSS (Ad-Hoc) mode
This patch enables ibss mode. It consists of two changes upon entering ibss
mode:
1. Removing the redundant line which clears the driver's station table.
   This line creates a discrepancy between the driver and the FW's station
   table. This prevented the generation of beacons.
2. Assigning a default value to priv's assoc_id. Normally given by an AP in
   STA mode, this field is used as an indication for association. Being 0,
   it prevented normal TX flow.
3. Remove a redundant ADD_STA command that cause uCode error.
4. Delay the set_mode until after the uCode is ready.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:07 -04:00
Emmanuel Grumbach f3d5b45b40 iwlwifi: fix resart flow after fw error
Clear STATUS_FW_ERROR in the _up_ flow before reseting NIC.
UP flow will otherwise call restart again causing endless restart loop.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:07 -04:00
Mohamed Abbas 64e72c3efc iwlwifi: fix resume SW RF-kill
This patch fixes SW RF-kill. If we resumed from S3 state with SW RF-kill
set, the driver wouldn't be able to remove SW RF-kill. This patch fixes
this.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:07 -04:00
Tomas Winkler 77c5d08e6c iwlwifi: format log prints for easier parsing
This patch changes uCode log print to for easier parsing.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:07 -04:00
Emmanuel Grumbach 753f766108 iwlwifi: fix bug when moving from 11gn to 11a or 11an to 11g
It is wrong to set the rxon channel according to the ht-channel
in case there is a mismatch (e.g. when there is no ht).

Signed-off-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:06 -04:00
Emmanuel Grumbach 963f55178b iwlwifi: remove redundant flags regarding to FAT channel
This patch removes redundant flags regarding to FAT channel. Use
mac80211's flag instead.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:06 -04:00
Tomas Winkler 838f8a7485 iwlwifi: remove unused flag
This patch removes IEEE80211_CHAN_W_RADAR_DETECT flag.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:06 -04:00
Ron Rindjunsky faa2971838 iwlwifi: fix allow iwlwifi to aggregate according to tid load
This fix opens back the aggregation decision path for iwlwifi.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:06 -04:00
Ron Rindjunsky 263b5f5aae iwlwifi: use ieee80211_conf to examine rate capabilities
This patch switches the use of internal iwlwifi structure with
ieee80211_conf in order to examine ht rate capabilities.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:06 -04:00
Tomas Winkler e26e47d944 iwlwifi: add TX aggregation code for 5000 HW
This patch adds TX aggregation handler for 5000 HW.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:06 -04:00
Ron Rindjunsky 7f3e4bb60f iwlwifi: map sw and hw ampdu queues
This patch maps sw and hw queues (for aggregations), so the right
mac80211 queue will be waken when ieee80211_wake_queue is invoked.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:05 -04:00
Emmanuel Grumbach 203566f359 iwlwifi: add possibility to disable tx_power calibration
This patch adds the possibility to disable the tx_power calibration.
In 5000 HW, this calibration is implemented in uCode, hence, it is
disabled in driver by default.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:05 -04:00
Emmanuel Grumbach 4e39317df0 iwlwifi: clean up in setup/cancel deferred work
This patch makes some clean up in setup/cancel_deferred_work.
iwl_setup_deferred_work does the work that is common to 4965
and 5000, then it calls to HW specific handlers.

This patch also removes uneeded work_struct from iwl_priv.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:04 -04:00
Emmanuel Grumbach 16e727e866 iwlwifi: removes the RUN_TIME_CALIB ifdef
This patch removes the possibility not to compile the run time
calibrations. It also renames priv->sensitivity_work to
priv->run_time_calib_work, and moves bg_run_time_calib to iwl4965_base
since it is common to both: 4965 and 5000.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:04 -04:00
Ron Rindjunsky 4f85f5b392 iwlwifi: removing IWL4965_HT config
This patch removes CONFIG_IWL4965_HT #ifdefs for iwl 4965 and 5000. 11n
feature is stable in those drivers and its mode of operation is determined
in mac80211, so this dependency is not needed any more.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14 12:18:01 -04:00
David S. Miller 65b53e4cc9 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/tg3.c
	drivers/net/wireless/rt2x00/rt2x00dev.c
	net/mac80211/ieee80211_i.h
2008-06-10 02:22:26 -07:00
Marcin Slusarz b6b16196b0 iwlwifi: fix oops in iwl3945_led_brightness_set
fix race between:
ieee80211_open->ieee80211_led_radio->led_trigger_event->led_set_brightness->iwl3945_led_brightness_set
(which assumes that "led->priv" is not NULL)
and
iwl3945_pci_probe->iwl3945_setup_deferred_work->(...)->iwl3945_bg_alive_start->iwl3945_alive_start->iwl3945_led_register->iwl3945_led_register_led
which sets priv field in struct iwl3945_led
after
led->led_dev.brightness_set = iwl3945_led_brightness_set;
(...)
led_classdev_register(device, &led->led_dev);

http://kerneloops.org/guilty.php?guilty=iwl3945_led_brightness_set&version=2.6.25-release&start=1671168&end=1703935&class=oops

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: linux-wireless@vger.kernel.org
Cc: ipw3945-devel@lists.sourceforge.net
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-09 15:53:38 -04:00
Tomas Winkler 82a66bbbe9 iwlwifi: clean iwl4965_mac_config
This patch cleans up iwl4965_mac_config.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:27 -04:00
Emmanuel Grumbach d2f18bfd9b iwlwifi: send calibration results as HUGE commands
This patch saves memory by reducing the size of the entry in the txq. It
was 640 because of the calibration commands. Calibration commands are now
sent as HUGE commands (using the extra 1024 bytes at the end of the command
txq), hence, there is no need for 640 in every entry any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:27 -04:00
Emmanuel Grumbach 6724962508 iwlwifi: remove debugfs entries before cfg80211
This patch solves a bug in debugfs unregistration. iwlwifi registers its
debugfs files under cfg80211's dir, but removed its files only after having
unregistered mac80211 that removes cfg80211 debugfs dir. This garbaged
debugfs and didn't allow to rmmod and insmod iwlwifi several times in a
row.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:26 -04:00
Emmanuel Grumbach 261415f77a iwlwifi: fix a memory leak in scan
This patch fixes a memory leak that the scan buffer isn't released
on exit.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:26 -04:00
Emmanuel Grumbach 4d38c2e8ea iwlwifi: disable FAT channel when not permitted
This patch disables FAT channel when it is not permitted according to
the EEPROM.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:26 -04:00
Ron Rindjunsky 3c57601d0a iwlwifi: move iwl_get_hw_mode to iwl-core.h
This patch moves iwl_get_hw_mode to iwl-core.h.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:26 -04:00
Ron Rindjunsky 37a44211cb iwlwifi: Rx handlers common use for 4965 and 5000
This patch moves Rx handlers from iwl 4965 only use to common use along
with iwl 5000, thus enables Rx path to iwl 5000.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:25 -04:00
Tomas Winkler 5e1dd8dc19 iwlwifi: add frame count limit to link quality command
This patch adds frame count limit to link quality host command.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:25 -04:00
Tomas Winkler 30e553e3ea iwlwifi: move aggregation code to iwl-tx.c
This patch moves aggregation action code to iwl-tx.c in iwlcore.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:25 -04:00
Tomas Winkler 5083e56326 iwlwifi: move iwl_sta_modify_enable_tid_tx to iwl-sta.c
This patch moves iwl_sta_modify_enable_tid_tx into iwl-sta.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:25 -04:00
Ron Rindjunsky fe7a90c2b7 iwlwifi: iwl-5000 add rxon_assoc
This patch adds rxon assoc command for 5000 HW.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:25 -04:00
Tomas Winkler 972cf447d2 iwlwifi: implement txq invalidate byte count table
This is required to overcome a bug in 5000 HW byte count table.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:25 -04:00
Tomas Winkler 17b889290a iwlwifi: move tx reclaim flow into iwl-tx
This patch
1. moves TX reclaim flow into iwl-tx
2. separates command queue and tx queue reclaim flow

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:24 -04:00
Guy Cohen a5e8b5056e iwlwifi: fix in-column rate scaling
This patch fixes cases that the code raised or didn't decrease
the rate although the success ratio was not good.

Signed-off-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:24 -04:00
Tomas Winkler f20217d9d5 iwlwifi: move 4965 tx response into iwl-4965.c
This patch moves 4965 tx repsone into iwl-4965.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:24 -04:00
Ron Rindjunsky e532fa0e3c iwlwlifi: impelemnt 5000 tx response path
This patch implements 5000 HW tx response path.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:24 -04:00
Tomas Winkler a332f8d618 iwlwifi: move tx response common handlers to iwlcore
This pach moves common tx response handlers to the header files
and iwl-tx.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:24 -04:00
Ron Rindjunsky 001caff0da iwlwifi: add iwl5000_tx_response structure
This patch adds iwl5000_tx_repsons structure.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:24 -04:00
Ron Rindjunsky fe9b6b720b iwlwifi: activate status ready timeout only for run time ucode
This patch makes driver state timeout checks on ucode alive response
only if run time ucode have been loaded.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:23 -04:00
Tomas Winkler 7c616cba24 iwlwifi-5000: implement initial calibration for 5000
This patch adds initial calibration framework for 5000 HW faimily.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:23 -04:00
Tomas Winkler c135475439 iwlwifi: move iwl_rx_missed_beacon_notif to iwl-rx.c
This patch moves iwl_rx_missed_beacon_notif rx handler to iwl-rx.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:23 -04:00
Tomas Winkler 42132bce80 iwlwifi: move add sta handler to iwl-sta.c
This patch moves add_sta hander to iwl-sta.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:23 -04:00
Tomas Winkler 7a999bf0c5 iwlwifi: add remove station functionality
This patch adds remove station functionality, which is required for
5000 and AP mode.

There are still some gaps in managment that need to be closed but it
provides sufficient functionality for 5000 HW.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:23 -04:00
Tomas Winkler b3bbacb78b iwlwifi: move iwl_rxq_stop into iwl-rx.c
This patch moves iwl_rxq_stop into iwl-rx.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:22 -04:00
Tomas Winkler da1bc4539f iwlwifi: move txq_ctx_stop into iwl-tx.c
This patch moves txq_ctx_stop into iwl-tx.c iwlcore module.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:21 -04:00
Tomas Winkler 46315e0122 iwlwifi: refactor stop master function
This patch refactors stop master function for 4965 and 5000.
Currently it duplicates the function.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:20 -04:00
Tomas Winkler f118a91d16 iwlwifi: implement apm stop function
This patch adds apm stop function for 4965 and 5000.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:20 -04:00
Tomas Winkler 7f066108d1 iwlwifi: implement apm reset flow
This patch implements apm reset flow for 4965 and 5000.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:20 -04:00
Tomas Winkler 8f0618914e iwlwifi: setup correctly L1 L0S pi link values
This patch setups L1 L0S pci link values.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:20 -04:00
Tomas Winkler 885ba202ca iwlwifi: remove 4965 from alive_resp structures
This patch removes 4965 from alive_resp and init_alivie_resp.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:20 -04:00
Tomas Winkler 4a4a9e81ae iwlwifi: clean up alive_start routine
This patch cleans up alive_start routine. It removes 4965 from the common
code and moves the run time calibration reset into a common code.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:20 -04:00
Tomas Winkler 84df9d3130 iwlwifi: remove notif_missed_beacons variable
This patch removes notif_missed_beacons from priv since it was never
used. Missed beacons notification will have only meaning if roaming
will be implemented in mac80211.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:19 -04:00
Tomas Winkler c317fee3c1 iwlwifi: remove unused variable form __iwl4965_down
This patch removes unused variable from __iwl4965_down.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:19 -04:00
Tomas Winkler 2d87889f61 iwlwifi: mark 4965 ucode types
This patch marks 4965 ucode types.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:19 -04:00
Zhu Yi 95b1a8224a iwlwifi: create drivers debugfs dir under wiphy->debugfsdir
This patch creates driver's debugfs tree under wiphy->debugfsdir.
This patch fixes collision in debugfs if two or more NICs are plugged.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:19 -04:00
Ron Rindjunsky bd68fb6f01 iwlwifi: increase max payload of iwl_cmd
This patch increases iwl_cmd payload maximum size from 360 to 640
to fit some of iwl5000 commands as well.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:18 -04:00
Gregory Greenman e1dfc0851a iwlwifi: use uCode error and event tables pointer w.r.t loaded image
This patch updates the usage of the pointers to error and log tables
received in alive response w.r.t. the current uCode image.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:17 -04:00
Ron Rindjunsky 87283cc129 iwlwifi: add RTC data address for iwl5000
This patch fills the valid_rtc_data_addr handler in iwl5000.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:17 -04:00
Ester Kummer ede0cba45f iwlwifi: move iwl_dump_nic_error_log to iwlcore module
This patch moves the function iwl_dump_nic_error_log to iwlcore.
Remove sysfs entry it cannot be really triggered.

Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-03 15:00:17 -04:00
Guy Cohen 135a5484c3 iwlwifi: fix rate scale TLC column selection bug
This patch fixes a case that a wrong maximal rate is selected when
searching for better configurations.

Signed-off-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28 16:43:48 -04:00
Guy Cohen 47cfd46396 iwlwifi: fix exit from stay_in_table state
When exiting from stay in table state (e.g. timer expiration),
all the statistics are reset and the RS flow should not continue
but only after enough statistics are collected again.

Signed-off-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28 16:43:47 -04:00
Johannes Berg e253008360 mac80211: use multi-queue master netdevice
This patch updates mac80211 and drivers to be multi-queue aware and
use that instead of the internal queue mapping. Also does a number
of cleanups in various pieces of the code that fall out and reduces
internal mac80211 state size.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:14 -04:00
Johannes Berg e039fa4a41 mac80211: move TX info into skb->cb
This patch converts mac80211 and all drivers to have transmit
information and status in skb->cb rather than allocating extra
memory for it and copying all the data around. To make it fit,
a union is used where only data that is necessary for all steps
is kept outside of the union.

A number of fixes were done by Ivo, as well as the rt2x00 part
of this patch.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:11 -04:00
Johannes Berg 2e92e6f2c5 mac80211: use rate index in TX control
This patch modifies struct ieee80211_tx_control to give band
info and the rate index (instead of rate pointers) to drivers.
This mostly serves to reduce the TX control structure size to
make it fit into skb->cb so that the fragmentation code can
put it there and we can think about passing it to drivers that
way in the future.

The rt2x00 driver update was done by Ivo, thanks.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:09 -04:00
Johannes Berg 36d6825b91 mac80211: let drivers wake but not start queues
Having drivers start queues is just confusing, their ->start()
callback can block and do whatever is necessary, so let mac80211
start queues and have drivers wake queues when necessary (to get
packets flowing again right away.)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:08 -04:00
Ester Kummer 189a2b5942 iwlwifi: trigger event log from debugfs
This patch adds a trigger for event log printing to debugfs.
It removes the triger from sysfs.

Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:07 -04:00
Tomas Winkler 6ba8795622 iwlwifi: refactor pci prob flow
This patch refactores pci prob flow. It moves mac80211 registration
to the end, otherwise there is a race between error path in pci_probe
and mac_start.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:06 -04:00
Tomas Winkler 445c2dff40 iwlwifi: add debugfs to disable/enable run time calibration
This patch adds functionality to debugfs to enable or disable chain
noise or sensitivity calibrations.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:06 -04:00
Tomas Winkler da6833cb05 iwlwifi: remove 4965 remainings in iwl-eeprom.c file
The patch cleans up 4965 remaings from iwl-eeprom.c file.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:05 -04:00
Ron Rindjunsky 9636e583d2 iwlwifi: iwl5000 WiFi/WiMax coexistence
This patch adds WiFi/WiMax coexistence to iwl5000.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:05 -04:00
Ron Rindjunsky 99da1b48fc iwlwifi: add ucode init flow handling for iwl5000
This patch adds all the handlers and functions needed for ucode
initialization flow.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:04 -04:00
Ron Rindjunsky dbb983b70a iwlwifi: add ucode loaders for iwl5000
This patch adds ucode initialization handler and functions to load
ucode for iwl5000 NIC.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:03 -04:00
Ron Rindjunsky b600e4e1c5 iwlwifi: add rx_handlers stub for iwl5000
This patch adds rx_handler_setup stub to iwl5000.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:03 -04:00
Ron Rindjunsky 3647074973 iwlwifi: rename and move Tx queue activation/deactivation
This patch moves iwl4965_txq_ctx_activate and iwl4965_txq_ctx_deactivate
to iwl-dev.h and removes 4965 prefix from their names.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:02 -04:00
Emmanuel Grumbach ccc038abe4 iwlwifi: clean up and bug fix for security
This patch cleans up code in security.

1) uses the new pointer to ieee80211_key_conf passed with the tx_control.
2) resolves bug reported by Mirco Tischler (sends ADD_STA in ASYNC mode)
3) resolves bug reported by Volker Braun regarding dynamic WEP
4) drops a WEP packet which has been garbaged by firmware. This can
happen upon rekeying.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:01 -04:00
Emmanuel Grumbach a98410139a iwlwifi: don't switch to SGI if not supported by AP
This patch fixes SGI support. RS didn't look at the capabilities of the AP
before switching to SGI, this should lead to a stall in the traffic with an
AP that doesn't support SGI.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Guy Cohen  <guy.cohen@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:00 -04:00
Tomas Winkler fd4abac54a iwlwifi: move TX code into iwl-tx.c
This patch moves the sending part of the TX code into iwl-tx.c
including sending host commands.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:48:00 -04:00
Tomas Winkler 54dbb525e7 iwlwifi: refactor ieee80211_get_qos_ctrl
This patch refactors ieee80211_get_qos_ctrl function and its usage
in iwlwifi drivers. Function is moved as inline into iwl-helpers.h.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:59 -04:00
Tomas Winkler 83d527d9e8 iwlwifi: remove 4956 form iwl4965_tx_cmd
This patch renames iwl4965_tx_cmd to iwl_tx_cmd and cleans
collateral code.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:58 -04:00
Tomas Winkler 4f40e4d9fb iwlwifi: move more station managment into iwl-sta.c
This patch moves station management functions into iwl-sta.c (iwlcore).

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:58 -04:00
Tomas Winkler 57bd1bea48 iwlwifi: move iwl_bcast_addr to iwlcore
This patch renames iwl4965_broadcast_addr to iwl_bcast_addr
and moves it to iwlcore.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:57 -04:00
Tomas Winkler 1826dcc094 iwlwifi: remove 4965 from iwl4965_rate_info
This patch removes 4965 from iwl4965_rate_info structure and
associated variables.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:56 -04:00
Tomas Winkler fcab423d71 iwlwifi: remove 4965 prefix from iwl4965_frame
This patch removes 4965 from iwl4965_frame struct and handling functions.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:56 -04:00
Tomas Winkler babcebfabb iwlwifi: remove 4965 from iwl4965_tx_queue_update_write_ptr
This patch renames iwl4965_tx_queue_update_write_ptr to
iwl_txq_update_write_ptr. This is a preparation for moving to iwl-tx.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:55 -04:00
Gregory Greenman c1adf9fb31 iwlwifi: get_hw_cmd_size
This patch introduces a new handler get_hw_cmd_size in hcmd_utils,
which should adjust the size of the command sent to the microcode
according to the current nic.
It also changes the RXON flow to make usage of this new handler.

The patch also adds iwl_rxon_cmd structure which is supperset for
5000 HW and 4965.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:54 -04:00
Tomas Winkler 8567c63e33 iwlwifi: rename iwl4965_tx_info to iwl_tx_info
This patch renames iwl4965_tx_info to iwl_tx_info.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:54 -04:00
Tomas Winkler 443cfd457f iwlwifi: rename iwl4965_queue to iwl_queue
This patch renames iwl4965_queue to iwl_queue.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:53 -04:00
Ron Rindjunsky 39130df32a iwlwifi: filling Tx MCS set
This patch fills the needed data about HW capabilities in matters of
possible HT Tx MCS.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:52 -04:00
Ron Rindjunsky edcdf8b21a mac80211: separate Tx and Rx MCS when configuring HT
This patch follows the 11n spec in separation between Tx and Rx MCS
capabilities. Up until now, when configuring the HT possible set of Tx
MCS only Rx MCS were considered, assuming they are the same as the Tx MCS.
This patch fixed this by looking at low level driver Tx capabilities.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:52 -04:00
Ron Rindjunsky 0b794d63c5 iwlwifi: remove iwl4965_nic_start function
This patch moves the contant of iwl4965_nic_start to the only place it is
being used.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:51 -04:00
Ron Rindjunsky 0288301760 iwlwifi: changing irrelevant comment
This patch changes an old eeprom comment in probe flow.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21 21:47:51 -04:00
David S. Miller f42a44494b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2008-05-15 00:52:37 -07:00
David S. Miller 63fe46da9c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/wireless/iwlwifi/iwl-4965-rs.c
	drivers/net/wireless/rt2x00/rt61pci.c
2008-05-15 00:34:44 -07:00
Bruno Randolf 566bfe5a8b mac80211: use hardware flags for signal/noise units
trying to clean up the signal/noise code. the previous code in mac80211 had
confusing names for the related variables, did not have much definition of
what units of signal and noise were provided and used implicit mechanisms from
the wireless extensions.

this patch introduces hardware capability flags to let the hardware specify
clearly if it can provide signal and noise level values and which units it can
provide. this also anticipates possible new units like RCPI in the future.

for signal:

  IEEE80211_HW_SIGNAL_UNSPEC - unspecified, unknown, hw specific
  IEEE80211_HW_SIGNAL_DB     - dB difference to unspecified reference point
  IEEE80211_HW_SIGNAL_DBM    - dBm, difference to 1mW

for noise we currently only have dBm:

  IEEE80211_HW_NOISE_DBM     - dBm, difference to 1mW

if IEEE80211_HW_SIGNAL_UNSPEC or IEEE80211_HW_SIGNAL_DB is used the driver has
to provide the maximum value (max_signal) it reports in order for applications
to make sense of the signal values.

i tried my best to find out for each driver what it can provide and update it
but i'm not sure (?) for some of them and used the more conservative guess in
doubt. this can be fixed easily after this patch has been merged by changing
the hardware flags of the driver.

DRIVER          SIGNAL    MAX	NOISE   QUAL
-----------------------------------------------------------------
adm8211         unspec(?) 100   n/a     missing
at76_usb        unspec(?) (?)   unused  missing
ath5k           dBm             dBm     percent rssi
b43legacy       dBm             dBm     percent jssi(?)
b43             dBm             dBm     percent jssi(?)
iwl-3945        dBm             dBm     percent snr+more
iwl-4965        dBm             dBm     percent snr+more
p54             unspec    127   n/a     missing
rt2x00          dBm	        n/a     percent rssi+tx/rx frame success
  rt2400        dBm             n/a
  rt2500pci     dBm             n/a
  rt2500usb     dBm             n/a
  rt61pci       dBm             n/a
  rt73usb       dBm             n/a
rtl8180         unspec(?) 65    n/a     (?)
rtl8187         unspec(?) 65    (?)     noise(?)
zd1211          dB(?)     100   n/a     percent

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:49 -04:00
Bill Moss 15dbf1b7b7 iwl3945: do not delay hardware scan if it is a direct scan
iwl3945 <---> mac80211 <----> wpa_supplicant <---> NetworkManager

When a hardware scan is completed and another scan is requested in less
than two seconds, iwlwifi will not do the second scan and will pass the
error code -EAGAIN back to mac80211 where it quickly dies. The error
code is not passed along to the calling program wpa_supplicant. After a
timeout, wpa_supplicant will just give up but it will not know why the
scan failed. This is a weakness in the design.

I ran into this issue when I was trying to figure out why it takes more
an a minute for NetworkManager to connect after Networking has been
disabled and then re-enabled. I found a good deal of unnecessary work
being done because mac80211 requests authentication when the interface
is not configured, the ANY mode. I created an experimental passive
(NOTANY) mode for mac80211 to eliminate this case. Then NetworkManager
became so fast that I ran into the iwlwifi 2 second delay next scan
issue which we are discussing.

The patch resolves the problem by bypassing the delay if the scan request
is a direct scan. It should do less harm to the hardware.

Signed-off-by: Bill Moss <bmoss@CLEMSON.EDU>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:48 -04:00
Ester Kummer 3a1081e84b iwlwifi: adding parameter of fw_restart
This patch adds a module parameter of fw_restart which determine if
the uCode will be restarted or not in case of error.

Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:48 -04:00
Tomas Winkler bc6f59bc9b iwlwifi: add device sysfs version entry
This patch adds sysfs version file that displays ucode version
and type.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:47 -04:00
Ester Kummer f3d6799934 iwlwifi: update levels of debug prints
This patch updates the levels of debug prints, leaving only one level
in each debug print.
It was anoying and caused unnecessary prints on hot path.

Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:47 -04:00
Ester Kummer 8cf769c6dc iwlwifi: move debug_level to sysfs/bus/pci/devices
This patch ports the debug_level from sysfs/bus/pci/drivers/iwl4965
to /sys/class/net/wlanX/device/debug_level

Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:47 -04:00
Ron Rindjunsky 1b73af8284 iwlwifi: fix spinlock used before initialized
The patch fixes spinlock priv->lock (apm_ops.init) is used before it has
been initialized.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:47 -04:00
Ron Rindjunsky 164669032e iwlwifi: remove 4965 prefix from iwl4965_kw and iwl4965_tx_queue
This patch removes the 4965 prefix to form iwl_kw and iwl_tx_queue structs,
as they are used mostly in iwlcore now.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:47 -04:00
Ron Rindjunsky d67f5489d8 iwlwifi: handle shared memory Rx index access
This patch splits ucode's and driver's shared memory Rx index access to
match 4965 and 5000 offsets.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:46 -04:00
Abhijeet Kolekar 5ec0397679 iwlwifi : Set monitor mode for 3945
The patch leverages mac80211 configure_filter to enable iwl3945
monitor mode.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:46 -04:00
Abhijeet Kolekar 4419e39b60 iwlwifi : Set monitor mode for 4965
The patch leverages mac80211 configure_filter to enable iwl4965
monitor mode.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:46 -04:00
Emmanuel Grumbach f3ccc08c8c iwlwifi: move iwl4965_init_alive_start to iwl-4965.c
This patch moves iwl_4965_init_alive_start to iwl-4965.c.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:46 -04:00
Tomas Winkler 27aaba0ca0 iwlwifi: compile iwl-sta into iwlcore
This patch moves iwl-sta into iwl-core.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:46 -04:00
Ron Rindjunsky 1053d35f4e iwlwifi: move NIC init and Tx queues init to iwlcore
This patch does the following:

1 - change hw_nic_init from a handler to a function
2 - move hw_nic_init function to iwlcore
3 - open a new file - iwl-tx.c
4 - move all Tx queues initialization (part of NIC init) to iwl-tx.c
5 - move iwl_rx_init, previously as part of the NIC init, to iwl-rx.c
6 - iwl4965_tfd_frame rename to iwl_tfd_frame

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:46 -04:00
Ron Rindjunsky 5a676bbeaf iwlwifi: create disable SCD Tx FIFOs handler
This patch moves disabeling Tx FIFOs in NIC SCD to seperate handlers
in 4965 and 5000 cards.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:45 -04:00
Tomas Winkler 47c5196e4a iwlwifi: move iwl4965_set_rxon_ht into iwlcore
This patch moves iwl4965_set_rxon_ht to iwlcore under name
iwl_set_rxon_ht. It also moves collateral changes
iwl_is_channel_extension and iwl_is_fat_tx_allowed.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:45 -04:00
Ester Kummer bf403db8a2 iwlwifi: move per driverdebug_level to per device
This patch ports the debug_level to iwl_priv and changes
the format of the debug prints.

Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:45 -04:00
Tomas Winkler 2469bf2e99 iwlwifi-5000: add build_addsta_hcmd handler for 5000 HW
This patch adds iwl5000_build_addsta_hcmd handler.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:45 -04:00
Tomas Winkler 133636deff iwlwifi: generalize iwl4965_send_add_station function
This patch moves iwl4965_send_add_station to iwlcore
under new name iwl_send_add_sta.
Function uses build command handler in order to support
multiple HWs.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:45 -04:00
Tomas Winkler db11d6343a iwlwifi: remove 4965 from rx_packet
This patch removes 4965 mark from rx_packet.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:44 -04:00
Tomas Winkler 8dd266ef4e iwlwifi: debugfs EEPROM dump
This patch adds EEPROM dump in debugfs.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:42 -04:00
Tomas Winkler 6def9761f7 iwlwifi: remove 4965 from station_entry
This patch removes 4965 mark form the station entry structure.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:41 -04:00
Tomas Winkler 6b9b34389c iwlwifi: don't override association channel with control channel
This patch fixes override of association channel with HT control channel.
The scenario is currently happening because disassociation flow
doesn't clean previous association information (such as is_ht and control
channel).

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:39 -04:00
Ron Rindjunsky 5a835353fb iwlwifi-5000: rename iwl5000_init_nic to iwl5000_init_config
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:38 -04:00
Tomas Winkler a55360e458 iwlwifi: move RX code to iwl-rx.c
This patch moves partialy rx code into iwl-rx.c as part of iwlcore.
The second part of the code can be merged only with moving of tx
code as well.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:37 -04:00
Ron Rindjunsky 0d0b2c1c49 iwlwifi: map A-MPDU HW queue to mac80211 A-MPDU SW queue
This patch maps A-MPDU HW queue to mac80211 SW queue scheme (as introduced
in patch "mac80211: QoS related cleanups"), when trying to perform
ieee80211_wake_queue.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:36 -04:00
Johannes Berg 07346f81e8 mac80211: proper STA info locking
As discussed earlier, we can unify locking in struct sta_info
and use just a single spinlock protecting all members of the
structure that need protection. Many don't, but one of the
especially bad ones is the 'flags' member that can currently
be clobbered when RX and TX is being processed on different
CPUs at the same time.

Because having four spinlocks for different, mostly exclusive
parts of a single structure is overkill, this patch also kills
the ampdu and mesh plink spinlocks and uses just a single one
for everything. Because none of the spinlocks are nested, this
is safe.

It remains to be seen whether or not we should make the sta
flags use atomic bit operations instead, for now though this
is a safe thing and using atomic operations instead will be
very simple using the new static inline functions this patch
introduces for accessing sta->flags.

Since spin_lock_bh() is used with this lock, there shouldn't
be any contention even if aggregation is enabled at around the
same time as both requires frame transmission/reception which
is in a bh context.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Tomas Winkler <tomasw@gmail.com>
Cc: Ron Rindjunsky <ron.rindjunsky@intel.com>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:34 -04:00
Andrew Morton 88787d2842 wireless: fix "iwlwifi: unify init driver flow"
drivers/net/wireless/iwlwifi/iwl-core.c: In function 'iwlcore_init_geos':
drivers/net/wireless/iwlwifi/iwl-core.c:323: error: implicit declaration of function 'iwlcore_init_ht_hw_capab'

This (or something like it) should be folded into the base patch to avoid
breaking bisection, please.

Cc: Ron Rindjunsky <ron.rindjunsky@intel.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14 16:29:31 -04:00
Emmanuel Grumbach c0186078b7 iwlwifi: Fix frequency in rx_status fill
This patch fixes a bug in RX path, the frequency was wrongly set in the
ieee80211_rx_status. This bug led to an empty scan list in A band.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12 21:22:19 -04:00
Zhu Yi 6243065d30 iwlwifi: fix compile error when CONFIG_MAC80211_DEBUGFS is not selected
Make iwl4965_lq_sta->drv available even without CONFIG_MAC80211_DEBUGFS.

Signed-off-by: Yi Zhu <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12 21:19:43 -04:00
Johannes Berg e100bb64bf mac80211: QoS related cleanups
This
 * makes the queue number passed to drivers a u16
   (as it will be with skb_get_queue_mapping)
 * removes the useless queue number defines
 * splits hw->queues into hw->queues/ampdu_queues
 * removes the debugfs files for per-queue counters
 * removes some dead QoS code
 * removes the beacon queue configuration for IBSS
   so that the drivers now never get a queue number
   bigger than (hw->queues + hw->ampdu_queues - 1)
   for tx and only in the range 0..hw->queues-1 for
   conf_tx.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:26 -04:00
Johannes Berg 36fc6757fe mac80211: remove queue info from ieee80211_tx_status
The queue info in struct ieee80211_tx_status is never used.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:26 -04:00
Johannes Berg 57ffc589a9 mac80211: clean up get_tx_stats callback
The callback takes a ieee80211_tx_queue_stats with a contained
array of ieee80211_tx_queue_stats_data, remove the former, rename
the latter to ieee80211_tx_queue_stats and make tx_stats() take
the array directly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:26 -04:00
Tomas Winkler 3e0d4cb12f iwlwifi: rename iwl-4965.h to iwl-dev.h
This patch renames iwl-4965.h to iwl-dev.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:26 -04:00
Tomas Winkler 5a36ba0e41 iwlwifi: rename iwl-4965-commands to iwl-commands.h
This patch renames iwl-4965-commands to iwl-commands.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:26 -04:00
Tomas Winkler e86fe9f64d iwlwifi-5000: add nic config handler for 5000 HW
This patch adds nic config handler for 5000 HW Family

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:25 -04:00
Tomas Winkler f1f6941500 iwlwifi-5000: add eeprom check version handler
This patch adds implementation for eeprom check version
handler for 5000 HW

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:25 -04:00
Emmanuel Grumbach 7839fc0386 iwlwifi-5000: update the byte count in SCD
This patch udpates the byte count of the frame in the registers of the
scheduler.
This patch also moves two defines in iwl-4965.h to a more appropriate
area in the file.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:25 -04:00
Ron Rindjunsky d4100dd985 iwlwifi-5000: add iwl 5000 shared memory handlers
This patch fills the needed handlers for shared memory for
iwl 5000 family

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:25 -04:00
Tomas Winkler fcf623df17 iwlwifi-5000: Add HW REV of 5000 HW family
This patch adds values fo CSR_HW_REV for 5000 HW family

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:25 -04:00
Tomas Winkler 1179f18df9 iwlwifi-5000: adjust antennas names in 5000 HW family
This patch use new defines for antennas

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:25 -04:00
Emmanuel Grumbach 33fd503346 iwlwifi-5000: add run time calibrations for 5000
This patch adds support for run time calibrations for the 5000 family HW.
Those calibrations are sensitivity calibration, and chain noise calibration.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:24 -04:00
Emmanuel Grumbach c031bf806f iwlwifi-5000: update the CT-Kill value for 5000 series
This patch upadtes the CT-Kill value for 5000 series.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:24 -04:00
Tomas Winkler fdd3e8a4ff iwlwifi-5000: adding iwl5000 HW parameters
This patch adds iwl 5000 HW parameters

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:24 -04:00
Tomas Winkler 25ae3986d7 iwlwifi-5000: EEPROM settings for 5000
This patch adds eeprom handlers and values for 5000 HW family

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:23 -04:00
Tomas Winkler 88acbd3b32 iwlwifi-5000: use iwl4965_set_pwr_src in 5000
This patch makes use of iwl4965_set_pwr_src in 5000 HW family

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:22 -04:00
Tomas Winkler 30d59260d5 iwlwifi-5000: add apm_init handler for 5000 HW family
This patch adds apm_init handler for 5000 HW family

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:22 -04:00
Tomas Winkler da8dec29d7 iwlwifi-5000: add ops infrastructure for 5000
This patch adds handler framework for 5000 family HW

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:22 -04:00
Tomas Winkler 5a6a256e19 iwlwifi-5000: adding initial recognition for the 5000 family
This patch adds initial support for recognizing the iwl 5000 family of NICs
ID

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07 15:02:22 -04:00