<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/core/net-sysfs.c, branch linux-2.6.33.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-02-19T23:40:51Z</updated>
<entry>
<title>net-sysfs: Use rtnl_trylock in wireless sysfs methods.</title>
<updated>2010-02-19T23:40:51Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2010-02-19T13:23:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8afe6416101549e877f8470f2a160df69676166'/>
<id>urn:sha1:b8afe6416101549e877f8470f2a160df69676166</id>
<content type='text'>
The wireless sysfs methods like the rest of the networking sysfs
methods are removed with the rtnl_lock held and block until
the existing methods stop executing.  So use rtnl_trylock
and restart_syscall so that the code continues to work.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: use net_eq to compare nets</title>
<updated>2009-11-25T23:14:13Z</updated>
<author>
<name>Octavian Purdila</name>
</author>
<published>2009-11-25T23:14:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09ad9bc752519cc167d0a573e1acf69b5c707c67'/>
<id>urn:sha1:09ad9bc752519cc167d0a573e1acf69b5c707c67</id>
<content type='text'>
Generated with the following semantic patch

@@
struct net *n1;
struct net *n2;
@@
- n1 == n2
+ net_eq(n1, n2)

@@
struct net *n1;
struct net *n2;
@@
- n1 != n2
+ !net_eq(n1, n2)

applied over {include,net,drivers/net}.

Signed-off-by: Octavian Purdila &lt;opurdila@ixiacom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Allow devices to specify a device specific sysfs group.</title>
<updated>2009-10-30T19:41:18Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2009-10-29T14:18:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c509a6c9393b27a8c5a01acd4a72616206cfc24'/>
<id>urn:sha1:0c509a6c9393b27a8c5a01acd4a72616206cfc24</id>
<content type='text'>
This isn't beautifully abstracted, but it is simple,
simplifies uses and so far is only needed for the bonding driver.

Signed-off-by: Eric W. Biederman &lt;ebiederm@aristanetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sysfs: ethtool_ops can be NULL</title>
<updated>2009-10-28T10:59:46Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2009-10-26T01:23:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac5e3af9996fb911d4fdff910a8ac3cb7fc63a94'/>
<id>urn:sha1:ac5e3af9996fb911d4fdff910a8ac3cb7fc63a94</id>
<content type='text'>
commit d519e17e2d01a0ee9abe083019532061b4438065
(net: export device speed and duplex via sysfs)
made the wrong assumption that netdev-&gt;ethtool_ops was always set.

This makes possible to crash kernel and let rtnl in locked state.

modprobe dummy
ip link set dummy0 up
(udev runs and crash)

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6</title>
<updated>2009-10-09T21:40:09Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2009-10-09T21:40:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8aa0f64ac3835a6daf84d0b0e07c4c01d7d8eddc'/>
<id>urn:sha1:8aa0f64ac3835a6daf84d0b0e07c4c01d7d8eddc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wext: refactor</title>
<updated>2009-10-07T20:39:43Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2009-09-29T21:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d23e349d807177eaf519d444677cee86b1a04cf'/>
<id>urn:sha1:3d23e349d807177eaf519d444677cee86b1a04cf</id>
<content type='text'>
Refactor wext to
 * split out iwpriv handling
 * split out iwspy handling
 * split out procfs support
 * allow cfg80211 to have wireless extensions compat code
   w/o CONFIG_WIRELESS_EXT

After this, drivers need to
 - select WIRELESS_EXT	- for wext support
 - select WEXT_PRIV	- for iwpriv support
 - select WEXT_SPY	- for iwspy support

except cfg80211 -- which gets new hooks in wext-core.c
and can then get wext handlers without CONFIG_WIRELESS_EXT.

