rtlwifi: Convert COMP_XX entries into a proper debugging mask
The debugging macros contain a parameter COMP_XX that could be used as a mask; however, the code turns all these various bits on at the same time. This change implements them as a proper mask, and adds module parameters to set the mask at load time. The current name "debug" for the debug level has been changed to "debug_level" to better differentiate it from "debug_mask". The debug routines have also been changed to interrogate the structure that is loaded at entry time. As a result, the structure rtl_debug is no longer needed, and all references to it are deleted. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
@@ -2094,7 +2094,7 @@ static ssize_t rtl_show_debug_level(struct device *d,
|
||||
struct ieee80211_hw *hw = dev_get_drvdata(d);
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
|
||||
return sprintf(buf, "0x%08X\n", rtlpriv->dbg.global_debuglevel);
|
||||
return sprintf(buf, "0x%08X\n", rtlpriv->cfg->mod_params->debug_level);
|
||||
}
|
||||
|
||||
static ssize_t rtl_store_debug_level(struct device *d,
|
||||
@@ -2111,10 +2111,10 @@ static ssize_t rtl_store_debug_level(struct device *d,
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG,
|
||||
"%s is not in hex or decimal form.\n", buf);
|
||||
} else {
|
||||
rtlpriv->dbg.global_debuglevel = val;
|
||||
rtlpriv->cfg->mod_params->debug_level = val;
|
||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG,
|
||||
"debuglevel:%x\n",
|
||||
rtlpriv->dbg.global_debuglevel);
|
||||
rtlpriv->cfg->mod_params->debug_level);
|
||||
}
|
||||
|
||||
return strnlen(buf, count);
|
||||
|
Reference in New Issue
Block a user