New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 834365 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

enum type mixup in drivers/net/wireless/iwl7000/iwlwifi/mvm/mac80211.c

Project Member Reported by groeck@chromium.org, Apr 18 2018

Issue description

ree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4 
head:   31f669feb4ff313e4b2bc507edaf1cb53381191c 
commit: e24a6f471fbd9c720356db12b6c4a4015d8c35de [2/7] CHROMIUM: iwl7000: Tweak backport headers for 4.4 support 
reproduce: 
        # apt-get install sparse 
        git checkout e24a6f471fbd9c720356db12b6c4a4015d8c35de 
        make ARCH=x86_64 allmodconfig 
        make C=1 CF=-D__CHECK_ENDIAN__ 


sparse warnings: (new ones prefixed by >>) 

   include/linux/compiler.h:231:9: sparse: call with no type! 
   include/linux/mm.h:1642:47: sparse: unknown expression (14 0) 
   include/linux/mm.h:1643:16: sparse: call with no type! 
   drivers/net/wireless/iwl7000/iwlwifi/mvm/mac80211.c:2914:73: sparse: mixing different enum types 
   drivers/net/wireless/iwl7000/iwlwifi/mvm/mac80211.c:2914:73:     int enum ieee80211_band  versus 
   drivers/net/wireless/iwl7000/iwlwifi/mvm/mac80211.c:2914:73:     int enum nl80211_band 
   drivers/net/wireless/iwl7000/iwlwifi/mvm/mac80211.c:2931:73: sparse: mixing different enum types 
   drivers/net/wireless/iwl7000/iwlwifi/mvm/mac80211.c:2931:73:     int enum ieee80211_band  versus 
   drivers/net/wireless/iwl7000/iwlwifi/mvm/mac80211.c:2931:73:     int enum nl80211_band 

 

Comment 1 by kirtia@google.com, Apr 18 2018

Cc: -kirtia@chromium.org

Comment 2 by groeck@chromium.org, Apr 18 2018

Cc: kirtika@chromium.org
Cc: luciano....@intel.com
We are missing upstream commit  57fbcce37be7 ("cfg80211: remove enum ieee80211_band") - it is too intrusive to backport. 
Looking into whether iwl7000 has always used nl80211_band, or they just forgot to clean it up after reverting their own cfg80211. 

I am confused about why this is a new regression - if I go back to R65 (where Intel's cfg80211 doesn't exist), I see the same mismatch. 
struct ieee80211_channel in include/net/cfg80211.h is using enum ieee80211_band band and iwl7000 already has:
void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
			  enum nl80211_band band, bool init)

Comment 5 by groeck@chromium.org, Apr 18 2018

It doesn't have to be a new regression. It may be a new version of sparse, or the check on the file may have been triggered by the Core35 update.
AFAICS the defines are the same. If this is too complex to fix in our code, and it has been addressed upstream, feel free to close as WontFix.

Sign in to add a comment