openwrt/staging/blogic.git
15 years agomac80211: 802.11w - Implement Association Comeback processing
Jouni Malinen [Thu, 8 Jan 2009 11:32:09 +0000 (13:32 +0200)]
mac80211: 802.11w - Implement Association Comeback processing

When MFP is enabled, the AP does not allow a STA to associate if an
existing security association exists without first going through SA
Query process. When this happens, the association request is denied
with a new status code ("temporarily rejected") ans Association
Comeback IE is used to notify when the association may be tried again
(i.e., when the SA Query procedure has timed out).

Use the comeback time to update the mac80211 client MLME timer for
next association attempt to minimize waiting time if association is
temporarily rejected.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - Drop unprotected robust management frames if MFP is used
Jouni Malinen [Thu, 8 Jan 2009 11:32:08 +0000 (13:32 +0200)]
mac80211: 802.11w - Drop unprotected robust management frames if MFP is used

Use ieee80211_drop_unencrypted() to decide whether a received frame
should be dropped with management frames, too. If MFP is negotiated,
unprotected robust management frames will be dropped.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - Do not force Action frames to disable encryption
Jouni Malinen [Thu, 8 Jan 2009 11:32:07 +0000 (13:32 +0200)]
mac80211: 802.11w - Do not force Action frames to disable encryption

When sending out Action frames, allow ieee80211_tx_skb() to send them
without enforcing do_not_encrypt. These frames will be encrypted if
MFP has been negotiated.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - SA Query processing
Jouni Malinen [Thu, 8 Jan 2009 11:32:06 +0000 (13:32 +0200)]
mac80211: 802.11w - SA Query processing

Process SA Query Requests for client mode in mac80211. AP side
processing of SA Query Response frames is in user space (hostapd).

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - Configuration of MFP disabled/optional/required
Jouni Malinen [Thu, 8 Jan 2009 11:32:05 +0000 (13:32 +0200)]
mac80211: 802.11w - Configuration of MFP disabled/optional/required

Add new WEXT IW_AUTH_* parameter for setting MFP
disabled/optional/required.

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - WEXT configuration for IGTK
Jouni Malinen [Thu, 8 Jan 2009 11:32:04 +0000 (13:32 +0200)]
mac80211: 802.11w - WEXT configuration for IGTK

Added new SIOCSIWENCODEEXT algorithm for configuring BIP (AES-CMAC)
keys (IGTK).

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - WEXT parameter for setting mgmt cipher
Jouni Malinen [Thu, 8 Jan 2009 11:32:03 +0000 (13:32 +0200)]
mac80211: 802.11w - WEXT parameter for setting mgmt cipher

Add a new IW_AUTH parameter for setting cipher suite for
multicast/broadcast management frames. This is for full-mac drivers
that take care of RSN IE generation for (re)association request frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - Use BIP (AES-128-CMAC)
Jouni Malinen [Thu, 8 Jan 2009 11:32:02 +0000 (13:32 +0200)]
mac80211: 802.11w - Use BIP (AES-128-CMAC)

Add mechanism for managing BIP keys (IGTK) and integrate BIP into the
TX/RX paths.

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - Add BIP (AES-128-CMAC)
Jouni Malinen [Thu, 8 Jan 2009 11:32:01 +0000 (13:32 +0200)]
mac80211: 802.11w - Add BIP (AES-128-CMAC)

Implement Broadcast/Multicast Integrity Protocol for management frame
protection. This patch adds the needed definitions for the new
information element (MMIE) and implementation for the new "encryption"
type (though, BIP is actually not encrypting data, it provides only
integrity protection). These routines will be used by a follow-on patch
that enables BIP for multicast/broadcast robust management frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - CCMP for management frames
Jouni Malinen [Thu, 8 Jan 2009 11:32:00 +0000 (13:32 +0200)]
mac80211: 802.11w - CCMP for management frames

Extend CCMP to support encryption and decryption of unicast management
frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: 802.11w - STA flag for MFP
Jouni Malinen [Thu, 8 Jan 2009 11:31:59 +0000 (13:31 +0200)]
mac80211: 802.11w - STA flag for MFP

Add flags for setting STA entries and struct ieee80211_if_sta to
indicate whether management frame protection (MFP) is used.

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: fix typo on message after intersection
Luis R. Rodriguez [Thu, 8 Jan 2009 01:43:35 +0000 (17:43 -0800)]
cfg80211: fix typo on message after intersection

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: allow multiple driver regulatory_hints()
Luis R. Rodriguez [Thu, 8 Jan 2009 01:43:34 +0000 (17:43 -0800)]
cfg80211: allow multiple driver regulatory_hints()

