Commit graph

233 commits

Author SHA1 Message Date
Greg Dietsche
aef6a62d8b iwlegacy: remove unused enum il4965_calib_enabled_state
Remove the enum il4965_calib_enabled_state because it is not used.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:55 -05:00
Greg Dietsche
d7b6b6a643 iwlegacy: remove enum iw_calib and related code
Remove the enum il_calib. It defined one identifier: IL_CALIB_MAX.
Remove the function il4965_calib_free_results. It was doing nothing
because IL_CALIB_MAX is zero. Next, remove calib_results from the
il_priv structure and also remove the associated return
type/struct il_calib_result.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:55 -05:00
Greg Dietsche
08db1ab7fa iwlegacy: Kconfig: Change Debug Option to be more clear
Since the menuconfig system doesn't indent the debug options
for the 3945 /4965, add some text to make it clear which
debug options are being configured.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:55 -05:00
Greg Dietsche
649921499c iwlegacy: Kconfig: Move Debugging Options
Move the debug options so they appear below the 3945 / 4965 options.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:54 -05:00
Johannes Berg
02f2f1a951 mac80211: handle non-bufferable MMPDUs correctly
This renames the IEEE80211_TX_CTL_POLL_RESPONSE
TX flag to IEEE80211_TX_CTL_NO_PS_BUFFER and also
uses it for non-bufferable MMPDUs (all MMPDUs but
deauth, disassoc and action frames.)

Previously, mac80211 would let the MMPDU through
but not set the flag so drivers supporting some
hardware aids for avoiding the PS races would
then reject the frame.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:54 -05:00
Stanislaw Gruszka
4e3bc141d4 iwlegacy: remove il_is_rfkill_hw
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:18 -05:00
Stanislaw Gruszka
6668e4eb50 iwlegacy: s/il_txq_mem/il_free_txq_mem/g
Previous name was confusing.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:17 -05:00
Stanislaw Gruszka
bc269a8e27 iwlegacy: s/S_RF_KILL_HW/S_RFKILL/g
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:17 -05:00
Stanislaw Gruszka
d87c771f47 iwlegacy: small queue initializations cleanup
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:17 -05:00
Stanislaw Gruszka
3976b45194 iwlegacy: enable only rfkill interrupt when rfkill switch is on during IFF_UP
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:17 -05:00
Stanislaw Gruszka
71e0c6c267 iwlegacy: small il4965_set_hw_ready cleanup
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:16 -05:00
Stanislaw Gruszka
586e45e31e iwlegacy: check correct il_poll_bit error value
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:16 -05:00
Stanislaw Gruszka
775ed8abde iwlegacy: do not grab nic access if rfkill
If rfkill is on il_grab_nic_access() fail and we can not write to the
various registers during stop procedure. Write to those registers
unconditionally instead.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:16 -05:00
Stanislaw Gruszka
c37281a076 iwleagcy: fix ident code damage
Using ident is not always good.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:16 -05:00
Stanislaw Gruszka
774212b3f3 iwleagcy: remove old comments
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:16 -05:00
Stanislaw Gruszka
9ce7b73c76 iwlegacy: improve mac operation debuggability a bit
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:15 -05:00
Stanislaw Gruszka
288f995413 iwlegacy: get rid of tx/rx traffic log
The same data can be gathered using monitor mode.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:15 -05:00
Stanislaw Gruszka
c936355172 iwlegacy: merge all ops structures into one
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:15 -05:00
Stanislaw Gruszka
1600b87542 iwlegacy: merge il_lib_ops into il_ops
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:15 -05:00
Stanislaw Gruszka
f03ee2a87e iwlegacy: remove il_apm_ops
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:14 -05:00
Stanislaw Gruszka
a89268e8cd iwlegacy: merge eeprom_ops into lib_ops
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:13 -05:00
Stanislaw Gruszka
527901d0ae iwlegacy: remove temp_ops
Remove unneeded structure and cleanup temperature calibration routines
a bit.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:13 -05:00
Stanislaw Gruszka
93b7654ec5 iwlegacy: move debugfs_ops to il_priv
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:13 -05:00
Stanislaw Gruszka
3dfea27d10 iwlegacy: gather all 4965 handlers in one place
Handers belongs logically into 4965-mac.c file.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:13 -05:00
Stanislaw Gruszka
93a984a4ee iwlegacy: regulatory_bands is not an ops
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:12 -05:00
Stanislaw Gruszka
a5f16137ab iwlegacy: use writeb,writel,readl directly
That change will save us some CPU cycles at run time. Having
port-based I/O seems to be not possible for PCIe devices.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:12 -05:00
Stanislaw Gruszka
4e5ea2088b iwlegacy: cleanup/fix memory barriers
wmb(), rmb() are not needed when writel(), readl() are used as
accessors for MMIO. We use them indirectly via iowrite32(),
ioread32().

