Alexander Duyck [Fri, 13 Mar 2009 20:41:17 +0000 (20:41 +0000)]
igb: support wol on second port
We need to support wol on the second port for situations such as when the
lan ports are on the motherboard itself.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 13 Mar 2009 20:40:58 +0000 (20:40 +0000)]
igb: resolve warning of unused adapter struct
If DCA is undefined then the adapter struct becomes unnecessary. To
resolve this issue the DCA calls can simply make a call to the adapter
struct through the rx_ring adapter struct member.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 13 Mar 2009 20:40:38 +0000 (20:40 +0000)]
igb: remove netif running call from igb_poll
The netif_running check in igb poll is a hold over from the use of fake
netdevs to use multiple queues with NAPI prior to 2.6.24. It is no longer
necessary to have the call there and it currently can cause errors if
work_done == budget.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Maciej Sosnowski [Fri, 13 Mar 2009 20:40:21 +0000 (20:40 +0000)]
igb: switch to new dca API
With the new DCA API, the driver should use dca3_get_tag() instead of
the obsolete dca_get_tag().
Signed-off-by: Maciej Sosnowski < maciej.sosnowski@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Gabriele Paoloni [Fri, 13 Mar 2009 23:09:12 +0000 (16:09 -0700)]
ppp: ppp_mp_explode() redesign
I found the PPP subsystem to not work properly when connecting channels
with different speeds to the same bundle.
Problem Description:
As the "ppp_mp_explode" function fragments the sk_buff buffer evenly
among the PPP channels that are connected to a certain PPP unit to
make up a bundle, if we are transmitting using an upper layer protocol
that requires an Ack before sending the next packet (like TCP/IP for
example), we will have a bandwidth bottleneck on the slowest channel
of the bundle.
Let's clarify by an example. Let's consider a scenario where we have
two PPP links making up a bundle: a slow link (10KB/sec) and a fast
link (1000KB/sec) working at the best (full bandwidth). On the top we
have a TCP/IP stack sending a 1000 Bytes sk_buff buffer down to the
PPP subsystem. The "ppp_mp_explode" function will divide the buffer in
two fragments of 500B each (we are neglecting all the headers, crc,
flags etc?.). Before the TCP/IP stack sends out the next buffer, it
will have to wait for the ACK response from the remote peer, so it
will have to wait for both fragments to have been sent over the two
PPP links, received by the remote peer and reconstructed. The
resulting behaviour is that, rather than having a bundle working
@1010KB/sec (the sum of the channels bandwidths), we'll have a bundle
working @20KB/sec (the double of the slowest channels bandwidth).
Problem Solution:
The problem has been solved by redesigning the "ppp_mp_explode"
function in such a way to make it split the sk_buff buffer according
to the speeds of the underlying PPP channels (the speeds of the serial
interfaces respectively attached to the PPP channels). Referring to
the above example, the redesigned "ppp_mp_explode" function will now
divide the 1000 Bytes buffer into two fragments whose sizes are set
according to the speeds of the channels where they are going to be
sent on (e.g . 10 Byets on 10KB/sec channel and 990 Bytes on
1000KB/sec channel). The reworked function grants the same
performances of the original one in optimal working conditions (i.e. a
bundle made up of PPP links all working at the same speed), while
greatly improving performances on the bundles made up of channels
working at different speeds.
Signed-off-by: Gabriele Paoloni <gabriele.paoloni@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
ipv4: arp announce, arp_proxy and windows ip conflict verification
Windows (XP at least) hosts on boot, with configured static ip, performing
address conflict detection, which is defined in RFC3927.
Here is quote of important information:
"
An ARP announcement is identical to the ARP Probe described above,
except that now the sender and target IP addresses are both set
to the host's newly selected IPv4 address.
"
But it same time this goes wrong with RFC5227.
"
The 'sender IP address' field MUST be set to all zeroes; this is to avoid
polluting ARP caches in other hosts on the same link in the case
where the address turns out to be already in use by another host.
"
When ARP proxy configured, it must not answer to both cases, because
it is address conflict verification in any case. For Windows it is just
causing to detect false "ip conflict". Already there is code for RFC5227, so
just trivially we just check also if source ip == target ip.
Signed-off-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomasz Lemiech [Fri, 13 Mar 2009 22:43:38 +0000 (15:43 -0700)]
tulip: Fix for MTU problems with 802.1q tagged frames
The original patch was submitted last year but wasn't discussed or applied
because of missing maintainer's CCs. I only fixed some formatting errors,
but as I saw tulip is very badly formatted and needs further work.
Original description:
This patch fixes MTU problem, which occurs when using 802.1q VLANs. We
should allow receiving frames of up to 1518 bytes in length, instead of
1514.
Based on patch written by Ben McKeegan for 2.4.x kernels. It is archived
at http://www.candelatech.com/~greear/vlan/howto.html#tulip
I've adjusted a few things to make it apply on 2.6.x kernels.
Tested on D-Link DFE-570TX quad-fastethernet card.
Signed-off-by: Tomasz Lemiech <szpajder@staszic.waw.pl> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: Ben McKeegan <ben@netservers.co.uk> Acked-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Marcin Slusarz [Fri, 13 Mar 2009 22:41:19 +0000 (15:41 -0700)]
phylib: convert state_queue work to delayed_work
It closes a race in phy_stop_machine when reprogramming of phy_timer
(from phy_state_machine) happens between del_timer_sync and cancel_work_sync.
Without this change it could lead to crash if phy_device would be freed after
phy_stop_machine (timer would fire and schedule freed work).
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Biederman [Fri, 13 Mar 2009 20:16:13 +0000 (13:16 -0700)]
macvlan: Deterministic ingress packet delivery
Changing the mac address when a macvlan device is up will leave the
device on the wrong hash chain making it impossible to receive
packets.
There is no checking of the mac address set on the macvlan. Allowing
a misconfiguration to grab packets from the the underlying device or
another macvlan.
To resolve these problems I update the hash table of macvlans when the
mac address of a macvlan changes, and when updating the hash table
I verify that the new mac address is usable.
The result is well defined and predictable if not perfect handling of
mac vlan mac addresses.
To keep the code clear I have created a set of hash table maintenance
in macvlan so I am not open coding the hash function and the logic
needed to update the hash table all over the place.
Signed-off-by: Eric Biederman <ebiederm@aristanetworks.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Biederman [Fri, 13 Mar 2009 20:15:37 +0000 (13:15 -0700)]
macvlan: Support creating macvlans from macvlans
When running in a network namespace whose only link to
the outside world is a macvlan device, not being
able to create another macvlan is a real pain.
So modify macvlan creation to allow automatically forward
a creation of a macvlan on a macvlan to become a creation
of a macvlan on the underlying network device.
Signed-off-by: Eric Biederman <ebiederm@aristanetworks.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
smsc911x: improve EEPROM loading timeout logic in open
This patch from Juha Leppanen suppresses a false warning if the eeprom
load succeeds on the very last attempt.
Juha> In function smsc911x_open smsc911x_reg_read+udelay can be run 50
Juha> times with timeout reaching -1, and the following if statetement
Juha> does not catch the timeout and no warning is issued. Also if the
Juha> 50th smsc911x_reg_read is GOOD, loop is exited with timeout as 0
Juha> and bogus warning issued. Replace testing order and --timeout
Juha> instead of timeout-- and now max 50 smsc911x_reg_read's are done,
Juha> with max 49 udelays.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
smsc911x: check for FFWD success before checking for timeout
This patch from Juha Leppanen suppresses a false warning if a fast
forward operation succeeds on the very last attempt.
Juha> If smsc911x_reg_read loop is executed 500 times, timeout reaches 0
Juha> and the 500th smsc911x_reg_read result in val is ignored. If
Juha> testing order is changed, then val is checked first. The 500th
Juha> reg_read might be GOOD, why ignore it!
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Fri, 13 Mar 2009 18:48:18 +0000 (11:48 -0700)]
8139too: allow to set mac address on running device
Similar patch as for 8139cp posted yesterday, so the same comment:
So far there was not a chance to set a mac address on running 8139too device.
This is for example needed when you want to use this NIC as a bonding slave in
bonding device in mode balance-alb. This simple patch allows it.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Fri, 13 Mar 2009 18:47:48 +0000 (11:47 -0700)]
8139cp: allow to set mac address on running device
So far there was not a chance to set a mac address on running 8139cp device.
This is for example needed when you want to use this NIC as a bonding slave in
bonding device in mode balance-alb. This simple patch allows it.
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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: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>
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: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: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>
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>
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>
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>
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.
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: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>