mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits) net: Allow dependancies of FDDI & Tokenring to be modular. igb: Fix build warning when DCA is disabled. net: Fix warning fallout from recent NAPI interface changes. gro: Fix potential use after free sfc: If AN is enabled, always read speed/duplex from the AN advertising bits sfc: When disabling the NIC, close the device rather than unregistering it sfc: SFT9001: Add cable diagnostics sfc: Add support for multiple PHY self-tests sfc: Merge top-level functions for self-tests sfc: Clean up PHY mode management in loopback self-test sfc: Fix unreliable link detection in some loopback modes sfc: Generate unique names for per-NIC workqueues 802.3ad: use standard ethhdr instead of ad_header 802.3ad: generalize out mac address initializer 802.3ad: initialize ports LACPDU from const initializer 802.3ad: remove typedef around ad_system 802.3ad: turn ports is_individual into a bool 802.3ad: turn ports is_enabled into a bool 802.3ad: make ntt bool ixgbe: Fix set_ringparam in ixgbe to use the same memory pools. ... Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due to the conversion to %pI (in this networking merge) and the addition of doing IPv6 addresses (from the earlier merge of CIFS).
This commit is contained in:
commit
0191b625ca
1395 files changed
+74315
-49080
No files matched your search
@@ -6,7 +6,7 @@
|
||||
# To add a new book the only step required is to add the book to the
|
||||
# list of DOCBOOKS.
|
||||
|
||||
DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml \
|
||||
DOCBOOKS := z8530book.xml mcabook.xml \
|
||||
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
|
||||
procfs-guide.xml writing_usb_driver.xml networking.xml \
|
||||
kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
|
||||
|
||||
@@ -98,9 +98,6 @@
|
||||
X!Enet/core/wireless.c
|
||||
</sect1>
|
||||
-->
|
||||
<sect1><title>Synchronous PPP</title>
|
||||
!Edrivers/net/wan/syncppp.c
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
</book>
|
||||
@@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
|
||||
|
||||
<book id="WANGuide">
|
||||
<bookinfo>
|
||||
<title>Synchronous PPP and Cisco HDLC Programming Guide</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Alan</firstname>
|
||||
<surname>Cox</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>alan@lxorguk.ukuu.org.uk</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<holder>Alan Cox</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
This documentation is free software; you can redistribute
|
||||
it and/or modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This program is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU General Public License for more details.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
MA 02111-1307 USA
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For more details see the file COPYING in the source
|
||||
distribution of Linux.
|
||||
</para>
|
||||
</legalnotice>
|
||||
</bookinfo>
|
||||
|
||||
<toc></toc>
|
||||
|
||||
<chapter id="intro">
|
||||
<title>Introduction</title>
|
||||
<para>
|
||||
The syncppp drivers in Linux provide a fairly complete
|
||||
implementation of Cisco HDLC and a minimal implementation of
|
||||
PPP. The longer term goal is to switch the PPP layer to the
|
||||
generic PPP interface that is new in Linux 2.3.x. The API should
|
||||
remain unchanged when this is done, but support will then be
|
||||
available for IPX, compression and other PPP features
|
||||
</para>
|
||||
</chapter>
|
||||
<chapter id="bugs">
|
||||
<title>Known Bugs And Assumptions</title>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry><term>PPP is minimal</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The current PPP implementation is very basic, although sufficient
|
||||
for most wan usages.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>Cisco HDLC Quirks</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Currently we do not end all packets with the correct Cisco multicast
|
||||
or unicast flags. Nothing appears to mind too much but this should
|
||||
be corrected.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<chapter id="pubfunctions">
|
||||
<title>Public Functions Provided</title>
|
||||
!Edrivers/net/wan/syncppp.c
|
||||
</chapter>
|
||||
|
||||
</book>
|
||||
@@ -0,0 +1,167 @@
|
||||
Using hlist_nulls to protect read-mostly linked lists and
|
||||
objects using SLAB_DESTROY_BY_RCU allocations.
|
||||
|
||||
Please read the basics in Documentation/RCU/listRCU.txt
|
||||
|
||||
Using special makers (called 'nulls') is a convenient way
|
||||
to solve following problem :
|
||||
|
||||
A typical RCU linked list managing objects which are
|
||||
allocated with SLAB_DESTROY_BY_RCU kmem_cache can
|
||||
use following algos :
|
||||
|
||||
1) Lookup algo
|
||||
--------------
|
||||
rcu_read_lock()
|
||||
begin:
|
||||
obj = lockless_lookup(key);
|
||||
if (obj) {
|
||||
if (!try_get_ref(obj)) // might fail for free objects
|
||||
goto begin;
|
||||
/*
|
||||
* Because a writer could delete object, and a writer could
|
||||
* reuse these object before the RCU grace period, we
|
||||
* must check key after geting the reference on object
|
||||
*/
|
||||
if (obj->key != key) { // not the object we expected
|
||||
put_ref(obj);
|
||||
goto begin;
|
||||
}
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
Beware that lockless_lookup(key) cannot use traditional hlist_for_each_entry_rcu()
|
||||
but a version with an additional memory barrier (smp_rmb())
|
||||
|
||||
lockless_lookup(key)
|
||||
{
|
||||
struct hlist_node *node, *next;
|
||||
for (pos = rcu_dereference((head)->first);
|
||||
pos && ({ next = pos->next; smp_rmb(); prefetch(next); 1; }) &&
|
||||
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; });
|
||||
pos = rcu_dereference(next))
|
||||
if (obj->key == key)
|
||||
return obj;
|
||||
return NULL;
|
||||
|
||||
And note the traditional hlist_for_each_entry_rcu() misses this smp_rmb() :
|
||||
|
||||
struct hlist_node *node;
|
||||
for (pos = rcu_dereference((head)->first);
|
||||
pos && ({ prefetch(pos->next); 1; }) &&
|
||||
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; });
|
||||
pos = rcu_dereference(pos->next))
|
||||
if (obj->key == key)
|
||||
return obj;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Quoting Corey Minyard :
|
||||
|
||||
"If the object is moved from one list to another list in-between the
|
||||
time the hash is calculated and the next field is accessed, and the
|
||||
object has moved to the end of a new list, the traversal will not
|
||||
complete properly on the list it should have, since the object will
|
||||
be on the end of the new list and there's not a way to tell it's on a
|
||||
new list and restart the list traversal. I think that this can be
|
||||
solved by pre-fetching the "next" field (with proper barriers) before
|
||||
checking the key."
|
||||
|
||||
2) Insert algo :
|
||||
----------------
|
||||
|
||||
We need to make sure a reader cannot read the new 'obj->obj_next' value
|
||||
and previous value of 'obj->key'. Or else, an item could be deleted
|
||||
from a chain, and inserted into another chain. If new chain was empty
|
||||
before the move, 'next' pointer is NULL, and lockless reader can
|
||||
not detect it missed following items in original chain.
|
||||
|
||||
/*
|
||||
* Please note that new inserts are done at the head of list,
|
||||
* not in the middle or end.
|
||||
*/
|
||||
obj = kmem_cache_alloc(...);
|
||||
lock_chain(); // typically a spin_lock()
|
||||
obj->key = key;
|
||||
atomic_inc(&obj->refcnt);
|
||||
/*
|
||||
* we need to make sure obj->key is updated before obj->next
|
||||
*/
|
||||
smp_wmb();
|
||||
hlist_add_head_rcu(&obj->obj_node, list);
|
||||
unlock_chain(); // typically a spin_unlock()
|
||||
|
||||
|
||||
3) Remove algo
|
||||
--------------
|
||||
Nothing special here, we can use a standard RCU hlist deletion.
|
||||
But thanks to SLAB_DESTROY_BY_RCU, beware a deleted object can be reused
|
||||
very very fast (before the end of RCU grace period)
|
||||
|
||||
if (put_last_reference_on(obj) {
|
||||
lock_chain(); // typically a spin_lock()
|
||||
hlist_del_init_rcu(&obj->obj_node);
|
||||
unlock_chain(); // typically a spin_unlock()
|
||||
kmem_cache_free(cachep, obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
With hlist_nulls we can avoid extra smp_rmb() in lockless_lookup()
|
||||
and extra smp_wmb() in insert function.
|
||||
|
||||
For example, if we choose to store the slot number as the 'nulls'
|
||||
end-of-list marker for each slot of the hash table, we can detect
|
||||
a race (some writer did a delete and/or a move of an object
|
||||
to another chain) checking the final 'nulls' value if
|
||||
the lookup met the end of chain. If final 'nulls' value
|
||||
is not the slot number, then we must restart the lookup at
|
||||
the begining. If the object was moved to same chain,
|
||||
then the reader doesnt care : It might eventually
|
||||
scan the list again without harm.
|
||||
|
||||
|
||||
1) lookup algo
|
||||
|
||||
head = &table[slot];
|
||||
rcu_read_lock();
|
||||
begin:
|
||||
hlist_nulls_for_each_entry_rcu(obj, node, head, member) {
|
||||
if (obj->key == key) {
|
||||
if (!try_get_ref(obj)) // might fail for free objects
|
||||
goto begin;
|
||||
if (obj->key != key) { // not the object we expected
|
||||
put_ref(obj);
|
||||
goto begin;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
/*
|
||||
* if the nulls value we got at the end of this lookup is
|
||||
* not the expected one, we must restart lookup.
|
||||
* We probably met an item that was moved to another chain.
|
||||
*/
|
||||
if (get_nulls_value(node) != slot)
|
||||
goto begin;
|
||||
obj = NULL;
|
||||
|
||||
out:
|
||||
rcu_read_unlock();
|
||||
|
||||
2) Insert function :
|
||||
--------------------
|
||||
|
||||
/*
|
||||
* Please note that new inserts are done at the head of list,
|
||||
* not in the middle or end.
|
||||
*/
|
||||
obj = kmem_cache_alloc(cachep);
|
||||
lock_chain(); // typically a spin_lock()
|
||||
obj->key = key;
|
||||
atomic_set(&obj->refcnt, 1);
|
||||
/*
|
||||
* insert obj in RCU way (readers might be traversing chain)
|
||||
*/
|
||||
hlist_nulls_add_head_rcu(&obj->obj_node, list);
|
||||
unlock_chain(); // typically a spin_unlock()
|
||||
@@ -120,13 +120,6 @@ Who: Christoph Hellwig <hch@lst.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: eepro100 network driver
|
||||
When: January 2007
|
||||
Why: replaced by the e100 driver
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports
|
||||
(temporary transition config option provided until then)
|
||||
The transition config option will also be removed at the same time.
|
||||
|
||||
@@ -147,7 +147,7 @@ Where the supported parameter are:
|
||||
driver. If disabled, the driver will not attempt to scan
|
||||
for and associate to a network until it has been configured with
|
||||
one or more properties for the target network, for example configuring
|
||||
the network SSID. Default is 1 (auto-associate)
|
||||
the network SSID. Default is 0 (do not auto-associate)
|
||||
|
||||
Example: % modprobe ipw2200 associate=0
|
||||
|
||||
|
||||
@@ -194,6 +194,48 @@ or, for backwards compatibility, the option value. E.g.,
|
||||
|
||||
The parameters are as follows:
|
||||
|
||||
ad_select
|
||||
|
||||
Specifies the 802.3ad aggregation selection logic to use. The
|
||||
possible values and their effects are:
|
||||
|
||||
stable or 0
|
||||
|
||||
The active aggregator is chosen by largest aggregate
|
||||
bandwidth.
|
||||
|
||||
Reselection of the active aggregator occurs only when all
|
||||
slaves of the active aggregator are down or the active
|
||||
aggregator has no slaves.
|
||||
|
||||
This is the default value.
|
||||
|
||||
bandwidth or 1
|
||||
|
||||
The active aggregator is chosen by largest aggregate
|
||||
bandwidth. Reselection occurs if:
|
||||
|
||||
- A slave is added to or removed from the bond
|
||||
|
||||
- Any slave's link state changes
|
||||
|
||||
- Any slave's 802.3ad association state changes
|
||||
|
||||
- The bond's adminstrative state changes to up
|
||||
|
||||
count or 2
|
||||
|
||||
The active aggregator is chosen by the largest number of
|
||||
ports (slaves). Reselection occurs as described under the
|
||||
"bandwidth" setting, above.
|
||||
|
||||
The bandwidth and count selection policies permit failover of
|
||||
802.3ad aggregations when partial failure of the active aggregator
|
||||
occurs. This keeps the aggregator with the highest availability
|
||||
(either in bandwidth or in number of ports) active at all times.
|
||||
|
||||
This option was added in bonding version 3.4.0.
|
||||
|
||||
arp_interval
|
||||
|
||||
Specifies the ARP link monitoring frequency in milliseconds.
|
||||
@@ -551,6 +593,16 @@ num_grat_arp
|
||||
affects only the active-backup mode. This option was added for
|
||||
bonding version 3.3.0.
|
||||
|
||||
num_unsol_na
|
||||
|
||||
Specifies the number of unsolicited IPv6 Neighbor Advertisements
|
||||
to be issued after a failover event. One unsolicited NA is issued
|
||||
immediately after the failover.
|
||||
|
||||
The valid range is 0 - 255; the default value is 1. This option
|
||||
affects only the active-backup mode. This option was added for
|
||||
bonding version 3.4.0.
|
||||
|
||||
primary
|
||||
|
||||
A string (eth0, eth2, etc) specifying which slave is the
|
||||
@@ -922,17 +974,19 @@ USERCTL=no
|
||||
NETMASK, NETWORK and BROADCAST) to match your network configuration.
|
||||
|
||||
For later versions of initscripts, such as that found with Fedora
|
||||
7 and Red Hat Enterprise Linux version 5 (or later), it is possible, and,
|
||||
indeed, preferable, to specify the bonding options in the ifcfg-bond0
|
||||
7 (or later) and Red Hat Enterprise Linux version 5 (or later), it is possible,
|
||||
and, indeed, preferable, to specify the bonding options in the ifcfg-bond0
|
||||
file, e.g. a line of the format:
|
||||
|
||||
BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=+192.168.1.254"
|
||||
BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=192.168.1.254"
|
||||
|
||||
will configure the bond with the specified options. The options
|
||||
specified in BONDING_OPTS are identical to the bonding module parameters
|
||||
except for the arp_ip_target field. Each target should be included as a
|
||||
separate option and should be preceded by a '+' to indicate it should be
|
||||
added to the list of queried targets, e.g.,
|
||||
except for the arp_ip_target field when using versions of initscripts older
|
||||
than and 8.57 (Fedora 8) and 8.45.19 (Red Hat Enterprise Linux 5.2). When
|
||||
using older versions each target should be included as a separate option and
|
||||
should be preceded by a '+' to indicate it should be added to the list of
|
||||
queried targets, e.g.,
|
||||
|
||||
arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2
|
||||
|
||||
@@ -940,7 +994,7 @@ added to the list of queried targets, e.g.,
|
||||
options via BONDING_OPTS, it is not necessary to edit /etc/modules.conf or
|
||||
/etc/modprobe.conf.
|
||||
|
||||
For older versions of initscripts that do not support
|
||||
For even older versions of initscripts that do not support
|
||||
BONDING_OPTS, it is necessary to edit /etc/modules.conf (or
|
||||
/etc/modprobe.conf, depending upon your distro) to load the bonding module
|
||||
with your desired options when the bond0 interface is brought up. The
|
||||
|
||||
@@ -57,6 +57,24 @@ can be set before calling bind().
|
||||
DCCP_SOCKOPT_GET_CUR_MPS is read-only and retrieves the current maximum packet
|
||||
size (application payload size) in bytes, see RFC 4340, section 14.
|
||||
|
||||
DCCP_SOCKOPT_AVAILABLE_CCIDS is also read-only and returns the list of CCIDs
|
||||
supported by the endpoint (see include/linux/dccp.h for symbolic constants).
|
||||
The caller needs to provide a sufficiently large (> 2) array of type uint8_t.
|
||||
|
||||
DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same
|
||||
time, combining the operation of the next two socket options. This option is
|
||||
preferrable over the latter two, since often applications will use the same
|
||||
type of CCID for both directions; and mixed use of CCIDs is not currently well
|
||||
understood. This socket option takes as argument at least one uint8_t value, or
|
||||
an array of uint8_t values, which must match available CCIDS (see above). CCIDs
|
||||
must be registered on the socket before calling connect() or listen().
|
||||
|
||||
DCCP_SOCKOPT_TX_CCID is read/write. It returns the current CCID (if set) or sets
|
||||
the preference list for the TX CCID, using the same format as DCCP_SOCKOPT_CCID.
|
||||
Please note that the getsockopt argument type here is `int', not uint8_t.
|
||||
|
||||
DCCP_SOCKOPT_RX_CCID is analogous to DCCP_SOCKOPT_TX_CCID, but for the RX CCID.
|
||||
|
||||
DCCP_SOCKOPT_SERVER_TIMEWAIT enables the server (listening socket) to hold
|
||||
timewait state when closing the connection (RFC 4340, 8.3). The usual case is
|
||||
that the closing server sends a CloseReq, whereupon the client holds timewait
|
||||
@@ -115,20 +133,12 @@ retries2
|
||||
importance for retransmitted acknowledgments and feature negotiation,
|
||||
data packets are never retransmitted. Analogue of tcp_retries2.
|
||||
|
||||
send_ndp = 1
|
||||
Whether or not to send NDP count options (sec. 7.7.2).
|
||||
|
||||
send_ackvec = 1
|
||||
Whether or not to send Ack Vector options (sec. 11.5).
|
||||
|
||||
ack_ratio = 2
|
||||
The default Ack Ratio (sec. 11.3) to use.
|
||||
|
||||
tx_ccid = 2
|
||||
Default CCID for the sender-receiver half-connection.
|
||||
Default CCID for the sender-receiver half-connection. Depending on the
|
||||
choice of CCID, the Send Ack Vector feature is enabled automatically.
|
||||
|
||||
rx_ccid = 2
|
||||
Default CCID for the receiver-sender half-connection.
|
||||
Default CCID for the receiver-sender half-connection; see tx_ccid.
|
||||
|
||||
seq_window = 100
|
||||
The initial sequence window (sec. 7.5.2).
|
||||
|
||||
@@ -13,7 +13,7 @@ Transmit path guidelines:
|
||||
static int drv_hard_start_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev)
|
||||
{
|
||||
struct drv *dp = dev->priv;
|
||||
struct drv *dp = netdev_priv(dev);
|
||||
|
||||
lock_tx(dp);
|
||||
...
|
||||
|
||||
@@ -3,15 +3,15 @@ Krzysztof Halasa <khc@pm.waw.pl>
|
||||
|
||||
|
||||
Generic HDLC layer currently supports:
|
||||
1. Frame Relay (ANSI, CCITT, Cisco and no LMI).
|
||||
1. Frame Relay (ANSI, CCITT, Cisco and no LMI)
|
||||
- Normal (routed) and Ethernet-bridged (Ethernet device emulation)
|
||||
interfaces can share a single PVC.
|
||||
- ARP support (no InARP support in the kernel - there is an
|
||||
experimental InARP user-space daemon available on:
|
||||
http://www.kernel.org/pub/linux/utils/net/hdlc/).
|
||||
2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation.
|
||||
3. Cisco HDLC.
|
||||
4. PPP (uses syncppp.c).
|
||||
2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation
|
||||
3. Cisco HDLC
|
||||
4. PPP
|
||||
5. X.25 (uses X.25 routines).
|
||||
|
||||
Generic HDLC is a protocol driver only - it needs a low-level driver
|
||||
|
||||
@@ -27,6 +27,12 @@ min_adv_mss - INTEGER
|
||||
The advertised MSS depends on the first hop route MTU, but will
|
||||
never be lower than this setting.
|
||||
|
||||
rt_cache_rebuild_count - INTEGER
|
||||
The per net-namespace route cache emergency rebuild threshold.
|
||||
Any net-namespace having its route cache rebuilt due to
|
||||
a hash bucket chain being too long more than this many times
|
||||
will have its route caching disabled
|
||||
|
||||
IP Fragmentation:
|
||||
|
||||
ipfrag_high_thresh - INTEGER
|
||||
|
||||
@@ -50,10 +50,6 @@ associates with the AP. hostapd and wpa_supplicant are used to take
|
||||
care of WPA2-PSK authentication. In addition, hostapd is also
|
||||
processing access point side of association.
|
||||
|
||||
Please note that the current Linux kernel does not enable AP mode, so a
|
||||
simple patch is needed to enable AP mode selection:
|
||||
http://johannes.sipsolutions.net/patches/kernel/all/LATEST/006-allow-ap-vlan-modes.patch
|
||||
|
||||
|
||||
# Build mac80211_hwsim as part of kernel configuration
|
||||
|
||||
@@ -65,3 +61,8 @@ hostapd hostapd.conf
|
||||
|
||||
# Run wpa_supplicant (station) for wlan1
|
||||
wpa_supplicant -Dwext -iwlan1 -c wpa_supplicant.conf
|
||||
|
||||
|
||||
More test cases are available in hostap.git:
|
||||
git://w1.fi/srv/git/hostap.git and mac80211_hwsim/tests subdirectory
|
||||
(http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;f=mac80211_hwsim/tests)
|
||||
@@ -18,7 +18,7 @@ There are routines in net_init.c to handle the common cases of
|
||||
alloc_etherdev, alloc_netdev. These reserve extra space for driver
|
||||
private data which gets freed when the network device is freed. If
|
||||
separately allocated data is attached to the network device
|
||||
(dev->priv) then it is up to the module exit handler to free that.
|
||||
(netdev_priv(dev)) then it is up to the module exit handler to free that.
|
||||
|
||||
MTU
|
||||
===
|
||||
|
||||
@@ -131,11 +131,13 @@ are expected to do this during initialization.
|
||||
|
||||
r = zd_reg2alpha2(mac->regdomain, alpha2);
|
||||
if (!r)
|
||||
regulatory_hint(hw->wiphy, alpha2, NULL);
|
||||
regulatory_hint(hw->wiphy, alpha2);
|
||||
|
||||
Example code - drivers providing a built in regulatory domain:
|
||||
--------------------------------------------------------------
|
||||
|
||||
[NOTE: This API is not currently available, it can be added when required]
|
||||
|
||||
If you have regulatory information you can obtain from your
|
||||
driver and you *need* to use this we let you build a regulatory domain
|
||||
structure and pass it to the wireless core. To do this you should
|
||||
@@ -167,7 +169,6 @@ struct ieee80211_regdomain mydriver_jp_regdom = {
|
||||
|
||||
Then in some part of your code after your wiphy has been registered:
|
||||
|
||||
int r;
|
||||
struct ieee80211_regdomain *rd;
|
||||
int size_of_regd;
|
||||
int num_rules = mydriver_jp_regdom.n_reg_rules;
|
||||
@@ -178,17 +179,12 @@ Then in some part of your code after your wiphy has been registered:
|
||||
|
||||
rd = kzalloc(size_of_regd, GFP_KERNEL);
|
||||
if (!rd)
|
||||
return -ENOMEM;
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy(rd, &mydriver_jp_regdom, sizeof(struct ieee80211_regdomain));
|
||||
|
||||
for (i=0; i < num_rules; i++) {
|
||||
memcpy(&rd->reg_rules[i], &mydriver_jp_regdom.reg_rules[i],
|
||||
sizeof(struct ieee80211_reg_rule));
|
||||
}
|
||||
r = regulatory_hint(hw->wiphy, NULL, rd);
|
||||
if (r) {
|
||||
kfree(rd);
|
||||
return r;
|
||||
}
|
||||
|
||||
for (i=0; i < num_rules; i++)
|
||||
memcpy(&rd->reg_rules[i],
|
||||
&mydriver_jp_regdom.reg_rules[i],
|
||||
sizeof(struct ieee80211_reg_rule));
|
||||
regulatory_struct_hint(rd);
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
The MDIO is a bus to which the PHY devices are connected. For each
|
||||
device that exists on this bus, a child node should be created. See
|
||||
the definition of the PHY node below for an example of how to define
|
||||
a PHY.
|
||||
the definition of the PHY node in booting-without-of.txt for an example
|
||||
of how to define a PHY.
|
||||
|
||||
Required properties:
|
||||
- reg : Offset and length of the register set for the device
|
||||
@@ -21,6 +21,14 @@ Example:
|
||||
};
|
||||
};
|
||||
|
||||
* TBI Internal MDIO bus
|
||||
|
||||
As of this writing, every tsec is associated with an internal TBI PHY.
|
||||
This PHY is accessed through the local MDIO bus. These buses are defined
|
||||
similarly to the mdio buses, except they are compatible with "fsl,gianfar-tbi".
|
||||
The TBI PHYs underneath them are similar to normal PHYs, but the reg property
|
||||
is considered instructive, rather than descriptive. The reg property should
|
||||
be chosen so it doesn't interfere with other PHYs on the bus.
|
||||
|
||||
* Gianfar-compatible ethernet nodes
|
||||
|
||||
|
||||
@@ -191,12 +191,20 @@ Userspace input handlers (uevents) or kernel input handlers (rfkill-input):
|
||||
to tell the devices registered with the rfkill class to change
|
||||
their state (i.e. translates the input layer event into real
|
||||
action).
|
||||
|
||||
* rfkill-input implements EPO by handling EV_SW SW_RFKILL_ALL 0
|
||||
(power off all transmitters) in a special way: it ignores any
|
||||
overrides and local state cache and forces all transmitters to the
|
||||
RFKILL_STATE_SOFT_BLOCKED state (including those which are already
|
||||
supposed to be BLOCKED). Note that the opposite event (power on all
|
||||
transmitters) is handled normally.
|
||||
supposed to be BLOCKED).
|
||||
* rfkill EPO will remain active until rfkill-input receives an
|
||||
EV_SW SW_RFKILL_ALL 1 event. While the EPO is active, transmitters
|
||||
are locked in the blocked state (rfkill will refuse to unblock them).
|
||||
* rfkill-input implements different policies that the user can
|
||||
select for handling EV_SW SW_RFKILL_ALL 1. It will unlock rfkill,
|
||||
and either do nothing (leave transmitters blocked, but now unlocked),
|
||||
restore the transmitters to their state before the EPO, or unblock
|
||||
them all.
|
||||
|
||||
Userspace uevent handler or kernel platform-specific drivers hooked to the
|
||||
rfkill notifier chain:
|
||||
@@ -331,11 +339,9 @@ class to get a sysfs interface :-)
|
||||
correct event for your switch/button. These events are emergency power-off
|
||||
events when they are trying to turn the transmitters off. An example of an
|
||||
input device which SHOULD generate *_RFKILL_ALL events is the wireless-kill
|
||||
switch in a laptop which is NOT a hotkey, but a real switch that kills radios
|
||||
in hardware, even if the O.S. has gone to lunch. An example of an input device
|
||||
which SHOULD NOT generate *_RFKILL_ALL events by default, is any sort of hot
|
||||
key that does nothing by itself, as well as any hot key that is type-specific
|
||||
(e.g. the one for WLAN).
|
||||
switch in a laptop which is NOT a hotkey, but a real sliding/rocker switch.
|
||||
An example of an input device which SHOULD NOT generate *_RFKILL_ALL events by
|
||||
default, is any sort of hot key that is type-specific (e.g. the one for WLAN).
|
||||
|
||||
|
||||
3.1 Guidelines for wireless device drivers
|
||||
|
||||
+35
-13
@@ -742,7 +742,7 @@ M: jirislaby@gmail.com
|
||||
P: Nick Kossifidis
|
||||
M: mickflemm@gmail.com
|
||||
P: Luis R. Rodriguez
|
||||
M: mcgrof@gmail.com
|
||||
M: lrodriguez@atheros.com
|
||||
P: Bob Copeland
|
||||
M: me@bobcopeland.com
|
||||
L: linux-wireless@vger.kernel.org
|
||||
@@ -1607,11 +1607,6 @@ L: acpi4asus-user@lists.sourceforge.net
|
||||
W: http://sourceforge.net/projects/acpi4asus
|
||||
S: Maintained
|
||||
|
||||
EEPRO100 NETWORK DRIVER
|
||||
P: Andrey V. Savochkin
|
||||
M: saw@saw.sw.com.sg
|
||||
S: Maintained
|
||||
|
||||
EFS FILESYSTEM
|
||||
W: http://aeschi.ch.eu.org/efs/
|
||||
S: Orphan
|
||||
@@ -1849,7 +1844,7 @@ P: Haavard Skinnemoen
|
||||
M: hskinnemoen@atmel.com
|
||||
S: Supported
|
||||
|
||||
GENERIC HDLC DRIVER, N2, C101, PCI200SYN and WANXL DRIVERS
|
||||
GENERIC HDLC (WAN) DRIVERS
|
||||
P: Krzysztof Halasa
|
||||
M: khc@pm.waw.pl
|
||||
W: http://www.kernel.org/pub/linux/utils/net/hdlc/
|
||||
@@ -2248,6 +2243,11 @@ M: dan.j.williams@intel.com
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT
|
||||
P: Krzysztof Halasa
|
||||
M: khc@pm.waw.pl
|
||||
S: Maintained
|
||||
|
||||
INTEL IXP4XX RANDOM NUMBER GENERATOR SUPPORT
|
||||
P: Deepak Saxena
|
||||
M: dsaxena@plexity.net
|
||||
@@ -3614,16 +3614,26 @@ L: linux-hams@vger.kernel.org
|
||||
W: http://www.linux-ax25.org/
|
||||
S: Maintained
|
||||
|
||||
RTL818X WIRELESS DRIVER
|
||||
P: Michael Wu
|
||||
M: flamingice@sourmilk.net
|
||||
P: Andrea Merello
|
||||
M: andreamrl@tiscali.it
|
||||
RTL8180 WIRELESS DRIVER
|
||||
P: John W. Linville
|
||||
M: linville@tuxdriver.com
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://linuxwireless.org/
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-testing.git
|
||||
S: Maintained
|
||||
|
||||
RTL8187 WIRELESS DRIVER
|
||||
P: Herton Ronaldo Krzesinski
|
||||
M: herton@mandriva.com.br
|
||||
P: Hin-Tak Leung
|
||||
M htl10@users.sourceforge.net
|
||||
P: Larry Finger
|
||||
M: Larry.Finger@lwfinger.net
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://linuxwireless.org/
|
||||
T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-testing.git
|
||||
S: Maintained
|
||||
|
||||
S3 SAVAGE FRAMEBUFFER DRIVER
|
||||
P: Antonino Daplas
|
||||
M: adaplas@gmail.com
|
||||
@@ -3913,6 +3923,18 @@ M: mhoffman@lightlink.com
|
||||
L: lm-sensors@lm-sensors.org
|
||||
S: Maintained
|
||||
|
||||
SMSC911x ETHERNET DRIVER
|
||||
P: Steve Glendinning
|
||||
M: steve.glendinning@smsc.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
SMSC9420 PCI ETHERNET DRIVER
|
||||
P: Steve Glendinning
|
||||
M: steve.glendinning@smsc.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
|
||||
SMX UIO Interface
|
||||
P: Ben Nizette
|
||||
M: bn@niasdigital.com
|
||||
|
||||
@@ -177,7 +177,6 @@ static irqreturn_t fsg_reset_handler(int irq, void *dev_id)
|
||||
|
||||
static void __init fsg_init(void)
|
||||
{
|
||||
DECLARE_MAC_BUF(mac_buf);
|
||||
uint8_t __iomem *f;
|
||||
|
||||
ixp4xx_sys_init();
|
||||
@@ -256,10 +255,10 @@ static void __init fsg_init(void)
|
||||
#endif
|
||||
iounmap(f);
|
||||
}
|
||||
printk(KERN_INFO "FSG: Using MAC address %s for port 0\n",
|
||||
print_mac(mac_buf, fsg_plat_eth[0].hwaddr));
|
||||
printk(KERN_INFO "FSG: Using MAC address %s for port 1\n",
|
||||
print_mac(mac_buf, fsg_plat_eth[1].hwaddr));
|
||||
printk(KERN_INFO "FSG: Using MAC address %pM for port 0\n",
|
||||
fsg_plat_eth[0].hwaddr);
|
||||
printk(KERN_INFO "FSG: Using MAC address %pM for port 1\n",
|
||||
fsg_plat_eth[1].hwaddr);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#define DEBUG_QMGR 0
|
||||
|
||||
#define HALF_QUEUES 32
|
||||
#define QUEUES 64 /* only 32 lower queues currently supported */
|
||||
#define MAX_QUEUE_LENGTH 4 /* in dwords */
|
||||
@@ -61,22 +63,51 @@ void qmgr_enable_irq(unsigned int queue);
|
||||
void qmgr_disable_irq(unsigned int queue);
|
||||
|
||||
/* request_ and release_queue() must be called from non-IRQ context */
|
||||
|
||||
#if DEBUG_QMGR
|
||||
extern char qmgr_queue_descs[QUEUES][32];
|
||||
|
||||
int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
||||
unsigned int nearly_empty_watermark,
|
||||
unsigned int nearly_full_watermark);
|
||||
unsigned int nearly_full_watermark,
|
||||
const char *desc_format, const char* name);
|
||||
#else
|
||||
int __qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
||||
unsigned int nearly_empty_watermark,
|
||||
unsigned int nearly_full_watermark);
|
||||
#define qmgr_request_queue(queue, len, nearly_empty_watermark, \
|
||||
nearly_full_watermark, desc_format, name) \
|
||||
__qmgr_request_queue(queue, len, nearly_empty_watermark, \
|
||||
nearly_full_watermark)
|
||||
#endif
|
||||
|
||||
void qmgr_release_queue(unsigned int queue);
|
||||
|
||||
|
||||
static inline void qmgr_put_entry(unsigned int queue, u32 val)
|
||||
{
|
||||
extern struct qmgr_regs __iomem *qmgr_regs;
|
||||
#if DEBUG_QMGR
|
||||
BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */
|
||||
|
||||
printk(KERN_DEBUG "Queue %s(%i) put %X\n",
|
||||
qmgr_queue_descs[queue], queue, val);
|
||||
#endif
|
||||
__raw_writel(val, &qmgr_regs->acc[queue][0]);
|
||||
}
|
||||
|
||||
static inline u32 qmgr_get_entry(unsigned int queue)
|
||||
{
|
||||
u32 val;
|
||||
extern struct qmgr_regs __iomem *qmgr_regs;
|
||||
return __raw_readl(&qmgr_regs->acc[queue][0]);
|
||||
val = __raw_readl(&qmgr_regs->acc[queue][0]);
|
||||
#if DEBUG_QMGR
|
||||
BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */
|
||||
|
||||
printk(KERN_DEBUG "Queue %s(%i) get %X\n",
|
||||
qmgr_queue_descs[queue], queue, val);
|
||||
#endif
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline int qmgr_get_stat1(unsigned int queue)
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <linux/module.h>
|
||||
#include <mach/qmgr.h>
|
||||
|
||||
#define DEBUG 0
|
||||
|
||||
struct qmgr_regs __iomem *qmgr_regs;
|
||||
static struct resource *mem_res;
|
||||
static spinlock_t qmgr_lock;
|
||||
@@ -23,6 +21,10 @@ static u32 used_sram_bitmap[4]; /* 128 16-dword pages */
|
||||
static void (*irq_handlers[HALF_QUEUES])(void *pdev);
|
||||
static void *irq_pdevs[HALF_QUEUES];
|
||||
|
||||
#if DEBUG_QMGR
|
||||
char qmgr_queue_descs[QUEUES][32];
|
||||
#endif
|
||||
|
||||
void qmgr_set_irq(unsigned int queue, int src,
|
||||
void (*handler)(void *pdev), void *pdev)
|
||||
{
|
||||
@@ -70,6 +72,7 @@ void qmgr_disable_irq(unsigned int queue)
|
||||
spin_lock_irqsave(&qmgr_lock, flags);
|
||||
__raw_writel(__raw_readl(&qmgr_regs->irqen[0]) & ~(1 << queue),
|
||||
&qmgr_regs->irqen[0]);
|
||||
__raw_writel(1 << queue, &qmgr_regs->irqstat[0]); /* clear */
|
||||
spin_unlock_irqrestore(&qmgr_lock, flags);
|
||||
}
|
||||
|
||||
@@ -81,9 +84,16 @@ static inline void shift_mask(u32 *mask)
|
||||
mask[0] <<= 1;
|
||||
}
|
||||
|
||||
#if DEBUG_QMGR
|
||||
int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
||||
unsigned int nearly_empty_watermark,
|
||||
unsigned int nearly_full_watermark)
|
||||
unsigned int nearly_full_watermark,
|
||||
const char *desc_format, const char* name)
|
||||
#else
|
||||
int __qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
||||
unsigned int nearly_empty_watermark,
|
||||
unsigned int nearly_full_watermark)
|
||||
#endif
|
||||
{
|
||||
u32 cfg, addr = 0, mask[4]; /* in 16-dwords */
|
||||
int err;
|
||||
@@ -151,12 +161,13 @@ int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */,
|
||||
used_sram_bitmap[2] |= mask[2];
|
||||
used_sram_bitmap[3] |= mask[3];
|
||||
__raw_writel(cfg | (addr << 14), &qmgr_regs->sram[queue]);
|
||||
spin_unlock_irq(&qmgr_lock);
|
||||
|
||||
#if DEBUG
|
||||
printk(KERN_DEBUG "qmgr: requested queue %i, addr = 0x%02X\n",
|
||||
queue, addr);
|
||||
#if DEBUG_QMGR
|
||||
snprintf(qmgr_queue_descs[queue], sizeof(qmgr_queue_descs[0]),
|
||||
desc_format, name);
|
||||
printk(KERN_DEBUG "qmgr: requested queue %s(%i) addr = 0x%02X\n",
|
||||
qmgr_queue_descs[queue], queue, addr);
|
||||
#endif
|
||||
spin_unlock_irq(&qmgr_lock);
|
||||
return 0;
|
||||
|
||||
err:
|
||||
@@ -189,6 +200,11 @@ void qmgr_release_queue(unsigned int queue)
|
||||
while (addr--)
|
||||
shift_mask(mask);
|
||||
|
||||
#if DEBUG_QMGR
|
||||
printk(KERN_DEBUG "qmgr: releasing queue %s(%i)\n",
|
||||
qmgr_queue_descs[queue], queue);
|
||||
qmgr_queue_descs[queue][0] = '\x0';
|
||||
#endif
|
||||
__raw_writel(0, &qmgr_regs->sram[queue]);
|
||||
|
||||
used_sram_bitmap[0] &= ~mask[0];
|
||||
@@ -199,9 +215,10 @@ void qmgr_release_queue(unsigned int queue)
|
||||
spin_unlock_irq(&qmgr_lock);
|
||||
|
||||
module_put(THIS_MODULE);
|
||||
#if DEBUG
|
||||
printk(KERN_DEBUG "qmgr: released queue %i\n", queue);
|
||||
#endif
|
||||
|
||||
while ((addr = qmgr_get_entry(queue)))
|
||||
printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n",
|
||||
queue, addr);
|
||||
}
|
||||
|
||||
static int qmgr_init(void)
|
||||
@@ -272,5 +289,10 @@ EXPORT_SYMBOL(qmgr_regs);
|
||||
EXPORT_SYMBOL(qmgr_set_irq);
|
||||
EXPORT_SYMBOL(qmgr_enable_irq);
|
||||
EXPORT_SYMBOL(qmgr_disable_irq);
|
||||
#if DEBUG_QMGR
|
||||
EXPORT_SYMBOL(qmgr_queue_descs);
|
||||
EXPORT_SYMBOL(qmgr_request_queue);
|
||||
#else
|
||||
EXPORT_SYMBOL(__qmgr_request_queue);
|
||||
#endif
|
||||
EXPORT_SYMBOL(qmgr_release_queue);
|
||||
Loaded 20 of 1395 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user