]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Staging: rtl8192su: Fix procfs code for interfaces not named wlan0
authorBen Hutchings <ben@decadent.org.uk>
Tue, 25 May 2010 03:25:57 +0000 (04:25 +0100)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:54:44 +0000 (13:54 -0700)
commitf67e667fdbefbfaad3eb37c2d0a8ca9d74b34300
treee7f3264eb1ec02f955d9d7e270c34c2fbac47973
parentfcf7b1d0968525a94e174b8fb50f0f81e130efe1
Staging: rtl8192su: Fix procfs code for interfaces not named wlan0

commit 41a38d9e632f7c9ec5ad8fc627567d97f4302c4a upstream.

The current code creates directories in procfs named after interfaces,
but doesn't handle renaming.  This can result in name collisions and
consequent WARNINGs.  It also means that the interface name cannot
reliably be used to remove the directory - in fact the current code
doesn't even try, and always uses "wlan0"!

Since the name of a proc_dir_entry is embedded in it, use that when
removing it.

Add a netdev notifier to catch interface renaming, and remove and
re-add the directory at this point.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/staging/rtl8192su/r8192U_core.c