Commit 99254b9d authored by Pu Lehui's avatar Pu Lehui
Browse files

rt2x00: Fix kabi breakage in struct rt2x00lib_ops

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I96GO9


CVE: CVE-2023-52595

--------------------------------

Fix kabi breakage in struct rt2x00lib_ops.

Fixes: 09db3b00 ("rt2800: add pre_reset_hw callback")
Signed-off-by: default avatarPu Lehui <pulehui@huawei.com>
parent 50fc0dbe
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -52,6 +52,11 @@ static bool modparam_nohwcrypt = false;
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");

void rt2x00lib_pre_reset_hw(struct rt2x00_dev *rt2x00dev)
{
	rt2800_pre_reset_hw(rt2x00dev);
}

static bool rt2800pci_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
{
	return modparam_nohwcrypt;
@@ -377,7 +382,6 @@ static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = {
	.config_erp		= rt2800_config_erp,
	.config_ant		= rt2800_config_ant,
	.config			= rt2800_config,
	.pre_reset_hw		= rt2800_pre_reset_hw,
};

static const struct rt2x00_ops rt2800pci_ops = {
+5 −1
Original line number Diff line number Diff line
@@ -44,6 +44,11 @@ static bool modparam_nohwcrypt;
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");

void rt2x00lib_pre_reset_hw(struct rt2x00_dev *rt2x00dev)
{
	rt2800_pre_reset_hw(rt2x00dev);
}

static bool rt2800soc_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
{
	return modparam_nohwcrypt;
@@ -216,7 +221,6 @@ static const struct rt2x00lib_ops rt2800soc_rt2x00_ops = {
	.config_erp		= rt2800_config_erp,
	.config_ant		= rt2800_config_ant,
	.config			= rt2800_config,
	.pre_reset_hw		= rt2800_pre_reset_hw,
};

static const struct rt2x00_ops rt2800soc_ops = {
+5 −1
Original line number Diff line number Diff line
@@ -46,6 +46,11 @@ static bool modparam_nohwcrypt;
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");

void rt2x00lib_pre_reset_hw(struct rt2x00_dev *rt2x00dev)
{
	rt2800_pre_reset_hw(rt2x00dev);
}

static bool rt2800usb_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
{
	return modparam_nohwcrypt;
@@ -858,7 +863,6 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {
	.config_erp		= rt2800_config_erp,
	.config_ant		= rt2800_config_ant,
	.config			= rt2800_config,
	.pre_reset_hw		= rt2800_pre_reset_hw,
};

static void rt2800usb_queue_init(struct data_queue *queue)
+1 −1
Original line number Diff line number Diff line
@@ -626,7 +626,6 @@ struct rt2x00lib_ops {
	void (*config) (struct rt2x00_dev *rt2x00dev,
			struct rt2x00lib_conf *libconf,
			const unsigned int changed_flags);
	void (*pre_reset_hw) (struct rt2x00_dev *rt2x00dev);
	int (*sta_add) (struct rt2x00_dev *rt2x00dev,
			struct ieee80211_vif *vif,
			struct ieee80211_sta *sta);
@@ -1417,6 +1416,7 @@ static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
			 struct ieee80211_vif *vif);
void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr);
void rt2x00lib_pre_reset_hw(struct rt2x00_dev *rt2x00dev);

/*
 * Interrupt context handlers.
+5 −1
Original line number Diff line number Diff line
@@ -1266,6 +1266,10 @@ static int rt2x00lib_initialize(struct rt2x00_dev *rt2x00dev)
	return 0;
}

void __weak rt2x00lib_pre_reset_hw(struct rt2x00_dev *rt2x00dev)
{
}

int rt2x00lib_start(struct rt2x00_dev *rt2x00dev)
{
	int retval = 0;
@@ -1276,7 +1280,7 @@ int rt2x00lib_start(struct rt2x00_dev *rt2x00dev)
		 * mac80211 never call start() two times in row without stop();
		 */
		set_bit(DEVICE_STATE_RESET, &rt2x00dev->flags);
		rt2x00dev->ops->lib->pre_reset_hw(rt2x00dev);
		rt2x00lib_pre_reset_hw(rt2x00dev);
		rt2x00lib_stop(rt2x00dev);
	}