We add support for multiple drivers to provide a regulatory_hint()
on a system by adding a wiphy specific regulatory domain cache.
This allows drivers to keep around cache their own regulatory domain
structure queried from CRDA.

We handle conflicts by intersecting multiple regulatory domains,
each driver will stick to its own regulatory domain though unless
a country IE has been received and processed.

If the user already requested a regulatory domain and a driver
requests the same regulatory domain then simply copy to the
driver's regd the same regulatory domain and do not call
CRDA, do not collect $200.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: call reg_notifier() once
Luis R. Rodriguez [Thu, 8 Jan 2009 01:43:32 +0000 (17:43 -0800)]
cfg80211: call reg_notifier() once

We are calling the reg_notifier() callback per band, this is
not necessary, just call it once.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: extend/document powersave API
Johannes Berg [Wed, 7 Jan 2009 17:28:20 +0000 (18:28 +0100)]
mac80211: extend/document powersave API

This modifies hardware flags for powersave to support three different
flags:
 * IEEE80211_HW_SUPPORTS_PS - indicates general PS support
 * IEEE80211_HW_PS_NULLFUNC_STACK - indicates nullfunc sending in software
 * IEEE80211_HW_SUPPORTS_DYNAMIC_PS - indicates dynamic PS on the device

It also adds documentation for all this which explains how to set the
various flags.

Additionally, it fixes a few things:
 * a spot where && was used to test flags
 * enable CONF_PS only when associated again

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: return NETDEV_TX_OK in p54_tx and fix sparse warnings
Christian Lamparter [Wed, 7 Jan 2009 15:40:08 +0000 (16:40 +0100)]
p54: return NETDEV_TX_OK in p54_tx and fix sparse warnings

This patch addresses all recent comments from Johannes Berg:

