Denis V. Lunev [Wed, 23 Jan 2008 06:03:33 +0000 (22:03 -0800)]
[IPV4]: Consolidate fib_select_default.
The difference in the implementation of the fib_select_default when
CONFIG_IP_MULTIPLE_TABLES is (not) defined looks
negligible. Consolidate it and place into fib_frontend.c.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Denis V. Lunev [Wed, 23 Jan 2008 06:03:03 +0000 (22:03 -0800)]
[IPV4]: Declarations cleanup in ip_fib.h.
Two small issues fixed:
- fib_select_multipath is exported from fib_semantics.c rather than from
fib_frontend.c. So, move the declaration below appropriate comment.
- struct rt_entry declaration is not used. Drop it.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This converts dumping (and flushing) of large route tables form O(N^2)
to O(N). If the route dump took multiple pages then the dump routine
gets called again. The old code kept track of location by counter, the
new code instead uses the last key.
This is a really big win ( 0.3 sec vs 12 sec) for big route tables.
One side effect is that if the table changes during the dump, then the
last key will not be found, and we will return -EBUSY.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
It is easier with TRIE to dump the data traversal rather than
interating over every possible prefix. This saves some time and makes
the dump come out in sorted order.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Style cleanups:
* make check_leaf return -1 or plen, rather than by reference
* Get rid of #ifdef that is always set
* split out embedded function calls in if statements.
* checkpatch warnings
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Bruno Randolf [Mon, 21 Jan 2008 02:09:46 +0000 (11:09 +0900)]
ath5k: always extend rx timestamp with tsf
always extend the rx timestamp with the local TSF, since this information is
also needed for proper IBSS merging. this is done in the tasklet for now, maybe
has to be moved to the interrupt handler like in madwifi.
Bruno Randolf [Sat, 19 Jan 2008 09:18:41 +0000 (18:18 +0900)]
ath5k: configure backoff for IBSS beacon queue
in "11.1.2.2 Beacon generation in an IBSS" the IEEE802.11 standard says, each
STA should... "b) Calculate a random delay uniformly distributed in the range
between zero and twice aCWmin × aSlotTime,".
configure cwmin and cwmax of the beacon queue in IBSS mode according to this.
unfortunately beacon backoff does not work reliably yet, so i suspect we have a
problem somewhere else, since the same settings (and similar beacon timer
configuration) work for madwifi.
Bruno Randolf [Sat, 19 Jan 2008 09:18:21 +0000 (18:18 +0900)]
ath5k: use SWBA to detect IBSS HW merges
use SWBA (software beacon alert) interrupts to keep track of the next beacon
time und check if a HW merge (automatic TSF update) has happened on every
received beacon with the same BSSID.
this is necessary because the atheros hardware will silently update the local
TSF in IBSS mode, but not its beacon timers. if the TSF is ahead of the beacon
timers no beacons are sent until the timers wrap around (typically after about
1 minute).
this solution is not very nice, since we have to look into every beacon, but
there is apparently no other way to detect HW merges.
Bruno Randolf [Sat, 19 Jan 2008 09:17:59 +0000 (18:17 +0900)]
ath5k: better beacon timer calculation
update ath5k_beacon_update_timers() for better beacon timer calculation in a
variety of situations. most important is the possibility to call it with the
timestamp of a received beacon, when we detected that a HW merge has happened
and we need to reconfigure the beacon timers based on that.
we call this from the mac80211 callback reset_tsf now instead of beacon_update,
and there will be more use of it in the next patch.
Bruno Randolf [Fri, 18 Jan 2008 12:51:40 +0000 (21:51 +0900)]
ath5k: beacon interval is in TU
the beacon interval is passed by mac80211 in TU already, so we can directly use
it without conversion. also update the comments about TU (1 TU is defined by
802.11 as 1024usec).
Bruno Randolf [Fri, 18 Jan 2008 12:51:19 +0000 (21:51 +0900)]
ath5k: use 3 instead of 0x00000003
reviewed beacon timer initialization with register traces from madwifi: what we
are doing is correct :). one minor fix: use 3 instead of 0x00000003 - it's more
readable.
Michael Buesch [Tue, 22 Jan 2008 19:23:34 +0000 (20:23 +0100)]
b43: Fix MAC control and microcode init
This zeros out all microcode related memory before loading
the microcode.
This also fixes initialization of the MAC control register.
The _only_ place where we overwrite the contents of the MAC control
register is at the beginning of b43_chip_init().
All other places must do read() -> mask/set -> write() to not
overwrite existing bits.
This also adds a longer delay for waiting for the microcode
to initialize itself. It seems that the current timeout is sufficient
on all available devices, but there's no real reason why we shouldn't
wait for up to one second. Slow embedded devices might exist.
Better safe than sorry.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Buesch [Mon, 21 Jan 2008 18:55:09 +0000 (19:55 +0100)]
b43: Fix firmware caching
We must also store the ID string (filename) for the cached firmware blobs
and verify that we really have the right firmware cached before using it.
If we don't have the right fw cached, we must free it and request the
correct blobs.
This fixes bandswitch on A/B/G multi-PHY devices.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ron Rindjunsky [Mon, 21 Jan 2008 10:39:12 +0000 (12:39 +0200)]
mac80211: fix rx flow sparse errors, make functions static
This patch adds static declarations to functions in the Rx flow in order to
eliminate sparse errors
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>
Ron Rindjunsky [Mon, 21 Jan 2008 10:39:11 +0000 (12:39 +0200)]
mac80211: fixing ieee80211_bar types
This patch changes ieee80211_bar control and start_seq_num to
match the proper bitwise attribute expected from ieee 802.11 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>
Stefano Brivio [Wed, 16 Jan 2008 23:38:29 +0000 (00:38 +0100)]
rc80211-pid: fix last_sample initialization
Fix last_sample initialization. kzalloc'ing the per-STA data wasn't enough,
as jiffies can assume negative values as well. This fixes a bug which
prevented correct PID operation for a while after booting.
Thanks to Michael Buesch for reporting this.
Reported-and-tested-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 16 Jan 2008 20:47:40 +0000 (21:47 +0100)]
mac80211: fix RCU locking in __ieee80211_rx_handle_packet
Commit c7a51bda ("mac80211: restructure __ieee80211_rx") extracted
__ieee80211_rx_handle_packet out of __ieee80211_rx and hence changed
the locking rules for __ieee80211_rx_handle_packet(), it is now
invoked under RCU lock. There is, however, one instance left where
it contains an rcu_read_unlock() in an error path, which is a bug.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Buesch [Wed, 9 Jan 2008 19:15:31 +0000 (20:15 +0100)]
b43legacy: Remove the PHY spinlock
This fixes a sparse warning about weird locking.
The spinlock is not needed, so simply remove it.
This also adds some sanity checks to the PHY and radio locking
to protect against recursive locking.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Guy Cohen [Wed, 9 Jan 2008 17:12:48 +0000 (19:12 +0200)]
mac80211: Assign correct TID for local bridged packets
This patch assigns correct TID to frames transmitted between
two stations in the same BSS in AP mode.
The problem is that skb->protocol is not set to ETH_P_IP and it is wrong
to use that field at this stage.
The fix compares the LLC/Protocol headers explicitly to check if the
encapsulated frame is IP frame
Signed-off-by: Guy Cohen <guy.cohen@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Dumazet [Tue, 22 Jan 2008 14:18:34 +0000 (06:18 -0800)]
[DST]: shrinks sizeof(struct rtable) by 64 bytes on x86_64
On x86_64, sizeof(struct rtable) is 0x148, which is rounded up to
0x180 bytes by SLAB allocator.
We can reduce this to exactly 0x140 bytes, without alignment overhead,
and store 12 struct rtable per PAGE instead of 10.
rate_tokens is currently defined as an "unsigned long", while its
content should not exceed 6*HZ. It can safely be converted to an
unsigned int.
Moving tclassid right after rate_tokens to fill the 4 bytes hole
permits to save 8 bytes on 'struct dst_entry', which finally permits
to save 8 bytes on 'struct rtable'
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Tue, 22 Jan 2008 14:11:48 +0000 (06:11 -0800)]
[NETNS][FRAGS]: Make the LRU list per namespace.
The inet_frags.lru_list is used for evicting only, so we have
to make it per-namespace, to evict only those fragments, who's
namespace exceeded its high threshold, but not the whole hash.
Besides, this helps to avoid long loops in evictor.
The spinlock is not per-namespace because it protects the
hash table as well, which is global.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Tue, 22 Jan 2008 14:11:04 +0000 (06:11 -0800)]
[NETNS][FRAGS]: Isolate the secret interval from namespaces.
Since we have one hashtable to lookup the fragment, having
different secret_interval-s for hash rebuild doesn't make
sense, so move this one to inet_frags.
The inet_frags_ctl becomes empty after this, so remove it.
The appropriate ctl table is kept read-only in namespaces.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Tue, 22 Jan 2008 14:02:14 +0000 (06:02 -0800)]
[NETNS][FRAGS]: Make the inet_frag_queue lookup work in namespaces.
Since fragment management code is consolidated, we cannot have the
pointer from inet_frag_queue to struct net, since we must know what
king of fragment this is.
So, I introduce the netns_frags structure. This one is currently
empty, but will be eventually filled with per-namespace
attributes. Each inet_frag_queue is tagged with this one.
The conntrack_reasm is not "netns-izated", so it has one static
netns_frags instance to keep working in init namespace.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Tue, 22 Jan 2008 13:58:31 +0000 (05:58 -0800)]
[NETNS][FRAGS]: Move ctl tables around.
This is a preparation for sysctl netns-ization.
Move the ctl tables to the files, where the tuning
variables reside. Plus make the helpers to register
the tables.
This will simplify the later patches and will keep
similar things closer to each other.
ipv4, ipv6 and conntrack_reasm are patched differently,
but the result is all the tables are in appropriate files.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Auke Kok [Thu, 24 Jan 2008 10:22:38 +0000 (02:22 -0800)]
igb: PCI-Express 82575 Gigabit Ethernet driver
We are pleased to announce a new Gigabit Ethernet product and its
driver to the linux community. This product is the Intel(R) 82575
Gigabit Ethernet adapter family. Physical adapters will be available
to the public soon. These adapters come in 2- and 4-port versions
(copper PHY) currently. Other variants will be available later.
The 82575 chipset supports significantly different features that
warrant a new driver. The descriptor format is (just like the
ixgbe driver) different. The device can use multiple MSI-X vectors
and multiple queues for both send and receive. This allows us to
optimize some of the driver code specifically as well compared to
the e1000-supported devices.
This version of the igb driver no lnger uses fake netdevices and
incorporates napi_struct members for each ring to do the multi-
queue polling. multi-queue is enabled by default and the driver
supports NAPI mode only.
All the namespace collisions should be gone in this version too. The
register macro's have been condensed to improve readability.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
[IPV6] NDISC: Sparse: Use different variable name for local use.
Fix the following sparse warnings:
| net/ipv6/ndisc.c:1300:21: warning: symbol 'opt' shadows an earlier one
| net/ipv6/ndisc.c:1078:7: originally declared here
[IPV6] ADDRCONF: Sparse: Make inet6_dump_addr() code paths more straight-forward.
Fix the following sparse warning:
| net/ipv6/addrconf.c:3384:2: warning: context imbalance in 'inet6_dump_addr' - different lock contexts for basic block
[IPV6]: Sparse: Declare non-static ipv6_{route,icmp,frag}_sysctl_init() in header.
Fix the following sparse warnings:
| net/ipv6/route.c:2491:18: warning: symbol 'ipv6_route_sysctl_init' was not declared. Should it be static?
| net/ipv6/icmp.c:922:18: warning: symbol 'ipv6_icmp_sysctl_init' was not declared. Should it be static?
| net/ipv6/reassembly.c:628:6: warning: symbol 'ipv6_frag_sysctl_init' was not declared. Should it be static?
[IPV6] ADDRLABEL: Sparse: Make several functions static.
Fix following sparse warnings:
| net/ipv6/addrlabel.c:172:25: warning: symbol 'ip6addrlbl_alloc' was not declared. Should it be static?
| net/ipv6/addrlabel.c:219:5: warning: symbol '__ip6addrlbl_add' was not declared. Should it be static?
| net/ipv6/addrlabel.c:260:5: warning: symbol 'ip6addrlbl_add' was not declared. Should it be static?
| net/ipv6/addrlabel.c:285:5: warning: symbol '__ip6addrlbl_del' was not declared. Should it be static?
| net/ipv6/addrlabel.c:311:5: warning: symbol 'ip6addrlbl_del' was not declared. Should it be static?
[IPV6] UDPLITE: Sparse: Declare non-static symbols in header.
Fix the following sparse warnings:
| net/ipv6/udplite.c:45:14: warning: symbol 'udplitev6_prot' was not declared. Should it be static?
| net/ipv6/udplite.c:80:12: warning: symbol 'udplitev6_init' was not declared. Should it be static?
| net/ipv6/udplite.c:99:6: warning: symbol 'udplitev6_exit' was not declared. Should it be static?
Denis V. Lunev [Tue, 22 Jan 2008 01:35:06 +0000 (17:35 -0800)]
[NETNS]: Pass correct namespace in ip_rt_get_source.
ip_rt_get_source is the infamous place for which dst_ifdown kludges
have been implemented. This means that rt->u.dst.dev can be safely
dereferrenced obtain nd_net.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Denis V. Lunev [Tue, 22 Jan 2008 01:33:15 +0000 (17:33 -0800)]
[NETNS]: Pass correct namespace in fib_validate_source.
Correct network namespace is available inside fib_validate_source. It
can be obtained from the device passed in. The device is not NULL as
in_device is obtained from it just above.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Tue, 22 Jan 2008 01:07:06 +0000 (17:07 -0800)]
[BNX2]: Add link-down workaround on 5706 serdes.
In some blade systems using the 5706 serdes, the hardware sometimes
does not properly generate link down interrupts. We add a workaround
in the driver's timer to force a link-down when some PHY registers
report loss of SYNC.
The parallel detect logic is cleaned up slightly to better integrate
the workaround.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Tue, 22 Jan 2008 01:06:41 +0000 (17:06 -0800)]
[BNX2]: Fix minor bug in bnx2_has_work().
It is more correct to get the status block from the bnx2_napi struct
instead of the bnx2 struct. It happens that they are the same in this
case because we are using the first MSIX vector.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireless/iwlwifi/iwl-3945.c: In function 'iwl3945_add_radiotap':
drivers/net/wireless/iwlwifi/iwl-3945.c:269: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stefano Brivio [Sun, 13 Jan 2008 17:35:52 +0000 (18:35 +0100)]
b43legacy: fix use-after-free rfkill bug
Fix rfkill code which caused a use-after-free bug. Thanks to David
Woodhouse for spotting this out.
Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch removes a warning print from ieee80211_sta_stop_rx_ba_session
in case the tid is inactive when interface goes down.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ron Rindjunsky [Sun, 13 Jan 2008 16:21:58 +0000 (18:21 +0200)]
mac80211: A-MPDU Rx stop aggregation on proper dev
This patch adds a check to insure that Rx A-MPDU will be stopped only
for the proper device.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Sun, 13 Jan 2008 13:16:47 +0000 (14:16 +0100)]
mac80211: Initialize vif pointer
Before calling update_beacon() mac80211 must
initialize the control.vif pointer so it can
be used by the driver to determine which
interface is trying to send the beacon.
v2: ieee80211_beacon_get() should also initialize the
vif pointer since it can be called by mac80211 internally
before calling config_interface().
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 16 Jan 2008 14:59:52 +0000 (15:59 +0100)]
libertas: pepper main with debug statement
libertas: re-pepper debug statementThe recent fluff of updates
didn't put proper lbs_deb_enter/leave calls into the source code.
Add them where appropriate.
Also contains some whitespace changes.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 16 Jan 2008 14:57:44 +0000 (15:57 +0100)]
libertas: don't blindly try mesh
The CF card only has a very old firmware (5.0.16p0). This firmware doesn't
know anything about mesh config. However, current code blindly calls
mesh_config when the card is inserted. So check the firmware version before
issuing this command.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
netif_rx should be called only from interrupt context. if_cs and if_sdio receive
packets from other contexts, and thus should call netif_rx_ni.
Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Tue, 15 Jan 2008 01:46:24 +0000 (17:46 -0800)]
iwlwifi: remove reference to non-existent documentation
The external iwlwifi driver comes with a README file that is
referenced by the Kconfig. This README is not present in the
driver included in the kernel. Remove references to this
documentation.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Mon, 28 Jan 2008 04:41:38 +0000 (20:41 -0800)]
iwlwifi: 3954 renames iwl3945_rate_scale_priv to iwl3945_rs_sta
This patch renames iwl3945_rate_scale_priv to iwl3945_rs_sta as it
better represents the purpose of this variable.
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomas Winkler [Tue, 15 Jan 2008 01:46:21 +0000 (17:46 -0800)]
iwlwifi: 4965 unify rate scale variable names for station data
1, This patch renames iwl4965_rate_scale_priv to iwl4965_lq_sta.
This type represents a station's link quality.
2. The names of the variables of this type were rs_priv, lq_data, lq, crl
across the file. All are now unified under the name lq_sta.
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>
Tomas Winkler [Tue, 15 Jan 2008 01:46:20 +0000 (17:46 -0800)]
iwlwifi: move uCode helper functions to iwl-helpers.h
This patch adds iwl_free_fw_desc ucode helper function.
It also moves ucode helper functions to iwl-helpers.h.
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>
Zhu Yi [Thu, 24 Jan 2008 10:19:38 +0000 (02:19 -0800)]
iwlwifi: fix problem when rf_killswitch change during suspend/resume
After we delay device initialization until interface up, there are more
conditions for the hardware rf_kill switch states during suspend and
resume. For example, before suspend we can have interface up or down,
rf_kill enable or disable; before resume we can have rf_kill enable or
disable. So there are totally 2^3 = 8 conditions to handle. This patch
addressed this problem and makes sure every condition works correctly.
This patch also merges the device suspend and resume handlers with the
mac_start and mac_stop code since they are basically doing the same
thing.
Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Zhu Yi [Tue, 15 Jan 2008 01:46:18 +0000 (17:46 -0800)]
iwlwifi: delay firmware loading from pci_probe to network interface open
This patch moves the firmware loading (read firmware from disk and load
it into the device SRAM) from pci_probe time to the first network
interface open time. There are two reasons for doing this:
1. To support kernel buildin iwlwifi drivers. Because kernel initializes
network devices subsystem before hard disk and SATA subsystem, it is
impossible to get the firmware image from hard disk in the PCI probe
handler. Thus delaying the firmware loading into the network
interface open time is the way to go. Note, we only read the firmware
image from hard disk the first time the interface is open. After this
is succeeded, we cache the firmware image into the host memory. This
is a performance gain when user open and close the interface multiple
times and is necessary for device suspend and resume.
2. For better power saving. When the iwlwifi modules are loaded (or
buildin the kernel) but the wireless network interface is not being
used, it is a good practice the wireless device consumes as less
power as possible. Unloading the firmware from the wireless device
and unregister the driver's interrupt handler in the network
interface close handler provides users a way to achieve this. User
space network configuration tools (i.e NetworkManager) can also
contribute here when it detects a wired cable is connected and
close the wireless interface automatically.
This patch also includes the pci_save/restore_state() fixed by Ian Schram
upon the first version.
Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Ian Schram <ischram@telenet.be> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Tue, 15 Jan 2008 01:46:16 +0000 (17:46 -0800)]
iwlwifi: remove iwl4965_tx_cmd
This patch removes iwl4965_tx_cmd function and splits its content to
iwl4965_hw_build_tx_cmd_rate, iwl4965_build_tx_cmd_basic,
and iwl4965_tl_get_stats function. The latest one will be deprecated
when traffic load will move to rate scale 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>
Tomas Winkler [Tue, 15 Jan 2008 01:46:15 +0000 (17:46 -0800)]
iwlwifi: move iwl4965_get_dma_hi_address function to iwl-helpers.h
This patch moves iwl4965_get_dma_hi_address function to iwl-headers.h
as iwl_get_dma_hi_address. This function will be used in more chipsets
than only 4965.
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>