Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 583767

Summary: dev_set_name() undefined in net/wireless/cfg80211.ko in some cases
Product: Red Hat Enterprise Linux 5 Reporter: Igor Zhbanov <izh1979>
Component: kernelAssignee: John W. Linville <linville>
Status: CLOSED ERRATA QA Contact: desktop-bugs <desktop-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: cmeadors, izh1979, linville, sgruszka
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 21:28:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
CONFIG_WIRELESS_COMPAT fix.
none
jwltest-wireless_compat-kconfig.patch none

Description Igor Zhbanov 2010-04-19 17:02:08 UTC
Created attachment 407638 [details]
CONFIG_WIRELESS_COMPAT fix.

Description of problem:
Hello!

When you build kernel with CFG80211 and without RFKILL, modpost displays
error that dev_set_name() is undefined in net/wireless/cfg80211.ko.

This is because that dev_set_name() function is defined in net/wireless/compat.c,
which is compiled when CONFIG_WIRELESS_COMPAT is set. This function is used
in net/rfkill/core.c and in net/wireless.core.c

According to net/wireless/Kconfig:

config WIRELESS_COMPAT
        tristate "Wireless kernel compatibility code"
        depends on RFKILL || !RFKILL
        depends on CFG80211 || !CFG80211

So both RFKILL and CFG80211 must be enabled to enable WIRELESS_COMPAT option
selection in menu.

Also dev_set_name() is called unconditionally, whether CONFIG_WIRELESS_COMPAT
is set or not.

So I suggest

1) Change dependency in Kconfig:
config WIRELESS_COMPAT
        tristate "Wireless kernel compatibility code"
        depends on RFKILL || !RFKILL || CFG80211 || !CFG80211

2) surround calls to this function by #ifdef CONFIG_WIRELESS_COMPAT.

Look at attached patch.

Version-Release number of selected component (if applicable):
kernel-2.6.18-194.el5.src.rpm

How reproducible:
Always.

Steps to Reproduce:
Build kernel with CONFIG_CFG80211 and without CONFIG_RFKILL.

Comment 1 Igor Zhbanov 2010-04-19 17:23:12 UTC
The patch responsible for this problem is
linux-2.6-net-wireless-updates-of-mac80211-etc-from-2-6-32.patch.

Comment 2 RHEL Program Management 2010-05-20 12:49:20 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 John W. Linville 2010-06-10 02:32:15 UTC
I'm not entirely sure why this matters (i.e. why you want to do that), especially since we don't support customer-built kernels.  But in any case, I suppose it would be better if the Kconfig bits were correct...

Comment 4 John W. Linville 2010-06-10 02:33:12 UTC
Created attachment 422749 [details]
jwltest-wireless_compat-kconfig.patch

I think this patch is better...

Comment 5 John W. Linville 2010-06-10 02:33:49 UTC
Test kernels w/ above patch are available here:

http://people.redhat.com/linville/kernels/rhel5/

Feel free to give them a spin...

Comment 10 Jarod Wilson 2010-07-19 21:15:00 UTC
in kernel-2.6.18-207.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 12 Cameron Meadors 2010-09-08 19:14:39 UTC
I am just curious what changed that made this bug pop up in the first place? The pedantic QA side of me is skeptical that we don't need to functionally retest the wireless kernel modules just because the kernel builds.

Comment 13 John W. Linville 2010-09-09 15:47:12 UTC
The "bug" reporter is rebuilding his own kernels w/ custom configurations.

Comment 15 errata-xmlrpc 2011-01-13 21:28:33 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0017.html