WTF: patch "[PATCH] rtlwifi: Fix regression caused by commit d86e64768859" was seriously submitted to be applied to the 4.8-stable tree?
Subsystems (2)
[email protected]
maintainerThe patch below was submitted to be applied to the 4.8-stable tree.
I fail to see how this patch meets the stable kernel rules as found at Documentation/stable_kernel_rules.txt.
I could be totally wrong, and if so, please respond to <[email protected]> and let me know why this patch should be applied. Otherwise, it is now dropped from my patch queues, never to be seen again.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
cf4747d7535a936105f0abe8d8109d3fe339162bMon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Wed, 12 Oct 2016 13:54:04 -0500
Subject: [PATCH] rtlwifi: Fix regression caused by commit d86e64768859
In commit d86e64768859 ("rtlwifi: rtl818x: constify local structures"), the configuration struct for most of the drivers was changed to be constant. The problem is that five of the modified drivers need to be able to update the firmware name based on the exact model of the card. As the file names were stored in one of the members of that struct, these drivers would fail with a kernel BUG splat when they tried to update the firmware name.
Rather than reverting the previous commit, I used a suggestion by Johannes Berg and made the firmware file name pointers be local to the routines that update the software variables.
The configuration struct of rtl8192cu, which was not touched in the previous patch, is now constantfied.
drivers/net/wireless/realtek/rtlwifi/core.c +1 -1
@@ -111,7 +111,7 @@ static void rtl_fw_do_work(const struct firmware *firmware, void *context,if (!err) goto found_alt; } -pr_err ("Firmware %s not available\n" , rtlpriv->cfg->fw_name); +pr_err ("Selected firmware is not available\n" ); rtlpriv->max_fw_size =0 ;return ; }
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c +4 -4
@@ -86,6 +86,7 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));u8 tid; +char *fw_name;rtl8188ee_bt_reg_init (hw); rtlpriv->dm.dm_initialgain_enable =1 ;
@@ -169,10 +170,10 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw)return 1 ; } - rtlpriv->cfg->fw_name ="rtlwifi/rtl8188efw.bin" ; + fw_name ="rtlwifi/rtl8188efw.bin" ; rtlpriv->max_fw_size =0x8000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {
@@ -284,7 +285,6 @@ static const struct rtl_hal_cfg rtl88ee_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl88e_pci", - .fw_name = "rtlwifi/rtl8188efw.bin", .ops = &rtl8188ee_hal_ops, .mod_params = &rtl88ee_mod_params,
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c +5 -8
@@ -96,6 +96,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw)); +char *fw_name ="rtlwifi/rtl8192cfwU.bin" ;rtl8192ce_bt_reg_init (hw);
@@ -167,15 +168,12 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) }/* request fw */ -if (IS_VENDOR_UMC_A_CUT (rtlhal->version) && - !IS_92C_SERIAL (rtlhal->version)) - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cfwU.bin" ; -else if (IS_81XXC_VENDOR_UMC_B_CUT (rtlhal->version)) - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cfwU_B.bin" ; +if (IS_81XXC_VENDOR_UMC_B_CUT (rtlhal->version)) + fw_name ="rtlwifi/rtl8192cfwU_B.bin" ; rtlpriv->max_fw_size =0x4000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {
@@ -262,7 +260,6 @@ static const struct rtl_hal_cfg rtl92ce_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl92c_pci", - .fw_name = "rtlwifi/rtl8192cfw.bin", .ops = &rtl8192ce_hal_ops, .mod_params = &rtl92ce_mod_params,
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c +6 -6
@@ -59,6 +59,7 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) {struct rtl_priv *rtlpriv =rtl_priv (hw);int err; +char *fw_name; rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ;
@@ -77,18 +78,18 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) }if (IS_VENDOR_UMC_A_CUT (rtlpriv->rtlhal.version) && !IS_92C_SERIAL (rtlpriv->rtlhal.version)) { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cufw_A.bin" ; + fw_name ="rtlwifi/rtl8192cufw_A.bin" ; }else if (IS_81XXC_VENDOR_UMC_B_CUT (rtlpriv->rtlhal.version)) { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cufw_B.bin" ; + fw_name ="rtlwifi/rtl8192cufw_B.bin" ; }else { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cufw_TMSC.bin" ; + fw_name ="rtlwifi/rtl8192cufw_TMSC.bin" ; }/* provide name of alternative file */ rtlpriv->cfg->alt_fw_name ="rtlwifi/rtl8192cufw.bin" ; -pr_info ("Loading firmware %s\n" , rtlpriv->cfg->fw_name); +pr_info ("Loading firmware %s\n" , fw_name); rtlpriv->max_fw_size =0x4000 ; err =request_firmware_nowait (THIS_MODULE ,1 , - rtlpriv->cfg->fw_name, rtlpriv->io.dev, + fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);return err; }
@@ -187,7 +188,6 @@ static struct rtl_hal_usbint_cfg rtl92cu_interface_cfg = {static struct rtl_hal_cfg rtl92cu_hal_cfg = { .name ="rtl92c_usb" , - .fw_name ="rtlwifi/rtl8192cufw.bin" , .ops = &rtl8192cu_hal_ops, .mod_params = &rtl92cu_mod_params, .usb_interface_cfg = &rtl92cu_interface_cfg,
drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c +3 -3
@@ -92,6 +92,7 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw)u8 tid;struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw)); +char *fw_name ="rtlwifi/rtl8192defw.bin" ; rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ;
@@ -181,10 +182,10 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw) rtlpriv->max_fw_size =0x8000 ;pr_info ("Driver for Realtek RTL8192DE WLAN interface\n" ); -pr_info ("Loading firmware file %s\n" , rtlpriv->cfg->fw_name); +pr_info ("Loading firmware file %s\n" , fw_name);/* request fw */ - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {
@@ -266,7 +267,6 @@ static const struct rtl_hal_cfg rtl92de_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl8192de", - .fw_name = "rtlwifi/rtl8192defw.bin", .ops = &rtl8192de_hal_ops, .mod_params = &rtl92de_mod_params,
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c +4 -4
@@ -91,6 +91,7 @@ int rtl92ee_init_sw_vars(struct ieee80211_hw *hw)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));int err =0 ; +char *fw_name;rtl92ee_bt_reg_init (hw); rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support;
@@ -170,11 +171,11 @@ int rtl92ee_init_sw_vars(struct ieee80211_hw *hw) }/* request fw */ - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192eefw.bin" ; + fw_name ="rtlwifi/rtl8192eefw.bin" ; rtlpriv->max_fw_size =0x8000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {
@@ -266,7 +267,6 @@ static const struct rtl_hal_cfg rtl92ee_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl92ee_pci", - .fw_name = "rtlwifi/rtl8192eefw.bin", .ops = &rtl8192ee_hal_ops, .mod_params = &rtl92ee_mod_params,
drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c +5 -4
@@ -89,12 +89,13 @@ static void rtl92se_fw_cb(const struct firmware *firmware, void *context)struct ieee80211_hw *hw = context;struct rtl_priv *rtlpriv =rtl_priv (hw);struct rt_firmware *pfirmware =NULL ; +char *fw_name ="rtlwifi/rtl8192sefw.bin" ;RT_TRACE (rtlpriv,COMP_ERR ,DBG_LOUD ,"Firmware callback routine entered!\n" );complete (&rtlpriv->firmware_loading_complete);if (!firmware) { -pr_err ("Firmware %s not available\n" , rtlpriv->cfg->fw_name); +pr_err ("Firmware %s not available\n" , fw_name); rtlpriv->max_fw_size =0 ;return ; }
@@ -117,6 +118,7 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw)struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));int err =0 ;u16 earlyrxthreshold =7 ; +char *fw_name ="rtlwifi/rtl8192sefw.bin" ; rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ;
@@ -214,9 +216,9 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw) rtlpriv->max_fw_size =RTL8190_MAX_FIRMWARE_CODE_SIZE *2 +sizeof (struct fw_hdr );pr_info ("Driver for Realtek RTL8192SE/RTL8191SE\n" -"Loading firmware %s\n" , rtlpriv->cfg->fw_name); +"Loading firmware %s\n" , fw_name);/* request fw */ - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl92se_fw_cb);if (err) {
@@ -310,7 +312,6 @@ static const struct rtl_hal_cfg rtl92se_hal_cfg = { .bar_id = 1, .write_readback = false, .name = "rtl92s_pci", - .fw_name = "rtlwifi/rtl8192sefw.bin", .ops = &rtl8192se_hal_ops, .mod_params = &rtl92se_mod_params,
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c +5 -7
@@ -94,6 +94,7 @@ int rtl8723e_init_sw_vars(struct ieee80211_hw *hw)struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw));int err =0 ; +char *fw_name ="rtlwifi/rtl8723fw.bin" ;rtl8723e_bt_reg_init (hw);
@@ -176,14 +177,12 @@ int rtl8723e_init_sw_vars(struct ieee80211_hw *hw)return 1 ; } -if (IS_VENDOR_8723_A_CUT (rtlhal->version)) - rtlpriv->cfg->fw_name ="rtlwifi/rtl8723fw.bin" ; -else if (IS_81xxC_VENDOR_UMC_B_CUT (rtlhal->version)) - rtlpriv->cfg->fw_name ="rtlwifi/rtl8723fw_B.bin" ; +if (IS_81xxC_VENDOR_UMC_B_CUT (rtlhal->version)) + fw_name ="rtlwifi/rtl8723fw_B.bin" ; rtlpriv->max_fw_size =0x6000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {
@@ -280,7 +279,6 @@ static const struct rtl_hal_cfg rtl8723e_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl8723e_pci", - .fw_name = "rtlwifi/rtl8723efw.bin", .ops = &rtl8723e_hal_ops, .mod_params = &rtl8723e_mod_params, .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c +3 -3
@@ -91,6 +91,7 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));struct rtl_mac *mac =rtl_mac (rtl_priv (hw)); +char *fw_name ="rtlwifi/rtl8723befw.bin" ;rtl8723be_bt_reg_init (hw); rtlpriv->btcoexist.btc_ops =rtl_btc_get_ops_pointer ();
@@ -184,8 +185,8 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw) } rtlpriv->max_fw_size =0x8000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {
@@ -280,7 +281,6 @@ static const struct rtl_hal_cfg rtl8723be_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl8723be_pci", - .fw_name = "rtlwifi/rtl8723befw.bin", .ops = &rtl8723be_hal_ops, .mod_params = &rtl8723be_mod_params, .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c +9 -9
@@ -93,6 +93,7 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw)struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));struct rtl_mac *mac =rtl_mac (rtl_priv (hw));struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw)); +char *fw_name, *wowlan_fw_name;rtl8821ae_bt_reg_init (hw); rtlpriv->btcoexist.btc_ops =rtl_btc_get_ops_pointer ();
@@ -203,17 +204,17 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw) }if (rtlhal->hw_type ==HARDWARE_TYPE_RTL8812AE ) { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8812aefw.bin" ; - rtlpriv->cfg->wowlan_fw_name ="rtlwifi/rtl8812aefw_wowlan.bin" ; + fw_name ="rtlwifi/rtl8812aefw.bin" ; + wowlan_fw_name ="rtlwifi/rtl8812aefw_wowlan.bin" ; }else { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8821aefw.bin" ; - rtlpriv->cfg->wowlan_fw_name ="rtlwifi/rtl8821aefw_wowlan.bin" ; + fw_name ="rtlwifi/rtl8821aefw.bin" ; + wowlan_fw_name ="rtlwifi/rtl8821aefw_wowlan.bin" ; } rtlpriv->max_fw_size =0x8000 ;/*load normal firmware*/ -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {
@@ -222,9 +223,9 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw)return 1 ; }/*load wowlan firmware*/ -pr_info ("Using firmware %s\n" , rtlpriv->cfg->wowlan_fw_name); +pr_info ("Using firmware %s\n" , wowlan_fw_name); err =request_firmware_nowait (THIS_MODULE ,1 , - rtlpriv->cfg->wowlan_fw_name, + wowlan_fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_wowlan_fw_cb);if (err) {
@@ -320,7 +321,6 @@ static const struct rtl_hal_cfg rtl8821ae_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl8821ae_pci", - .fw_name = "rtlwifi/rtl8821aefw.bin", .ops = &rtl8821ae_hal_ops, .mod_params = &rtl8821ae_mod_params, .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,
drivers/net/wireless/realtek/rtlwifi/wifi.h +0 -2
@@ -2278,9 +2278,7 @@ struct rtl_hal_cfg {u8 bar_id;bool write_readback;char *name; -char *fw_name;char *alt_fw_name; -char *wowlan_fw_name;struct rtl_hal_ops *ops;struct rtl_mod_params *mod_params;struct rtl_hal_usbint_cfg *usb_interface_cfg;
Quoted 9 lines · On Tue, 8 Nov 2016, [email protected] wrote:
The patch below was submitted to be applied to the 4.8-stable tree.
I fail to see how this patch meets the stable kernel rules as found at
Documentation/stable_kernel_rules.txt.I could be totally wrong, and if so, please respond to <[email protected]> and let me know why this patch should be applied. Otherwise, it is now dropped from my patch queues, never to be seen again.
I believe it would only be useful if d86e64768859 was applied to stable or ended up in a release.
I'm not sure why it would have been applied to stable, since adding const doesn't fix a bug.
julia
Quoted 422 lines
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
cf4747d7535a936105f0abe8d8109d3fe339162bMon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Wed, 12 Oct 2016 13:54:04 -0500
Subject: [PATCH] rtlwifi: Fix regression caused by commitd86e64768859In commit
d86e64768859("rtlwifi: rtl818x: constify local structures"), the configuration struct for most of the drivers was changed to be constant. The problem is that five of the modified drivers need to be able to update the firmware name based on the exact model of the card. As the file names were stored in one of the members of that struct, these drivers would fail with a kernel BUG splat when they tried to update the firmware name.Rather than reverting the previous commit, I used a suggestion by Johannes Berg and made the firmware file name pointers be local to the routines that update the software variables.
The configuration struct of rtl8192cu, which was not touched in the previous patch, is now constantfied.
Fixes d86e64768859 ("rtlwifi: rtl818x: constify local structures")Suggested-by Johannes Berg <[email protected]>Signed-off-by Larry Finger <[email protected]>Cc Stable <[email protected]> # 4.8Cc Julia Lawall <[email protected]>Signed-off-by Kalle Valo <[email protected]>drivers/net/wireless/realtek/rtlwifi/core.c +1
-1@@ -111,7 +111,7 @@ static void rtl_fw_do_work(const struct firmware *firmware, void *context,if (!err) goto found_alt; } -pr_err ("Firmware %s not available\n" , rtlpriv->cfg->fw_name); +pr_err ("Selected firmware is not available\n" ); rtlpriv->max_fw_size =0 ;return ; }drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c +4
-4@@ -86,6 +86,7 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));u8 tid; +char *fw_name;rtl8188ee_bt_reg_init (hw); rtlpriv->dm.dm_initialgain_enable =1 ;@@ -169,10 +170,10 @@ int rtl88e_init_sw_vars(struct ieee80211_hw *hw)return 1 ; } - rtlpriv->cfg->fw_name ="rtlwifi/rtl8188efw.bin" ; + fw_name ="rtlwifi/rtl8188efw.bin" ; rtlpriv->max_fw_size =0x8000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {@@ -284,7 +285,6 @@ static const struct rtl_hal_cfg rtl88ee_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl88e_pci", - .fw_name = "rtlwifi/rtl8188efw.bin", .ops = &rtl8188ee_hal_ops, .mod_params = &rtl88ee_mod_params,drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c +5
-8@@ -96,6 +96,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw)); +char *fw_name ="rtlwifi/rtl8192cfwU.bin" ;rtl8192ce_bt_reg_init (hw);@@ -167,15 +168,12 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) }/* request fw */ -if (IS_VENDOR_UMC_A_CUT (rtlhal->version) && - !IS_92C_SERIAL (rtlhal->version)) - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cfwU.bin" ; -else if (IS_81XXC_VENDOR_UMC_B_CUT (rtlhal->version)) - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cfwU_B.bin" ; +if (IS_81XXC_VENDOR_UMC_B_CUT (rtlhal->version)) + fw_name ="rtlwifi/rtl8192cfwU_B.bin" ; rtlpriv->max_fw_size =0x4000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {@@ -262,7 +260,6 @@ static const struct rtl_hal_cfg rtl92ce_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl92c_pci", - .fw_name = "rtlwifi/rtl8192cfw.bin", .ops = &rtl8192ce_hal_ops, .mod_params = &rtl92ce_mod_params,drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c +6
-6@@ -59,6 +59,7 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) {struct rtl_priv *rtlpriv =rtl_priv (hw);int err; +char *fw_name; rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ;@@ -77,18 +78,18 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw) }if (IS_VENDOR_UMC_A_CUT (rtlpriv->rtlhal.version) && !IS_92C_SERIAL (rtlpriv->rtlhal.version)) { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cufw_A.bin" ; + fw_name ="rtlwifi/rtl8192cufw_A.bin" ; }else if (IS_81XXC_VENDOR_UMC_B_CUT (rtlpriv->rtlhal.version)) { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cufw_B.bin" ; + fw_name ="rtlwifi/rtl8192cufw_B.bin" ; }else { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192cufw_TMSC.bin" ; + fw_name ="rtlwifi/rtl8192cufw_TMSC.bin" ; }/* provide name of alternative file */ rtlpriv->cfg->alt_fw_name ="rtlwifi/rtl8192cufw.bin" ; -pr_info ("Loading firmware %s\n" , rtlpriv->cfg->fw_name); +pr_info ("Loading firmware %s\n" , fw_name); rtlpriv->max_fw_size =0x4000 ; err =request_firmware_nowait (THIS_MODULE ,1 , - rtlpriv->cfg->fw_name, rtlpriv->io.dev, + fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);return err; }@@ -187,7 +188,6 @@ static struct rtl_hal_usbint_cfg rtl92cu_interface_cfg = {static struct rtl_hal_cfg rtl92cu_hal_cfg = { .name ="rtl92c_usb" , - .fw_name ="rtlwifi/rtl8192cufw.bin" , .ops = &rtl8192cu_hal_ops, .mod_params = &rtl92cu_mod_params, .usb_interface_cfg = &rtl92cu_interface_cfg,drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c +3
-3@@ -92,6 +92,7 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw)u8 tid;struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw)); +char *fw_name ="rtlwifi/rtl8192defw.bin" ; rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ;@@ -181,10 +182,10 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw) rtlpriv->max_fw_size =0x8000 ;pr_info ("Driver for Realtek RTL8192DE WLAN interface\n" ); -pr_info ("Loading firmware file %s\n" , rtlpriv->cfg->fw_name); +pr_info ("Loading firmware file %s\n" , fw_name);/* request fw */ - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {@@ -266,7 +267,6 @@ static const struct rtl_hal_cfg rtl92de_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl8192de", - .fw_name = "rtlwifi/rtl8192defw.bin", .ops = &rtl8192de_hal_ops, .mod_params = &rtl92de_mod_params,drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c +4
-4@@ -91,6 +91,7 @@ int rtl92ee_init_sw_vars(struct ieee80211_hw *hw)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));int err =0 ; +char *fw_name;rtl92ee_bt_reg_init (hw); rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support;@@ -170,11 +171,11 @@ int rtl92ee_init_sw_vars(struct ieee80211_hw *hw) }/* request fw */ - rtlpriv->cfg->fw_name ="rtlwifi/rtl8192eefw.bin" ; + fw_name ="rtlwifi/rtl8192eefw.bin" ; rtlpriv->max_fw_size =0x8000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {@@ -266,7 +267,6 @@ static const struct rtl_hal_cfg rtl92ee_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl92ee_pci", - .fw_name = "rtlwifi/rtl8192eefw.bin", .ops = &rtl8192ee_hal_ops, .mod_params = &rtl92ee_mod_params,drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c +5
-4@@ -89,12 +89,13 @@ static void rtl92se_fw_cb(const struct firmware *firmware, void *context)struct ieee80211_hw *hw = context;struct rtl_priv *rtlpriv =rtl_priv (hw);struct rt_firmware *pfirmware =NULL ; +char *fw_name ="rtlwifi/rtl8192sefw.bin" ;RT_TRACE (rtlpriv,COMP_ERR ,DBG_LOUD ,"Firmware callback routine entered!\n" );complete (&rtlpriv->firmware_loading_complete);if (!firmware) { -pr_err ("Firmware %s not available\n" , rtlpriv->cfg->fw_name); +pr_err ("Firmware %s not available\n" , fw_name); rtlpriv->max_fw_size =0 ;return ; }@@ -117,6 +118,7 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw)struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));int err =0 ;u16 earlyrxthreshold =7 ; +char *fw_name ="rtlwifi/rtl8192sefw.bin" ; rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ;@@ -214,9 +216,9 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw) rtlpriv->max_fw_size =RTL8190_MAX_FIRMWARE_CODE_SIZE *2 +sizeof (struct fw_hdr );pr_info ("Driver for Realtek RTL8192SE/RTL8191SE\n" -"Loading firmware %s\n" , rtlpriv->cfg->fw_name); +"Loading firmware %s\n" , fw_name);/* request fw */ - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl92se_fw_cb);if (err) {@@ -310,7 +312,6 @@ static const struct rtl_hal_cfg rtl92se_hal_cfg = { .bar_id = 1, .write_readback = false, .name = "rtl92s_pci", - .fw_name = "rtlwifi/rtl8192sefw.bin", .ops = &rtl8192se_hal_ops, .mod_params = &rtl92se_mod_params,drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c +5
-7@@ -94,6 +94,7 @@ int rtl8723e_init_sw_vars(struct ieee80211_hw *hw)struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw));int err =0 ; +char *fw_name ="rtlwifi/rtl8723fw.bin" ;rtl8723e_bt_reg_init (hw);@@ -176,14 +177,12 @@ int rtl8723e_init_sw_vars(struct ieee80211_hw *hw)return 1 ; } -if (IS_VENDOR_8723_A_CUT (rtlhal->version)) - rtlpriv->cfg->fw_name ="rtlwifi/rtl8723fw.bin" ; -else if (IS_81xxC_VENDOR_UMC_B_CUT (rtlhal->version)) - rtlpriv->cfg->fw_name ="rtlwifi/rtl8723fw_B.bin" ; +if (IS_81xxC_VENDOR_UMC_B_CUT (rtlhal->version)) + fw_name ="rtlwifi/rtl8723fw_B.bin" ; rtlpriv->max_fw_size =0x6000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {@@ -280,7 +279,6 @@ static const struct rtl_hal_cfg rtl8723e_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl8723e_pci", - .fw_name = "rtlwifi/rtl8723efw.bin", .ops = &rtl8723e_hal_ops, .mod_params = &rtl8723e_mod_params, .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c +3
-3@@ -91,6 +91,7 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));struct rtl_mac *mac =rtl_mac (rtl_priv (hw)); +char *fw_name ="rtlwifi/rtl8723befw.bin" ;rtl8723be_bt_reg_init (hw); rtlpriv->btcoexist.btc_ops =rtl_btc_get_ops_pointer ();@@ -184,8 +185,8 @@ int rtl8723be_init_sw_vars(struct ieee80211_hw *hw) } rtlpriv->max_fw_size =0x8000 ; -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {@@ -280,7 +281,6 @@ static const struct rtl_hal_cfg rtl8723be_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl8723be_pci", - .fw_name = "rtlwifi/rtl8723befw.bin", .ops = &rtl8723be_hal_ops, .mod_params = &rtl8723be_mod_params, .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c +9
-9@@ -93,6 +93,7 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw)struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));struct rtl_mac *mac =rtl_mac (rtl_priv (hw));struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw)); +char *fw_name, *wowlan_fw_name;rtl8821ae_bt_reg_init (hw); rtlpriv->btcoexist.btc_ops =rtl_btc_get_ops_pointer ();@@ -203,17 +204,17 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw) }if (rtlhal->hw_type ==HARDWARE_TYPE_RTL8812AE ) { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8812aefw.bin" ; - rtlpriv->cfg->wowlan_fw_name ="rtlwifi/rtl8812aefw_wowlan.bin" ; + fw_name ="rtlwifi/rtl8812aefw.bin" ; + wowlan_fw_name ="rtlwifi/rtl8812aefw_wowlan.bin" ; }else { - rtlpriv->cfg->fw_name ="rtlwifi/rtl8821aefw.bin" ; - rtlpriv->cfg->wowlan_fw_name ="rtlwifi/rtl8821aefw_wowlan.bin" ; + fw_name ="rtlwifi/rtl8821aefw.bin" ; + wowlan_fw_name ="rtlwifi/rtl8821aefw_wowlan.bin" ; } rtlpriv->max_fw_size =0x8000 ;/*load normal firmware*/ -pr_info ("Using firmware %s\n" , rtlpriv->cfg->fw_name); - err =request_firmware_nowait (THIS_MODULE ,1 , rtlpriv->cfg->fw_name, +pr_info ("Using firmware %s\n" , fw_name); + err =request_firmware_nowait (THIS_MODULE ,1 , fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_fw_cb);if (err) {@@ -222,9 +223,9 @@ int rtl8821ae_init_sw_vars(struct ieee80211_hw *hw)return 1 ; }/*load wowlan firmware*/ -pr_info ("Using firmware %s\n" , rtlpriv->cfg->wowlan_fw_name); +pr_info ("Using firmware %s\n" , wowlan_fw_name); err =request_firmware_nowait (THIS_MODULE ,1 , - rtlpriv->cfg->wowlan_fw_name, + wowlan_fw_name, rtlpriv->io.dev,GFP_KERNEL , hw, rtl_wowlan_fw_cb);if (err) {@@ -320,7 +321,6 @@ static const struct rtl_hal_cfg rtl8821ae_hal_cfg = { .bar_id = 2, .write_readback = true, .name = "rtl8821ae_pci", - .fw_name = "rtlwifi/rtl8821aefw.bin", .ops = &rtl8821ae_hal_ops, .mod_params = &rtl8821ae_mod_params, .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,drivers/net/wireless/realtek/rtlwifi/wifi.h +0
-2@@ -2278,9 +2278,7 @@ struct rtl_hal_cfg {u8 bar_id;bool write_readback;char *name; -char *fw_name;char *alt_fw_name; -char *wowlan_fw_name;struct rtl_hal_ops *ops;struct rtl_mod_params *mod_params;struct rtl_hal_usbint_cfg *usb_interface_cfg;
Quoted 12 lines · Julia Lawall
Quoted 9 lines · On Tue, 8 Nov 2016, [email protected] wrote:
The patch below was submitted to be applied to the 4.8-stable tree.
I fail to see how this patch meets the stable kernel rules as found at
Documentation/stable_kernel_rules.txt.I could be totally wrong, and if so, please respond to <[email protected]> and let me know why this patch should be applied. Otherwise, it is now dropped from my patch queues, never to be seen again.
Quoted 5 lines
I believe it would only be useful if
d86e64768859was applied to stable or ended up in a release.I'm not sure why it would have been applied to stable, since adding const doesn't fix a bug.
Correct. Commit d86e64768859 is in v4.9-rc1, but it's not in v4.8, so the stable tag was not actually needed. I missed that, sorry.
Signature · 1 line
Kalle Valo
Quoted 9 lines · On 11/08/2016 10:25 AM, [email protected] wrote:
The patch below was submitted to be applied to the 4.8-stable tree.
I fail to see how this patch meets the stable kernel rules as found at
Documentation/stable_kernel_rules.txt.I could be totally wrong, and if so, please respond to <[email protected]> and let me know why this patch should be applied. Otherwise, it is now dropped from my patch queues, never to be seen again.
Greg,
Dropping this patch is the correct action. I got confused over the material in net-next as contrasted with mainline, thus I used the stable indication in error.
Sorry for any confusion,
Larry