1st: (reference http://marc.info/?l=linux-wireless&m=123124685019631 )
>First off: all those should return NETDEV_TX_OK/BUSY.
>iwl-agn: returns 0 (== NETDEV_TX_OK, but still should be changed)
>[...]
>p54: same (some paths)

2nd:
> due to your PS patch ("p54: power save management"), please run sparse:
> make C=2 CF=-D__CHECK_ENDIAN__ M=...
> +drivers/net/wireless/p54/p54common.c:1753:8: warning: incorrect type in assignment (different base types)
> +drivers/net/wireless/p54/p54common.c:1769:29: warning: incorrect type in assignment (different base types)
The cpu_to_le16 ended up in the wrong line... Sorry!

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Only register rfkill input when key is present
Ivo van Doorn [Wed, 7 Jan 2009 13:51:41 +0000 (14:51 +0100)]
rt2x00: Only register rfkill input when key is present

rt2x00 should only register the RFKILL input device when the hardware indicated
the key was present.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: move dynamic PS timeout to hardware config
Johannes Berg [Tue, 6 Jan 2009 17:13:18 +0000 (18:13 +0100)]
mac80211: move dynamic PS timeout to hardware config

This will be needed for drivers that set the
IEEE80211_HW_NO_STACK_DYNAMIC_PS flag and still
want to handle dynamic PS.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: validate SIOCSIWPOWER arguments better
Johannes Berg [Tue, 6 Jan 2009 17:12:35 +0000 (18:12 +0100)]
mac80211: validate SIOCSIWPOWER arguments better

Don't accept any arguments we don't handle, and return error codes
instead of using an uninitialised stack value.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: clean up channel type config
Johannes Berg [Wed, 7 Jan 2009 09:13:27 +0000 (10:13 +0100)]
mac80211: clean up channel type config

The channel_type really doesn't need to be the only member in
a new structure, so remove the struct. Additionally, remove
the _CONF_CHANGE_HT flag and use _CONF_CHANGE_CHANNEL when the
channel type changes, since that's enough of a change to require
reprogramming the hardware anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: Remove unused variable rx_data
David Kilroy [Wed, 7 Jan 2009 00:43:54 +0000 (00:43 +0000)]
orinoco: Remove unused variable rx_data

Probably something leftover from experimentation with tasklets. Now the
structure declaration orinoco_rx_data can be relocated to orinoco.c

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: clarify alignment docs, fix up alignment
Johannes Berg [Tue, 6 Jan 2009 23:26:10 +0000 (00:26 +0100)]
mac80211: clarify alignment docs, fix up alignment

Not all drivers are capable of passing properly aligned frames,
in particular with mesh networking no hardware will support
completely aligning it correctly.

This patch adds code to align the data payload to a 4-byte
boundary in memory for those platforms that require this, or
when CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is set.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove user_power_level from driver API
Johannes Berg [Tue, 6 Jan 2009 22:23:56 +0000 (23:23 +0100)]
mac80211: remove user_power_level from driver API

I missed this during review of "mac80211: Fix tx power setting",
the user_power_level shouldn't be available to the driver but
rather be an internal value used to calculate the value for the
driver.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Minor QCU updates
Nick Kossifidis [Tue, 6 Jan 2009 15:27:06 +0000 (17:27 +0200)]
ath5k: Minor QCU updates

* Sync qcu.c with legacy-hal
* Add some more comments
* Set QCU mask to save power (QCU mask controls which QCUs are attached
  to each DCU, we do a 1:1 mapping)

TODO: Use max QCU from EEPROM, further sync with legacy-hal and sam's
hal and a few more minor fixes.

I think after this we are ready to implement WME on the driver
part. Anyone interested ?

Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove unused variable in ieee80211_local (dot11WEPUndecryptableCount).
Rami Rosen [Tue, 6 Jan 2009 13:24:57 +0000 (15:24 +0200)]
mac80211: remove unused variable in ieee80211_local (dot11WEPUndecryptableCount).

This patch removes an unused declaration of dot11WEPUndecryptableCount
(an snmp counter) in ieee80211_local structure and its usage in
debugfs.c since this counter is not incremented/decremented anywhere.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove an unused definition (MAX_STA_COUNT) in sta_info.h.
Rami Rosen [Tue, 6 Jan 2009 08:51:01 +0000 (10:51 +0200)]
mac80211: remove an unused definition (MAX_STA_COUNT) in sta_info.h.

This patch removes an unused definition of MAX_STA_COUNT in sta_info.h.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove an unused parameter in ieee80211_rx_mgmt_probe_req().
Rami Rosen [Tue, 6 Jan 2009 08:50:51 +0000 (10:50 +0200)]
mac80211: remove an unused parameter in ieee80211_rx_mgmt_probe_req().

This patch removes an unused parameter (rx_status) in
ieee80211_rx_mgmt_probe_req(),
in mlme.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove an unnecessary assignment to info in __ieee80211_tx().
Rami Rosen [Tue, 6 Jan 2009 08:50:33 +0000 (10:50 +0200)]
mac80211: remove an unnecessary assignment to info in __ieee80211_tx().

This patch removes an unnecessary assignment to info
in __ieee80211_tx() , tx.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Add 802.11h CSA support
Sujith [Tue, 6 Jan 2009 03:58:37 +0000 (09:28 +0530)]
mac80211: Add 802.11h CSA support

Move to the advertised channel on reception of
a CSA element. This is needed for 802.11h compliance.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Allow to set channel in adhoc properly
Alina Friedrichsen [Tue, 6 Jan 2009 02:15:23 +0000 (03:15 +0100)]
mac80211: Allow to set channel in adhoc properly

The last patch fixes a bug that it was not possible to set the channel
manually in the ad hoc mode properly.

Please commit this patches so that we don't need the proprietary
Broadcom driver in the near future anymore.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Don't merge if BSSID is set manually
Alina Friedrichsen [Tue, 6 Jan 2009 02:08:10 +0000 (03:08 +0100)]
mac80211: Don't merge if BSSID is set manually

If you set a fixed BSSID manually, you never want that the driver
change it back, or your ad-hoc mesh network will break into peaces. So
don't do it.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Don't scan if BSSID and channel are set manually
Alina Friedrichsen [Tue, 6 Jan 2009 01:49:07 +0000 (02:49 +0100)]
mac80211: Don't scan if BSSID and channel are set manually

If you set a fixed BSSID and channel it's not necessary to scan for
neighbors to merge, because you really don't want to merge with it. So
don't do it.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Disallow to set multicast BSSID
Alina Friedrichsen [Tue, 6 Jan 2009 01:41:35 +0000 (02:41 +0100)]
mac80211: Disallow to set multicast BSSID

Okay, here is the first of the five patches. After applying all
of them you should be able to build/join huge city mesh networks
(e.g. with the OLSR protocol) with the most of the mac80211 wireless
drivers by setting a fixed BSSID in the ad hoc mode. (If you found no
other bug/problem.) This was not specified in the original standard,
but is a widely used de facto standard.

The first patch now completely disallow to set multicast MAC addresses
as BSSID. The behavior before was really strange.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Replace RFKILL with INPUT
Ivo van Doorn [Sat, 3 Jan 2009 18:56:02 +0000 (19:56 +0100)]
rt2x00: Replace RFKILL with INPUT

As discussed on linux-wireless rt2x00 does not offer a true RFKILL key,
for that reason RFKILL support should be entirely removed.

The key which is attached to the hardware should be treated as normal
input device instead. Implement input_poll_dev support to poll the device
frequently. When the key status has changed report it as a SW event.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Enable Bluetooth Coexistence support
Vasanthakumar Thiagarajan [Fri, 2 Jan 2009 10:05:46 +0000 (15:35 +0530)]
ath9k: Enable Bluetooth Coexistence support

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: fix off-by-one in gpio checks
Bob Copeland [Thu, 1 Jan 2009 20:01:45 +0000 (15:01 -0500)]
ath5k: fix off-by-one in gpio checks

Sanity checks against AR5K_NUM_GPIO were all broken.  This doesn't
currently cause any problems since we only use the first four gpios.

Changes-licensed-under: ISC

Reported-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: support LEDs on Acer Aspire One netbook
Bob Copeland [Thu, 1 Jan 2009 20:01:44 +0000 (15:01 -0500)]
ath5k: support LEDs on Acer Aspire One netbook

Add vendor ID for Foxconn and use it to set the ath5k LED gpio and
polarity for Acer branded laptops.

base.c:
Changes-licensed-under: 3-Clause-BSD

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Tested-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: power save management
Christian Lamparter [Tue, 30 Dec 2008 12:48:41 +0000 (13:48 +0100)]
p54: power save management

This patch implements dynamic power save feature for p54.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: implement FIF_OTHER_BSS filter setting
Christian Lamparter [Tue, 30 Dec 2008 12:48:29 +0000 (13:48 +0100)]
p54: implement FIF_OTHER_BSS filter setting

According to STMicroelectronics' LMAC documentation, the P54_FILTER_TYPE_TRANSPARENT flag
"configures the receive frame filter to pass all frames without regard to type and address matching."

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: enable rx/tx antenna diversity by eeprom bits
Christian Lamparter [Tue, 30 Dec 2008 12:48:19 +0000 (13:48 +0100)]
p54: enable rx/tx antenna diversity by eeprom bits

Respect all documented bits in the eeprom about the device diversity features.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: use signed format to print HAL status
Gabor Juhos [Mon, 29 Dec 2008 20:07:42 +0000 (21:07 +0100)]
ath9k: use signed format to print HAL status

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: clean up set_key callback
Johannes Berg [Mon, 29 Dec 2008 11:55:09 +0000 (12:55 +0100)]
mac80211: clean up set_key callback

The set_key callback now seems rather odd, passing a MAC address
instead of a station struct, and a local address instead of a
vif struct. Change that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Bob Copeland <me@bobcopeland.com> [ath5k]
Acked-by: Ivo van Doorn <ivdoorn@gmail.com> [rt2x00]
Acked-by: Christian Lamparter <chunkeey@web.de> [p54]
Tested-by: Kalle Valo <kalle.valo@nokia.com> [iwl3945]
Tested-by: Samuel Ortiz <samuel@sortiz.org> [iwl3945]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: make wake/stop_queue_by_reason() functions static
Kalle Valo [Mon, 29 Dec 2008 08:02:48 +0000 (10:02 +0200)]
mac80211: make wake/stop_queue_by_reason() functions static

Fixes sparse warnings:

net/mac80211/util.c:355:6: warning: symbol
  'ieee80211_wake_queue_by_reason' was not declared. Should it be static?
net/mac80211/util.c:385:6: warning: symbol
  'ieee80211_stop_queue_by_reason' was not declared. Should it be static?

Thanks to Johannes Berg for reporting this.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Change schedule for old-fw support removal
Michael Buesch [Sat, 27 Dec 2008 17:26:39 +0000 (18:26 +0100)]
b43: Change schedule for old-fw support removal

The scheduled date for the removal of old fw support was in July 2008.
However, we're not going to remove the support unless it causes a major
headache. So change the schedule from "July 2008" to "when it causes headaches".

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: regulatory domain hints
Christian Lamparter [Fri, 26 Dec 2008 20:50:33 +0000 (21:50 +0100)]
p54: regulatory domain hints

This patch adds a sub-routine that parses the default country eeprom entry
and forwards the obtained Alpha2 identifier to the regulatory sub-system.

Note: I dropped the p54 specific regdomain<->alpha2 conversion code for now.
But it will be added as soon as there's the common library function is ready.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: prevent upload of wrong firmwares
Christian Lamparter [Fri, 26 Dec 2008 18:09:34 +0000 (19:09 +0100)]
p54: prevent upload of wrong firmwares

This patch will prevent anyone to upload a firmware which was not designed for his device.

There's still a catch:
There is no easy way to detect if a firmware is for PCI or for USB (1st Gen),
because they all share the same LM86 identifier.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54usb: utilize usb_reset_device for 3887
Christian Lamparter [Fri, 26 Dec 2008 18:08:31 +0000 (19:08 +0100)]
p54usb: utilize usb_reset_device for 3887

Sometimes on unload or reboot the 3887 USB devices become stuck.
<usual log entry>
kernel: usbcore: registered new interface driver p54usb
kernel: usb 2-10: (p54usb) reset failed! (-110)
kernel: p54usb: probe of 2-10:1.0 failed with error -110
[...]

and a physical unplug and replug was necessary.
However we should be able to do this in software as well,
without any user interaction.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43/ssb: Add SPROM8 extraction and LP-PHY detection
Michael Buesch [Wed, 24 Dec 2008 23:39:28 +0000 (00:39 +0100)]
b43/ssb: Add SPROM8 extraction and LP-PHY detection

This adds detection code for the LP-PHY and SPROM
extraction code for version 8, which is needed by the LP-PHY and
newer N-PHY.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: detect N PHY revision/radio
Johannes Berg [Wed, 24 Dec 2008 14:26:40 +0000 (15:26 +0100)]
b43: detect N PHY revision/radio

Does nothing unless you enable the hidden N PHY config.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: INI update for Atheros AR9280 and AR9285 chipset.
Senthil Balasubramanian [Wed, 24 Dec 2008 12:33:58 +0000 (18:03 +0530)]
ath9k: INI update for Atheros AR9280 and AR9285 chipset.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agossb/b43: add new N PHY device
Johannes Berg [Wed, 24 Dec 2008 11:44:09 +0000 (12:44 +0100)]
ssb/b43: add new N PHY device

This is used on my macbook. N PHY, obviously nothing works
yet, but we can detect the chip with this patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix tx power setting
Vasanthakumar Thiagarajan [Wed, 24 Dec 2008 08:23:11 +0000 (13:53 +0530)]
mac80211: Fix tx power setting

power_level in ieee80211_conf is being used for more than one
purpose. It being used as user configured power limit and the
final power limit given to the driver. By doing so, except very
first time, the tx power limit is taken from min(chan->max_power,
local->hw.conf.power_level) which is not what we want. This patch
defines a new memeber in ieee80211_conf which is meant only for
user configured power limit.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: fix sparse warnings
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:51 +0000 (15:58 -0800)]
ath9k: fix sparse warnings

