Commit 1f8bd8c0 authored by Fengyan Mu's avatar Fengyan Mu Committed by mufengyan
Browse files

HNS3: Change the function name from ubn to ubl

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I99GLS


CVE: NA

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

Change the function which creates net device name from ubn
to ubl, aimed to be consistent with the protocol stack name.

Signed-off-by: default avatarFengyan Mu <mufengyan@hisilicon.com>
parent 2879d839
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5660,7 +5660,7 @@ static int hns3_client_init(struct hnae3_handle *handle)
						    &max_rss_size);
#ifdef CONFIG_HNS3_UBL
	if (hns3_ubl_supported(handle))
		netdev = alloc_ubndev_mq(sizeof(struct hns3_nic_priv), alloc_tqps);
		netdev = alloc_ubldev_mq(sizeof(struct hns3_nic_priv), alloc_tqps);
	else
		netdev = alloc_etherdev_mq(sizeof(struct hns3_nic_priv), alloc_tqps);
#else
+5 −5
Original line number Diff line number Diff line
@@ -145,13 +145,13 @@ void ubl_setup(struct net_device *dev)
EXPORT_SYMBOL(ubl_setup);

/**
 * alloc_ubndev_mqs - Allocates and sets up an ub-n device
 * alloc_ubldev_mqs - Allocates and sets up an ub-n device
 * @sizeof_priv: Size of additional driver-private structure to be allocated
 *	for this ubn device
 *	for this ubl device
 * @txqs: The number of TX queues this device has.
 * @rxqs: The number of RX queues this device has.
 *
 * Fill in the fields of the device structure with ubn-generic
 * Fill in the fields of the device structure with ubl-generic
 * values. Basically does everything except registering the device.
 *
 * Constructs a new net device, complete with a private data area of
@@ -159,13 +159,13 @@ EXPORT_SYMBOL(ubl_setup);
 * this private data area.
 */

struct net_device *alloc_ubndev_mqs(int sizeof_priv, unsigned int txqs,
struct net_device *alloc_ubldev_mqs(int sizeof_priv, unsigned int txqs,
				    unsigned int rxqs)
{
	return alloc_netdev_mqs(sizeof_priv, "ubl%d", NET_NAME_UNKNOWN,
				ubl_setup, txqs, rxqs);
}
EXPORT_SYMBOL(alloc_ubndev_mqs);
EXPORT_SYMBOL(alloc_ubldev_mqs);

/**
 * ubl_type_trans - obtains skb->protocol and adds sw_ptype to the packet
+3 −3
Original line number Diff line number Diff line
@@ -76,10 +76,10 @@ int ubl_create_header(struct sk_buff *skb, struct net_device *dev,
		      const void *saddr, unsigned int len);
void ubl_setup(struct net_device *dev);
__be16 ubl_type_trans(struct sk_buff *skb, struct net_device *dev, u8 type);
struct net_device *alloc_ubndev_mqs(int sizeof_priv, unsigned int txqs,
struct net_device *alloc_ubldev_mqs(int sizeof_priv, unsigned int txqs,
				    unsigned int rxqs);
int ubl_add_sw_ctype(struct sk_buff *skb, u8 ctype);
#define alloc_ubndev_mq(sizeof_priv, count) \
	alloc_ubndev_mqs((sizeof_priv), (count), (count))
#define alloc_ubldev_mq(sizeof_priv, count) \
	alloc_ubldev_mqs((sizeof_priv), (count), (count))

#endif