Wireless extensions procfs support is auto-selected
based on PROC_FS and anything that requires the wext core
(i.e. WIRELESS_EXT or CFG80211_WEXT).

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2009-10-07T05:43:16Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2009-10-07T05:43:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ecc59c1b7fd5749667fc31f8683099cbef38977'/>
<id>urn:sha1:7ecc59c1b7fd5749667fc31f8683099cbef38977</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wext: let get_wireless_stats() sleep</title>
<updated>2009-10-05T09:22:23Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2009-10-05T09:22:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a160ee69c6a4622ed30c377a978554015e9931cb'/>
<id>urn:sha1:a160ee69c6a4622ed30c377a978554015e9931cb</id>
<content type='text'>
A number of drivers (recently including cfg80211-based ones)
assume that all wireless handlers, including statistics, can
sleep and they often also implicitly assume that the rtnl is
held around their invocation. This is almost always true now
except when reading from sysfs:

  BUG: sleeping function called from invalid context at kernel/mutex.c:280
  in_atomic(): 1, irqs_disabled(): 0, pid: 10450, name: head
  2 locks held by head/10450:
   #0:  (&amp;buffer-&gt;mutex){+.+.+.}, at: [&lt;c10ceb99&gt;] sysfs_read_file+0x24/0xf4
   #1:  (dev_base_lock){++.?..}, at: [&lt;c12844ee&gt;] wireless_show+0x1a/0x4c
  Pid: 10450, comm: head Not tainted 2.6.32-rc3 #1
  Call Trace:
   [&lt;c102301c&gt;] __might_sleep+0xf0/0xf7
   [&lt;c1324355&gt;] mutex_lock_nested+0x1a/0x33
   [&lt;f8cea53b&gt;] wdev_lock+0xd/0xf [cfg80211]
   [&lt;f8cea58f&gt;] cfg80211_wireless_stats+0x45/0x12d [cfg80211]
   [&lt;c13118d6&gt;] get_wireless_stats+0x16/0x1c
   [&lt;c12844fe&gt;] wireless_show+0x2a/0x4c

Fix this by using the rtnl instead of dev_base_lock.

Reported-by: Miles Lane &lt;miles.lane@gmail.com&gt;
Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: export device speed and duplex via sysfs</title>
<updated>2009-10-05T07:43:35Z</updated>
<author>
<name>Andy Gospodarek</name>
</author>
<published>2009-10-02T09:26:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d519e17e2d01a0ee9abe083019532061b4438065'/>
<id>urn:sha1:d519e17e2d01a0ee9abe083019532061b4438065</id>
<content type='text'>
This patch exports the link-speed (in Mbps) and duplex of an interface
via sysfs.  This eliminates the need to use ethtool just to check the
link-speed.  Not requiring 'ethtool' and not relying on the SIOCETHTOOL
ioctl should be helpful in an embedded environment where space is at a
premium as well.

NOTE: This patch also intentionally allows non-root users to check the link
speed and duplex -- something not possible with ethtool.

Here's some sample output:

# cat /sys/class/net/eth0/speed
100
# cat /sys/class/net/eth0/duplex
half
# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  Not reported
        Advertised auto-negotiation: No
        Speed: 100Mb/s
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: off
        Supports Wake-on: g
        Wake-on: g
        Current message level: 0x000000ff (255)
        Link detected: yes

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>wext: add back wireless/ dir in sysfs for cfg80211 interfaces</title>
<updated>2009-09-28T20:55:07Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2009-09-28T13:26:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f1546cadf7ac5e9a40d54089a1c7302264ec49b'/>
<id>urn:sha1:8f1546cadf7ac5e9a40d54089a1c7302264ec49b</id>
<content type='text'>
The move away from having drivers assign wireless handlers,
in favour of making cfg80211 assign them, broke the sysfs
registration (the wireless/ dir went missing) because the
handlers are now assigned only after registration, which is
too late.

Fix this by special-casing cfg80211-based devices, all
of which are required to have an ieee80211_ptr, in the
sysfs code, and also using get_wireless_stats() to have
the same values reported as in procfs.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Reported-by: Hugh Dickins &lt;hugh.dickins@tiscali.co.uk&gt;
Tested-by: Hugh Dickins &lt;hugh.dickins@tiscali.co.uk&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
</feed>