Fix sparse warnings:

drivers/net/wireless/ath9k/hw.c:1850:17: warning: symbol 'tmp' shadows an earlier one
drivers/net/wireless/ath9k/hw.c:1713:6: originally declared here
drivers/net/wireless/ath9k/hw.c:2051:17: warning: symbol 'tmp' shadows an earlier one
drivers/net/wireless/ath9k/hw.c:1961:6: originally declared here

drivers/net/wireless/ath9k/eeprom.c:195:6: warning: symbol 'ath9k_fill_eeprom' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:463:5: warning: symbol 'ath9k_check_eeprom' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:1219:6: warning: symbol 'ath9k_hw_set_def_power_per_rate_table' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:1510:6: warning: symbol 'ath9k_hw_set_4k_power_per_rate_table' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2007:5: warning: symbol 'ath9k_set_txpower' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2106:6: warning: symbol 'ath9k_set_addac' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2543:6: warning: symbol 'ath9k_eeprom_set_board_values' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2606:5: warning: symbol 'ath9k_get_eeprom_antenna_cfg' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2622:4: warning: symbol 'ath9k_hw_get_4k_num_ant_config' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2628:4: warning: symbol 'ath9k_hw_get_def_num_ant_config' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2647:4: warning: symbol 'ath9k_get_num_ant_config' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:2790:5: warning: symbol 'ath9k_get_eeprom' was not declared. Should it be static?