What is needed mmiowb(), for synchronizing writes coming from
different CPUs on PCIe bridge (see in patch comments). This
fortunately is not needed on x86, where mmiowb() is just
defined as compiler barrier. As iwlegacy devices are most likely
not used on anything other than x86, this is not so important
fix.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:12 -05:00
Stanislaw Gruszka
1e0f32a43a iwlegacy: always check if got h/w access before write
Before we write to the device register always check if
_il_grap_nic_access() was successful.

Change type return type _il_grap_nic_access() to bool, and
add likely()/unlikely() statements.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:12 -05:00
Stanislaw Gruszka
b6603036ad iwlegacy: dump stack when fail to gain access to the device
Print dump stack when the device is not responding. This should give
some more clue about the reason of failure. Also change the message we
print, since "MAC in deep sleep" is kinda confusing.

On the way add unlikely(), as fail to gain NIC access is hmm ...
unlikely.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-22 14:51:11 -05:00
Stanislaw Gruszka
1023f3bc7b iwlegacy: remove set_hw_params callback
We do not need that callback, settings parameters can be done locally.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:14 -05:00
Stanislaw Gruszka
00ea99e1d8 iwlegacy: remove struct il_tx_info
It's just wrapper to sk_buff pointers ...

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:13 -05:00
Stanislaw Gruszka
89ef1ed2d2 iwlegacy: merge il_base_params into il_cfg
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:12 -05:00
Stanislaw Gruszka
c39ae9fd50 iwlegacy: move ops out of config
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:11 -05:00
Stanislaw Gruszka
8300719603 iwlegacy: get rid of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:11 -05:00
Stanislaw Gruszka
20c47eba70 iwlegacy: remove il_setup_interface()
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:10 -05:00
Stanislaw Gruszka
dee9a09eb3 iwlegacy: get rid of ctx->is_active
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:09 -05:00
Stanislaw Gruszka
eb123af3d1 iwlegacy: get rid of ctx->ac_to_queue
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:08 -05:00
Stanislaw Gruszka
b75b3a70a6 iwlegacy: get rid of ctx->ac_to_fifo
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:07 -05:00
Stanislaw Gruszka
1c03c4620e iwlegacy: move ht out of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:07 -05:00
Stanislaw Gruszka
8d44f2bd75 iwlegacy: move qos_data out of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:06 -05:00
Stanislaw Gruszka
8c9c48d5a9 iwlegacy: remove ctx interface_modes
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:05 -05:00
Stanislaw Gruszka
fd6415bcfb iwlegacy: get rid of ctx->station_flags
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:04 -05:00
Stanislaw Gruszka
d735f9213d iwlegacy: move wep_keys out of context
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:03 -05:00
Stanislaw Gruszka
d1e14e9424 iwlegacy: get rid of mcast_queue
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:03 -05:00
Stanislaw Gruszka
6aa0c25435 iwlegacy: get rid of ctxid
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:02 -05:00
Stanislaw Gruszka
0f8b90f526 iwlegacy: get rid of *_devtype
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:01 -05:00
Stanislaw Gruszka
b16db50a6d iwlegacy: move bcast_sta_id to hw_params
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:00 -05:00
Stanislaw Gruszka
8f9e564553 iwlegacy: get rid of ap_sta_id
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:59 -05:00
Stanislaw Gruszka
d98e294231 iwlegacy: get rid of wep_key_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:59 -05:00
Stanislaw Gruszka
b96ed60cd0 iwlegacy: get rid of qos_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:58 -05:00