malc [Thu, 12 Mar 2009 09:49:20 +0000 (09:49 +0000)]
sctp: add Adaptation Layer Indication parameter only when it's set
RFC5061 states:
Each adaptation layer that is defined that wishes
to use this parameter MUST specify an adaptation code point in an
appropriate RFC defining its use and meaning.
If the user has not set one - assume they don't want to sent the param
with a zero Adaptation Code Point.
Rationale - Currently the IANA defines zero as reserved - and
1 as the only valid value - so we consider zero to be unset - to save
adding a boolean to the socket structure.
Including this parameter unconditionally causes endpoints that do not
understand it to report errors unnecessarily.
Signed-off-by: Malcolm Lashley <mlashley@gmail.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Thu, 12 Mar 2009 09:49:19 +0000 (09:49 +0000)]
sctp: fix to send FORWARD-TSN chunk only if peer has such capable
RFC3758 Section 3.3.1. Sending Forward-TSN-Supported param in INIT
Note that if the endpoint chooses NOT to include the parameter, then
at no time during the life of the association can it send or process
a FORWARD TSN.
If peer does not support PR-SCTP capable, don't send FORWARD-TSN chunk
to peer.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Thu, 12 Mar 2009 09:49:18 +0000 (09:49 +0000)]
sctp: fix to indicate ASCONF support in INIT-ACK only if peer has such capable
This patch fix to indicate ASCONF support in INIT-ACK only if peer has
such capable.
This patch also fix to calc the chunk size if peer has no FWD-TSN
capable.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vlad Yasevich [Thu, 12 Mar 2009 09:49:17 +0000 (09:49 +0000)]
sctp: simplify sctp listening code
sctp_inet_listen() call is split between UDP and TCP style. Looking
at the code, the two functions are almost the same and can be
merged into a single helper. This also fixes a bug that was
fixed in the UDP function, but missed in the TCP function.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:14:29 +0000 (21:14 +0000)]
cxgb3: update driver version
update driver version to 1.1.1-ko
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:14:24 +0000 (21:14 +0000)]
cxgb3: update FW
Update FW to 7.1
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:14:19 +0000 (21:14 +0000)]
cxgb3: detect mac link faults.
The driver currently ignores the local or remote link faults
raised at the mac layer. This patch fixes it.
Our mac however only advertizes link events, so wait for the
phy to stabilize the link, then enable mac link events interrupts.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:14:14 +0000 (21:14 +0000)]
cxgb3: Update Rev3 mac workaround
Update the heurstics workaround unlocking a hung mac:
- reduce Tx mac toggling by enabling Tx drain before resetting the mac
- Take Tx (lack of) activity in account only
- Update the monitoring counter range to 64 bits
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:14:09 +0000 (21:14 +0000)]
cxgb3: disable high freq non-data interrupts
Under RX pressure, The HW might generate a high load of interrupts
to signal mac fifo or free lists overflow.
Disable the interrupts, and poll the relevant status bits
to maintain stats.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:14:04 +0000 (21:14 +0000)]
cxgb3: separate TX and RX reclaim handlers
Separate TX and RX reclaim handlers
Don't disable interrupts in RX reclaim handler.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:13:59 +0000 (21:13 +0000)]
cxgb3: prefetch buffer access in GRO mode
Elmininate a cache miss when accessing the CPL header within
the first aggregated buffer.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:13:54 +0000 (21:13 +0000)]
cxgb3: fix skb truesize in jumbo mode
Update skb truesize correctly for the 2nd buffer from a Jumbo frame
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:13:49 +0000 (21:13 +0000)]
cxgb3: release page ref on mapping error
Release page chunk reference in case we fail to map it.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Thu, 12 Mar 2009 21:13:43 +0000 (21:13 +0000)]
cxgb3: ring rx door bell less frequently
Ring free lists door bell less frequently,
specifically every quarter of the active FL
size.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Thu, 12 Mar 2009 06:24:03 +0000 (23:24 -0700)]
wimax: fix i2400m printk formats
Fix printk format warnings:
drivers/net/wimax/i2400m/netdev.c:523: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'
drivers/net/wimax/i2400m/netdev.c:548: warning: format '%zu' expects type 'size_t', but argument 7 has type 'unsigned int'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Wed, 11 Mar 2009 16:23:57 +0000 (09:23 -0700)]
tcp: allow timestamps even if SYN packet has tsval=0
Some systems send SYN packets with apparently wrong RFC1323 timestamp
option values [timestamp tsval=0 tsecr=0].
It might be for security reasons (http://www.secuobs.com/plugs/25220.shtml )
Linux TCP stack ignores this option and sends back a SYN+ACK packet
without timestamp option, thus many TCP flows cannot use timestamps
and lose some benefit of RFC1323.
Other operating systems seem to not care about initial tsval value, and let
tcp flows to negotiate timestamp option.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:38 +0000 (08:02 +0000)]
forcedeth: version bump to 64
This patch bumps up the version to 0.64
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:34 +0000 (08:02 +0000)]
forcedeth: fix irq clearing and napi spin lock changes
This patch clears the irqstatus register with the exact same events it
has read from it. Since the read-write operation is not atomic, a new
irqstatus bit could have been set in between these operations and would
then be cleared accidentally.
Secondly, we now don't need any spin lock protection when
scheduling/completing napi poll as the isr will not execute anymore (as
we turn off all interrupts now).
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:30 +0000 (08:02 +0000)]
forcedeth: performance changes
This patch modifies the throughput mode poll settings to reduce the
number of interrupts. This is only used by older hardware that need a
timer irq in throughput mode.
Secondly, this patch increases the default rx ring from 128 to 512. This
drastically improves bandwidth utilization for small packets sizes i.e
512 bytes.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:26 +0000 (08:02 +0000)]
forcedeth: add interrupt moderation logic
This patch adds the logic to moderate the interrupts by changing the
mode between throughput and poll. If there has been a large amount of
time without any burst of network load, the code will transition to pure
throughput mode (where each tx/rx/other will cause an interrupt). If
bursts of network load occurs, it will transition to poll based mode to
help reduce cpu utilization (it will not interrupt on each packet) while
maintaining the optimum network bandwidth utilization.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:22 +0000 (08:02 +0000)]
forcedeth: remove isr processing loop
This patch is only a subset of changes so that it is easier to see the
modifications. This patch removes the isr 'for' loop and shifts all the
logic to account for new tab spacing.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:18 +0000 (08:02 +0000)]
forcedeth: add new optimization mode
A new optimization mode called Dynamic has been added. This will be mode
where interrupt moderation logic will dynamically switch between pure
throughput mode and poll based (called 'cpu') mode.
Also, for newer chipsets, the timer irq is not needed for throughput
mode. Secondly, since we are modifying the irqmask to change between
modes, msix is not supported.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:14 +0000 (08:02 +0000)]
forcedeth: napi - handle all processing
The napi poll routine has been modified to handle all interrupt events
and process them accordingly. Therefore, the ISR will now only schedule
the napi poll and disable all interrupts instead of just disabling rx
interrupt.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:10 +0000 (08:02 +0000)]
forcedeth: add/modify tx done with limit
There are two tx_done routines to handle tx completion processing. Both
these functions now take in a limit value and return the amount of tx
completions. This will be used by a future patch to determine the total
amount of work done.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:06 +0000 (08:02 +0000)]
forcedeth: remove overhead
This patch removes unnecessary overhead code. Firstly, there is no nead
to mask off unwanted interrupts as we will be checking against the
irqmask field anyways. Secondly, there has been no value in last few
years from detecting error or unknown interrupts.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:02:03 +0000 (08:02 +0000)]
forcedeth: save irq events for napi processing
This patch will save the irq events in the driver's context so that the
napi routine knows which interrupts have occurred. Subsequent changes
will be moving all interrupt processing into the napi poll routine.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:01:59 +0000 (08:01 +0000)]
forcedeth: remove msix + napi
This patch removes support for msix running in conjunction with napi.
There has been reported issues regarding the behaviour of irqmask and
generation of interrupts by the HW when in MSIX mode. When running napi,
the driver is constantly turning off/on the irqmask. For the time being,
I am going to disable it until I can root cause the issue.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:01:55 +0000 (08:01 +0000)]
forcedeth: fix missing napi enable/disable calls
This patch adds missing napi enable/disable calls.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ayaz Abdulla [Thu, 5 Mar 2009 08:01:49 +0000 (08:01 +0000)]
forcedeth: fix stats version feature
Newer versions of the stats feature would not encompass all older
versions. This would result in only retreiving a subset of all available
stats in HW.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Mon, 9 Mar 2009 13:51:55 +0000 (13:51 +0000)]
net: fix warning about non-const string
Since dev_set_name takes a printf style string, new gcc complains
if arg is not const.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Mon, 9 Mar 2009 08:18:29 +0000 (08:18 +0000)]
net: convert usage of packet_type to read_mostly
Protocols that use packet_type can be __read_mostly section for better
locality. Elminate any unnecessary initializations of NULL.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Bolle [Sun, 8 Mar 2009 05:23:13 +0000 (05:23 +0000)]
gigaset: return -ENOTTY for unimplemented functions
A number of functions in the usb_gigaset module will return -EINVAL if
CONFIG_GIGASET_UNDOCREQ is not set. Make these return -ENOTTY as it's
more specific and it might make it easier to see (from userspace) why
these functions actually fail.
Impact: some error return codes changed
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tilman Schmidt [Sat, 7 Mar 2009 12:11:02 +0000 (12:11 +0000)]
gigaset: Kconfig cleanup
Streamline dependencies and remove some obsolete or redundant comments
in the Gigaset ISDN driver's Kconfig file. In particular, remove the
strong warning against the GIGASET_UNDOCREQ option, as in seven years
of existence, the code in question has never been reported to cause
any harm.
Impact: Kconfig cleanup, no functional change
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dhananjay Phadke [Mon, 9 Mar 2009 08:50:56 +0000 (08:50 +0000)]
netxen: annotate board_config and board_type
Remove huge board config structure from each instance, read
only necessary fields from flash.
Replace board_type with port_type (1G/10G), there's another
board_type field describing card type (SFP/XFP/CX4).
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dhananjay Phadke [Mon, 9 Mar 2009 08:50:55 +0000 (08:50 +0000)]
netxen: cleanup superfluous multi-context code
MAX_RCV_CTX was set to 1, there's only rx context per
PCI function.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dhananjay Phadke [Mon, 9 Mar 2009 08:50:54 +0000 (08:50 +0000)]
netxen: refactor netdev open close
rearrange open and close into hardware attach(), detach() and
nic up() and down(). this will be used for suspend/resume
subsequently.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dhananjay Phadke [Mon, 9 Mar 2009 08:50:53 +0000 (08:50 +0000)]
netxen: small xmit optimizations
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dhananjay Phadke [Mon, 9 Mar 2009 08:50:52 +0000 (08:50 +0000)]
netxen: cleanup rx handling
o remove unused rx fragment handling code.
o imporove check for status descriptor ownership.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 10 Mar 2009 12:04:16 +0000 (05:04 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/bnx2x_main.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/rt2x00/rt73usb.c
Eilon Greenstein [Mon, 9 Mar 2009 00:52:21 +0000 (00:52 +0000)]
bnx2x: Using DMAE to initialize the chip
There was a bug, which occasionally caused failure in PRAM initialization after
the cold boot.
Also incremented version number to 1.45.27.
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Mon, 9 Mar 2009 00:52:17 +0000 (00:52 +0000)]
bnx2x: Casting page alignment
Adding a proper cast to the argument of PAGE_ALIGN macro so that the output
won't depend on its original type. Without this cast aligned value will be
truncated to the size of the argument type.
Reported-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Mon, 9 Mar 2009 00:52:14 +0000 (00:52 +0000)]
bnx2x: Adding restriction on sge_buf_size
sge_buff_size may not be more than 0xffff.
Reported-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:28 +0000 (10:59 +0000)]
qlge: bugfix: Fix endian issue related to rx buffers.
This was introduced in an earlier net-next patch.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:27 +0000 (10:59 +0000)]
qlge: bugfix: Pad outbound frames smaller than 60 bytes.
With some asic configurations xmit of frames smaller than 60 bytes may
fail.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:26 +0000 (10:59 +0000)]
qlge: bugfix: Move netif_napi_del() to common call point.
Moving netif_napi_del() up the call chain so it will get called from all
exit points.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:25 +0000 (10:59 +0000)]
qlge: Remove spinlock from asic init path.
There is nothing to contend with it.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:24 +0000 (10:59 +0000)]
qlge: Clear shadow registers before use.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:23 +0000 (10:59 +0000)]
qlge: Get rid of irqsave/restore in intr disable.
The completion interrupt disable routine is only called from the ISR, so
there is no need for irqsave/restore.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:22 +0000 (10:59 +0000)]
qlge: bugfix: Tell hw to strip vlan header.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:21 +0000 (10:59 +0000)]
qlge: Add tx multiqueue support.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:20 +0000 (10:59 +0000)]
qlge: Add support for GRO.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:19 +0000 (10:59 +0000)]
qlge: Increase filtering for inbound csum settings.
Chip does not do UDP checksum when fragmentation occurs.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:18 +0000 (10:59 +0000)]
qlge: Remove debug junk from asic reset logic.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Mon, 9 Mar 2009 10:59:17 +0000 (10:59 +0000)]
qlge: Move reset logic into asic_reset_worker func.
Get rid of extraneous ql_cycle_adapter. It's only called from the one
place.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Christian Lamparter [Thu, 5 Mar 2009 23:53:59 +0000 (00:53 +0100)]
p54: fix race condition in memory management
This patch fixes a number of race conditions in the driver.
Up until now, "entry" pointer was initialized before acquiring the right lock.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Roel Kluin [Tue, 3 Mar 2009 21:55:21 +0000 (22:55 +0100)]
cfg80211: test before subtraction on unsigned
freq_diff is unsigned, so test before subtraction
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Buesch [Wed, 4 Mar 2009 15:41:10 +0000 (16:41 +0100)]
b43: Fix compilation for devices without PCI core
This fixes compilation, if the PCI core is disabled.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:40 +0000 (19:23 +0200)]
ath9k: Add a debugfs interface for controlling virtual wiphys
debugfs ath9k/phy#/wiphy can be used to show the current list of
virtual wiphys and to add/remove virtual wiphys. Eventually, this
interface could be replaced with a cfg80211/nl80211 command that is
passed through mac80211.
For example:
# cat /debug/ath9k/phy0/wiphy
primary: phy0
# echo add > /debug/ath9k/phy0/wiphy
# cat /debug/ath9k/phy0/wiphy
primary: phy0
secondary: phy1
# echo del=phy1 > /debug/ath9k/phy0/wiphy
# cat /debug/ath9k/phy0/wiphy
primary: phy0
In addition, following commands can be used to test pausing and
unpausing of the virtual wiphys:
pause=phy1
unpause=phy1
select=phy1
(select pauses and unpauses wiphys automatically based on channel)
schedule=500
(set wiphy scheduling interval in msec; 0 = disable; default value: 500)
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:39 +0000 (19:23 +0200)]
ath9k: Add a simple virtual wiphy scheduler
This is a very simple scheduler that goes through the wiphys and
schedules one at a time every N milliseconds (current default value:
500 ms). This is enough for initial testing, but there are number of
areas where a more complex scheduler can improve operations greatly.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:38 +0000 (19:23 +0200)]
ath9k: Special processing for channel changes during scan
Allow mac80211-controlled channel changes on an active wiphy and
especially during a scan. We need this as long as the scan is
controlled by mac80211. Moving this control into the driver could
allow some optimizations on scanning while using multiple virtual
interfaces, but for now, try to work as well as possible with the
current scan mechanism.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:37 +0000 (19:23 +0200)]
ath9k: Add workaround to recover from failed channel changes
It looks like channel change may fail in some cases and end up leaving
the hardware in state where it cannot transmit any frames. Add a
workaround to recover from this state if we detect that wiphy
selection is failing due to wiphys not leaving PAUSING state.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:36 +0000 (19:23 +0200)]
ath9k: Check virtual wiphy state on tx()
mac80211 should not be requesting us to transmit frames on paused
wiphys since we stop the TX queues. Just in case, add debug code to
make sure we catch if this were to happen.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:35 +0000 (19:23 +0200)]
ath9k: Pause other virtual wiphys on channel change
For now, allow channel changes immediately and just force the other
virtual wiphys to paused state. This is needed to allow
mac80211-controlled scan to control channel changes.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:34 +0000 (19:23 +0200)]
ath9k: Register larger listen interval
Notify the AP that we may be sleeping longer to allow the AP power
save code to buffer larger number of frames for us when using virtual
wiphys.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:33 +0000 (19:23 +0200)]
ath9k: Make start/stop operations aware of virtual wiphys
Instead of always going through initialization/deinitialization steps,
do this only for the first/last wiphy to not break the other wiphys.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:32 +0000 (19:23 +0200)]
ath9k: Add routines for switching between active virtual wiphys
ath9k_wiphy_select() can be used to select a virtual wiphy to be
activated. Other virtual wiphys will be paused and once that is done,
the operational channel is changed and the wiphys that are on the
selected channel will be unpaused.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:31 +0000 (19:23 +0200)]
ath9k: Virtual wiphy pause/unpause functionality
Allow virtual wiphys to be paused/unpaused to allow off-channel
operations. Pause will stop all TX queues for the wiphy and move the
STA into power save mode if in managed mode. Unpause wakes up the TX
queues and notifies the AP that the STA woke up if in managed mode.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:30 +0000 (19:23 +0200)]
ath9k: Configure RX filter for multi-BSSID broadcast
Allow RX filter to pass through all broadcast/multicast frames (i.e.,
no BSSID filtering) if virtual interfaces are used. Software filtering
will be used in this case to drop broadcast/multicast frames for
foreign BSSIDs.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:29 +0000 (19:23 +0200)]
ath9k: Add support for multiple secondary virtual wiphys
The new struct ath_softc::sec_wiphy array is used to store information
about virtual wiphys and select which wiphy is used in calls to
mac80211. Each virtual wiphy will be assigned a different MAC address
based on the virtual wiphy index.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:28 +0000 (19:23 +0200)]
ath9k: Add data structure for supporting virtual radio/wiphy operation
This is the initial step in allowing ath9k to register multiple
virtual radios (wiphys). The goal of virtual radios is to allow the
same radio to be shared for multiple virtual interfaces that may
operate on different channels. The mac80211 virtual interface support
is designed only for single channel operation and as such, it is not
suitable for this type of use. Anyway, it can be used on top of the
virtual radio concept, if desired (e.g., use two virtual radios to
handle two channels and then add multiple mac80211 virtual interfaces
on top of each virtual radio).
The new struct ath_wiphy is now registered as the driver data
structure for wiphy. This structure has a pointer to the shared (among
virtual wiphys of the same physical radio) struct ath_softc data. The
primary wiphy maintains the allocated memory for ath_softc. Secondary
(virtual) wiphys will only allocate the new ath_wiphy structure.
Registration of secondary wiphys is added in a separate patch.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:27 +0000 (19:23 +0200)]
ath9k: Set BSSID mask based on configured interfaces
Instead of using a hardcoded BSSID mask (mask for own addresses),
iterate through all active interfaces and determine the minimal mask
that covers all local addresses.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 17:23:26 +0000 (19:23 +0200)]
ath9k: Cleanup multiple VIF processing
Replace the internal sc_vaps array and index values by using vif
pointer from mac80211. Allow multiple VIPs to be registered. Though,
number of beaconing VIFs is still limited by ATH_BCBUF (currently
1). Multiple virtual STAs support is not yet complete, but at least
the data structures should now be able to handle this.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 3 Mar 2009 17:14:18 +0000 (18:14 +0100)]
rt2x00: Export all register stats through debugfs
By exporting the register base, and word size to userspace
through debugfs it will be easier to create scripts which
parse the register information. This makes debugging and
register dumps information easier.
This will break my previous scripts which dumped and parsed
all information, but since this is only for debugging purposes
this change should not be a problem.
Dumpfiles created with the old version can be easily manually
edited to make them compatible with this new approach, which
means there will be no problems comparing dumps from the
different versions either.
Also be more consistent with using tabs to seperate different
fields.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 3 Mar 2009 11:11:53 +0000 (13:11 +0200)]
ath9k: Clean up setkey operations
There is no need to use ath_keyset() wrapper for
ath9k_hw_set_keycache_entry() calls. In addition, improve the comments
describing the key setting operations.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Tue, 3 Mar 2009 09:49:59 +0000 (10:49 +0100)]
ath9k: fix AR_TXCFG_DMASZ_MASK value
The current bitmask is invalid, because the tx dma size is a 3 bit wide
value.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 3 Mar 2009 04:46:59 +0000 (10:16 +0530)]
ath9k: Remove unused variables in struct ath_beacon_config
We don't store the beacon timestamp internally, nor
do we do any TIM handling in ath9k.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 3 Mar 2009 04:46:57 +0000 (10:16 +0530)]
ath9k: Lock config_interface() callback with a mutex
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 3 Mar 2009 04:46:56 +0000 (10:16 +0530)]
ath9k: Handle TSF properly for AP mode
The TSF has to be reset only once, upon bringing
the interface up in AP mode. For any beacon reconfigure calls
after that, resetting the TSF results in incorrect beacon generation.
The only exception is a change in the beacon interval,
which is indicated to the driver by mac80211 through
IEEE80211_CONF_CHANGE_BEACON_INTERVAL, handle this properly.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 3 Mar 2009 04:46:54 +0000 (10:16 +0530)]
ath9k: Split beacon configuration into mode specific routines
This makes the code easier to understand.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 3 Mar 2009 04:46:53 +0000 (10:16 +0530)]
ath9k: Cleanup beacon stuck processing
We never use SC_OP_NO_RESET, it is not configurable at all.
Remove all code that deals with this flag and make beacon
stuck processing simple.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 3 Mar 2009 04:46:51 +0000 (10:16 +0530)]
ath9k: Scrub beacon.c
Remove useless comments, fix indentation.
Also, remove all occurrences of ASSERT(vif) which are not needed.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 3 Mar 2009 04:46:45 +0000 (10:16 +0530)]
ath9k: Use new scan notifiers from mac80211
The only use case for this right now is ANI calibration,
but more might come up in the future.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 3 Mar 2009 04:45:10 +0000 (10:15 +0530)]
mac80211: Update IBSS beacon timestamp properly
In IBSS mode, the beacon timestamp has to be filled with the
BSS's timestamp when joining, and set to zero when creating
a new BSS.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alina Friedrichsen [Mon, 2 Mar 2009 22:29:48 +0000 (23:29 +0100)]
ath5k: Set TSF fix
The old code doesn't work correctly e.g. on newer chipsets like AR5418+AR2122 and AR5416+AR2133.
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alina Friedrichsen [Mon, 2 Mar 2009 22:28:38 +0000 (23:28 +0100)]
ath9k: Set TSF fix
The old code doesn't work correctly e.g. on newer chipsets like AR5418+AR2122 and AR5416+AR2133.
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Buesch [Mon, 2 Mar 2009 22:18:37 +0000 (23:18 +0100)]
b43: Pass more RX flags to mac80211
This changes the RX handler to pass more status flags to mac80211.
It also changes part of the drop policy, if bad frames were requested. (Note that
currently mac80211 will throw a WARN_ON in that case. But nothing bad will happen).
This also removes some obsolete unused timestamping code.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alina Friedrichsen [Mon, 2 Mar 2009 22:13:40 +0000 (23:13 +0100)]
ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
So that a new created IBSS network
doesn't break on the first scan.
It seems to Sujith and me that this
stupid code unnecessary, too.
So remove it...
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Mon, 2 Mar 2009 14:55:14 +0000 (20:25 +0530)]
ath9k: Handle power modes in isr for power save.
Restore network sleep mode in isr if power save is enabled.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Mon, 2 Mar 2009 07:59:45 +0000 (13:29 +0530)]
ath9k: Fill in rate_update mac80211 callback
This callback can be used to handle dynamic 20/40,
and changes in the operating channel's HT parameters.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Mon, 2 Mar 2009 14:50:30 +0000 (20:20 +0530)]
mac80211: Always send a null data frame if TIM bit is set.
If the AP thinks we are in power save state eventhough we are not truly
in that state, it sets the TIM bit and does not send a data frame unless
we send a null data frame to correct the state in the AP.
This might happen if the null data frame for wake up is lost in the air
after we disable power save.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Mon, 2 Mar 2009 16:15:53 +0000 (18:15 +0200)]
ath9k: Remove unused key xoring
This is not used anywhere in ath9k and is just making the code more
confusing.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Mon, 2 Mar 2009 13:06:31 +0000 (15:06 +0200)]
ath9k: Document keycache operations
There are number of small details about the keycache operations that
are very easy to miss (and forget), so better include detailed
comments in ath9k_hw_set_keycache_entry() to avoid having to figure
out this every time when having to touch this area.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Mon, 2 Mar 2009 07:58:31 +0000 (13:28 +0530)]
mac80211: Fix TKIP/WEP HT capability handling
There is no need to parse the AP's HT capabilities if
the STA uses TKIP/WEP cipher. This allows the rate control
module to choose the correct(legacy) rate table.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Frank Seidel [Sun, 1 Mar 2009 19:25:38 +0000 (20:25 +0100)]
iwlwifi: reduce stack size
Reduce stack memory footprint of iwlwifi.
(From >1000 bytes for each *_table_read
on i386 down to 32)
Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Sun, 1 Mar 2009 16:42:00 +0000 (17:42 +0100)]
rt2x00: Fix SW antenna diversity
Software antenna tuning is broken because of an function
ordering problem during rt2x00link_tuner().
rt2x00link_precalculate_signal()
rt2x00leds_led_quality()
rt2x00lib_antenna_diversity()
rt2x00link_precalculate_signal() will reset the quality TX/RX counters,
however rt2x00lib_antenna_diversity() requires the RX counter to
see what RSSI value must be used for a particular antenna.
We can't change the ordering since rt2x00lib_antenna_diversity() might
reset other statistics which are needed by the function called earlier.
Move the reset of the quality TX/RX counters into a seperate function
and move the call to after rt2x00lib_antenna_diversity().
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Sat, 28 Feb 2009 00:21:24 +0000 (16:21 -0800)]
iwl3945 : use iwl_activate_qos
3945 can use iwl_activate_qos instead of iwl3945_activate_qos.
Patch does two things
1) Patch adds iwl_activate_qos in core library.
2) 3945 makes use of iwl_activate_qos.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Sat, 28 Feb 2009 00:21:23 +0000 (16:21 -0800)]
iwl3945: add iwl3945_setup_mac
Patch does following,
1) mac80211's shared data is now initialized in iwl3945_setup_mac.
2) Set the rfkill to right state after initialization
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Sat, 28 Feb 2009 00:21:22 +0000 (16:21 -0800)]
iwlwifi: fix *pci_probe error flow
for iwlagn:
- Have to free eeprom of version check fails - otherwise we end up with
memory leak.
- Include removal of workqueue (created in _setup_deferred_work) in error
handling.
for iwl3945:
- Fix a few places to jump to correct error handling.
- Reorganize error handling to match with code flow.
- Include iwl_free_channel_map as part of error handling.
- Include releasing eeprom as part of error handling.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Sat, 28 Feb 2009 00:21:21 +0000 (16:21 -0800)]
iwl3945: unify set key flow with iwlwifi
unify the set key flow with iwlwifi.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Sat, 28 Feb 2009 00:21:20 +0000 (16:21 -0800)]
iwl3945: synchronize timestamp with uCode
In IBSS, TSF maintains local clock counters at each station. Network
Synchronization follows a completely distributed scheme where beacon frames
are generated. Each station maintain its own TSF timestamp, extracted from
beacon timestamps they recieved. Following patch synchronize this beacon timestamp
with uCode.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>