drivers/net/wireless/ath9k/calib.c:962:30: warning: symbol 'iq_cal_multi_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:969:30: warning: symbol 'iq_cal_single_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:976:30: warning: symbol 'adc_gain_cal_multi_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:983:30: warning: symbol 'adc_gain_cal_single_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:990:30: warning: symbol 'adc_dc_cal_multi_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:997:30: warning: symbol 'adc_dc_cal_single_sample' was not declared. Should it be static?
drivers/net/wireless/ath9k/calib.c:1004:30: warning: symbol 'adc_init_dc_cal' was not declared. Should it be static?

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove superfluous check on changing channel
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:50 +0000 (15:58 -0800)]
ath9k: remove superfluous check on changing channel

When we try to change the channel in ath9k its because
either the configuration indicates we *have* changed
channels or HT configuration has changed. In both cases
we want to do a reset. Either way mac80211 will inform us
when we want to actually change the channel so trust those
calls.

Although in the patch it may seem as I am doing more code
changes I am not, all I am doing is removing the initial
branch conditional and shifting the code to the left.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove ath9k_hw_check_chan()
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:49 +0000 (15:58 -0800)]
ath9k: remove ath9k_hw_check_chan()

The only check we care about in ath9k_hw_check_chan() is
the internal regulatory check so use that.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove ath9k_hw_chan2wmode()
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:48 +0000 (15:58 -0800)]
ath9k: remove ath9k_hw_chan2wmode()

The only left users are for timing for ACK timeout, slotime and
CTS timeout. We currently use an array CLOCK_RATE to keep
these values per mode and since as only will use A and G
we can depend on the band to get the appropriate values.

We note that we should be using a different clock rate value
for CCK, we can do this in separate patch, currently this is
being disregarded and should only affect when we want to
change the default ACK/CTS timeout or slot time and stuck
with using using 802.11b.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove mode specific default noise floor values
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:47 +0000 (15:58 -0800)]
ath9k: remove mode specific default noise floor values

The NOISE_FLOOR array we have is mode specific, and the only
possible indexed values are A, B and G. The mode routine only
can return G or A, so this is band specific. Then since the
values for A and G (5ghz or 2ghz) are the same (-96) we simply
remove the array and use a static value.

If we later determine we want to use special values for
HT configurations we can use the new mac80211 conf_is_ht*()
helpers.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Make ANI CCK and OFDM error triggers band specific
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:46 +0000 (15:58 -0800)]
ath9k: Make ANI CCK and OFDM error triggers band specific

The CCK and OFDM ANI error triggers are not mode specific but rather
band specific so just make use of the already available band from
ieee80211_conf.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: no need for ht.enabled
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:45 +0000 (15:58 -0800)]
mac80211: no need for ht.enabled

We can simply use conf_is_ht() check where needed.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: make use of conf_is_ht*() helpers
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:44 +0000 (15:58 -0800)]
iwlwifi: make use of conf_is_ht*() helpers

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: make use of conf_is_ht*() in the rest of the driver
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:43 +0000 (15:58 -0800)]
ath9k: make use of conf_is_ht*() in the rest of the driver

Use shiny new conf_is_ht*() helpers, we can later remove ht.enabled if
desired.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: use ieee80211_conf on ath9k_hw_iscal_supported()
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:42 +0000 (15:58 -0800)]
ath9k: use ieee80211_conf on ath9k_hw_iscal_supported()

ath9k_hw_iscal_supported() just needs to be aware of your band
and if HT20 is being used so lets abandon our internal channel,
HT appended values and internal mode values and use ieee80211_conf
which already carries this information. This works as calibration
is being done for the currently configured channel.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: make request to get the noisefloor threshold band specific
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:41 +0000 (15:58 -0800)]
ath9k: make request to get the noisefloor threshold band specific

Lets make the request to get the current noise floor threshold
from the EEPROM band specific as it is band specific, not mode
specific.

This also adds a backpointer on the private channel structure
back to the ieee80211_channel structure as this is now needed during
ath9k_hw_getnf().

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: consolidate arguments on hw reset
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:40 +0000 (15:58 -0800)]
ath9k: consolidate arguments on hw reset

HW reset calls pass the same variables or structs
which we can obtain easily from ah. Although this also applies
during channel changes as we will keep around the ath9k_channel
passed as an argument for now.

We now also now propagate the hw reset errors down.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Rename ath_setcurmode() to ath_cache_conf_rate()
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:39 +0000 (15:58 -0800)]
ath9k: Rename ath_setcurmode() to ath_cache_conf_rate()

ath_setcurmode() is a bit misleading, all we are doing is
caching the rate for the corresponding configuration we
are using.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove cache of rate preference when using 11g protection
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:38 +0000 (15:58 -0800)]
ath9k: remove cache of rate preference when using 11g protection

No need to cache when we want to use 2Mbit/s for all protection
frames for 802.11g as we can determine that dynamically on
ath_buf_set_rate() itself.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: use hw->conf on ath_setcurmode()
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:37 +0000 (15:58 -0800)]
ath9k: use hw->conf on ath_setcurmode()

We don't need to use our own mode for setting the
the routine tries to do, in fact lets remove ath_chan2mode() now as
we can simply use the currently set band and the HT configuration
provided by mac80211 through the ieee80211_conf. This works on
changing channels as well as the internal ath9k_channel we use is
based on the ieee80211_channel in the config.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: add HT conf helpers
Luis R. Rodriguez [Tue, 23 Dec 2008 23:58:36 +0000 (15:58 -0800)]
mac80211: add HT conf helpers

In HT capable drivers you often need to check if you
are currently using HT20 or HT40. This adds a few small
helpers to let drivers figure that out.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use rx queue management infrastructure from iwlcore
Winkler, Tomas [Mon, 22 Dec 2008 03:31:23 +0000 (11:31 +0800)]
iwl3945: use rx queue management infrastructure from iwlcore

This patch uses rx queue alloc free and reset function from iwlcore.
This should fix the regression reported by Kalle Valo.

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>
15 years agoiwl3945: use iwl3945_tx_cmd instead of iwl_tx_cmd
Winkler, Tomas [Mon, 22 Dec 2008 03:31:19 +0000 (11:31 +0800)]
iwl3945: use iwl3945_tx_cmd instead of iwl_tx_cmd

The patch replaces iwl_tx_cmd with iwl3945_tx_cmd to complete
transitions introduced by "iwlwifi: use iwl_cmd instead
of iwl3945_cmd"

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>
15 years agoiwl3945: switch to the iwl-core send_card_state routine
Samuel Ortiz [Mon, 22 Dec 2008 03:31:18 +0000 (11:31 +0800)]
iwl3945: switch to the iwl-core send_card_state routine

Switch iwl3945 to use iwl-core:send_card_state routine.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: sync tx queue data structure with iwlagn
Samuel Ortiz [Mon, 22 Dec 2008 03:31:16 +0000 (11:31 +0800)]
iwl3945: sync tx queue data structure with iwlagn

We are now using the iwl_tx_queue for iwl3945. To reach that goal, we
included the 3945 specific tfd frame structure to iwl_tx_queue. This
has no effect on the current iwlagn code.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: adding utils ops
Kolekar, Abhijeet [Mon, 22 Dec 2008 03:31:15 +0000 (11:31 +0800)]
iwl3945: adding utils ops

The patch implements iwl_hcmd_utils_ops for 3945.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: rearrange 3945 tfd
Winkler, Tomas [Mon, 22 Dec 2008 03:31:14 +0000 (11:31 +0800)]
iwl3945: rearrange 3945 tfd

This patch moves 3945 TFD structures to iwl-3945-fh.h. It renames them
similarly to AGN naming. This patch also eliminates iwl3945_tx_info and
fixes endianity issue in iwl3945_tx_skb and iwl3945_enqueue_hcmd caused
by ugly casting.

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>
15 years agoiwl3945: use iwl_rb_status
Winkler, Tomas [Fri, 19 Dec 2008 02:37:43 +0000 (10:37 +0800)]
iwl3945: use iwl_rb_status

This patch makes use of iwl_rb_status also in 3945. The structure
for 3945 is not the same but since only closed_rb_num filed is used
in both cases there is no reason to duplicate it.

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>
15 years agoiwl3945: use iwl_get_hw_mode
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:42 +0000 (10:37 +0800)]
iwl3945: use iwl_get_hw_mode

Use iwl_get_hw_mode for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: release resources before shutting down
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:41 +0000 (10:37 +0800)]
iwl3945: release resources before shutting down

Release resource before shutting down and notify upper stack.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: simplify iwl3945_pci_probe
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:40 +0000 (10:37 +0800)]
iwl3945: simplify iwl3945_pci_probe

The patch simplifies iwl3945_pci_probe. It also uses apm_ops for apm init.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: add set_pwr_src
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:39 +0000 (10:37 +0800)]
iwl3945: add set_pwr_src

The patch adds 3945 iwl_lib_ops->set_pwr_src to the driver

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: add apm ops
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:38 +0000 (10:37 +0800)]
iwl3945: add apm ops

The patch adds 3945 iwl_lib_ops->apm_ops to the driver.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: add load ucode op
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:37 +0000 (10:37 +0800)]
iwl3945: add load ucode op

The patch adds 3945 iwl_lib_ops->load_ucode to the driver.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: cleanup and remove duplicate code
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:36 +0000 (10:37 +0800)]
iwl3945: cleanup and remove duplicate code

The patch removes the following duplicate structures:

iwl3945_is_alive
iwl3945_is_ready
iwl3945_is_init
iwl3945_is_rfkill_sw
iwl3945_is_rfkill
iwl3945_reset_qos

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use iwl_mod_params for 3945
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:35 +0000 (10:37 +0800)]
iwl3945: use iwl_mod_params for 3945

Use iwl_mod_params for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: use iwl_cmd instead of iwl3945_cmd
Winkler, Tomas [Fri, 19 Dec 2008 02:37:34 +0000 (10:37 +0800)]
iwlwifi: use iwl_cmd instead of iwl3945_cmd

This patch makes use of iwl_cmd instead of iwl3945_cmd and related
structures which were just the same.

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>
15 years agoiwlwifi: replace IWL_ERROR with IWL_ERR
Winkler, Tomas [Fri, 19 Dec 2008 02:37:33 +0000 (10:37 +0800)]
iwlwifi: replace IWL_ERROR with IWL_ERR

IWL_ERR doesn't use hidden priv pointer.

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>
15 years agoiwlwifi: replace IWL_WARNING with IWL_WARN
Winkler, Tomas [Fri, 19 Dec 2008 02:37:32 +0000 (10:37 +0800)]
iwlwifi: replace IWL_WARNING with IWL_WARN

IWL_WARN doesn't use hidden priv pointer.

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>
15 years agoiwlwifi: clean up printing
Tomas Winkler [Fri, 19 Dec 2008 02:37:31 +0000 (10:37 +0800)]
iwlwifi: clean up printing

Use IWL_ macros where possible to unify debug output usage.
Define new unconditional printouts IWL_ERR, IWL_WARN, IWL_INFO,
and IWL_CRIT which don't use hidden priv pointer.

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>
15 years agoiwlwifi: add more comments to IWL_DL_xx
Zhu Yi [Fri, 19 Dec 2008 02:37:30 +0000 (10:37 +0800)]
iwlwifi: add more comments to IWL_DL_xx

This adds more comments to IWL_DL_xx macros.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use iwl-io.h and delete iwl-3945-io.h
Abhijeet Kolekar [Fri, 19 Dec 2008 02:37:29 +0000 (10:37 +0800)]
iwl3945: use iwl-io.h and delete iwl-3945-io.h

The patch deletes iwl-3945-io.h and uses iwl-io.h functions.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: replaces iwl3945_priv with iwl_priv
Abhijeet Kolekar [Fri, 19 Dec 2008 02:37:28 +0000 (10:37 +0800)]
iwl3945: replaces iwl3945_priv with iwl_priv

The patch replaces iwl3945_priv to iwl_priv. It adds 3945 specific
data members to iwl_priv.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: rename iwl3945_priv variables
Abhijeet Kolekar [Fri, 19 Dec 2008 02:37:27 +0000 (10:37 +0800)]
iwl3945: rename iwl3945_priv variables

The patch renames iwl3945 specific variables in iwl3945_priv
structure. iwl3945_priv structure differs with iwl_priv structure
with these variables. Goal of this patch is to make transition from
iwl3945_priv to iwl_priv smoothly.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use iwl_hw_params in iwl3945_priv
Abhijeet Kolekar [Fri, 19 Dec 2008 02:37:26 +0000 (10:37 +0800)]
iwl3945: use iwl_hw_params in iwl3945_priv

The patch makes changed necessary to use iwl_hw_params to
replace iwl3945_driver_hw_info.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use iwl_rx_queue in iwl3945
Abhijeet Kolekar [Fri, 19 Dec 2008 02:37:25 +0000 (10:37 +0800)]
iwl3945: use iwl_rx_queue in iwl3945

The patch replaces iwl3945_rx_queue with iwl_rx_queue.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use iwl_rx_mem_buffer
Abhijeet Kolekar [Fri, 19 Dec 2008 02:37:24 +0000 (10:37 +0800)]
iwl3945: use iwl_rx_mem_buffer

The patch replaces iwl3945_rx_mem_buffer with iwl_rx_mem_buffer.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: beautify code
Wu Fengguang [Fri, 19 Dec 2008 02:37:23 +0000 (10:37 +0800)]
iwlwifi: beautify code

This patch beautifies macros in iwl-debug.h.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: replace iwl3945_broadcast_addr with iwl_bcast_addr
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:22 +0000 (10:37 +0800)]
iwl3945: replace iwl3945_broadcast_addr with iwl_bcast_addr

The patch replaces iwl3945_broadcast_addr with iwl_bcast_addr for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: remove duplicate structures from iwl-3945.h
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:21 +0000 (10:37 +0800)]
iwl3945: remove duplicate structures from iwl-3945.h

The patch renames and deletes duplicate structure from iwl-3945.h.
The following structures are renamed with iwlwifi counterparts:

1) iwl3945_ac_qos
2) iwl3945_ucode
3) iwl3945_qos_capabity

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: move structures from iwl-3945.h to iwl-dev.h
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:20 +0000 (10:37 +0800)]
iwl3945: move structures from iwl-3945.h to iwl-dev.h

The patch moves few structres from iwl-3945.h to iwl-dev.h.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: replace iwl_3945_cfg with iwl_cfg
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:19 +0000 (10:37 +0800)]
iwl3945: replace iwl_3945_cfg with iwl_cfg

The patch replaces iwl_3945_cfg with iwl_cfg for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: include iwl-core.h
Kolekar, Abhijeet [Fri, 19 Dec 2008 02:37:18 +0000 (10:37 +0800)]
iwl3945: include iwl-core.h

Use iwl-core.h instead of iwl-3945-core.h.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>