]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: hns3: Rename mac loopback to app loopback
authorFuyun Liang <liangfuyun1@huawei.com>
Wed, 26 Sep 2018 18:28:34 +0000 (19:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Sep 2018 17:37:41 +0000 (10:37 -0700)
In fact, our implementation of mac loopback is the implementation of app
loopback now. Current name is wrong. This patch renames mac loopback to
app loopback.

Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 03d7878c61684781dd12da3f781cd05f43169862..27155ea76c3abc8115ecf0bad7da846682733c70 100644 (file)
@@ -84,7 +84,7 @@ struct hnae3_queue {
 
 /*hnae3 loop mode*/
 enum hnae3_loop {
-       HNAE3_LOOP_MAC,
+       HNAE3_LOOP_APP,
        HNAE3_LOOP_SERDES,
        HNAE3_LOOP_PHY,
        HNAE3_LOOP_NONE,
@@ -478,7 +478,7 @@ struct hnae3_unic_private_info {
        struct hnae3_queue **tqp;  /* array base of all TQPs of this instance */
 };
 
-#define HNAE3_SUPPORT_MAC_LOOPBACK    BIT(0)
+#define HNAE3_SUPPORT_APP_LOOPBACK    BIT(0)
 #define HNAE3_SUPPORT_PHY_LOOPBACK    BIT(1)
 #define HNAE3_SUPPORT_SERDES_LOOPBACK BIT(2)
 #define HNAE3_SUPPORT_VF             BIT(3)
index 86587cf2a6760a9806d80c938d67c55d575f58e1..75ebd2e95236b185d9c6d4ed417d05eda19d2d1e 100644 (file)
@@ -79,7 +79,7 @@ static int hns3_lp_setup(struct net_device *ndev, enum hnae3_loop loop, bool en)
 
        switch (loop) {
        case HNAE3_LOOP_SERDES:
-       case HNAE3_LOOP_MAC:
+       case HNAE3_LOOP_APP:
                ret = h->ae_algo->ops->set_loopback(h, loop, en);
                break;
        default:
@@ -286,9 +286,9 @@ static void hns3_self_test(struct net_device *ndev,
        if (eth_test->flags != ETH_TEST_FL_OFFLINE)
                return;
 
-       st_param[HNAE3_LOOP_MAC][0] = HNAE3_LOOP_MAC;
-       st_param[HNAE3_LOOP_MAC][1] =
-                       h->flags & HNAE3_SUPPORT_MAC_LOOPBACK;
+       st_param[HNAE3_LOOP_APP][0] = HNAE3_LOOP_APP;
+       st_param[HNAE3_LOOP_APP][1] =
+                       h->flags & HNAE3_SUPPORT_APP_LOOPBACK;
 
        st_param[HNAE3_LOOP_SERDES][0] = HNAE3_LOOP_SERDES;
        st_param[HNAE3_LOOP_SERDES][1] =
index 33e97fcfe74e70d5b08377bf548f696a8deb4c17..a0f6329020f6e6c19f778fd1319a7df17d77f6e9 100644 (file)
@@ -49,7 +49,7 @@ static const struct pci_device_id ae_algo_pci_tbl[] = {
 MODULE_DEVICE_TABLE(pci, ae_algo_pci_tbl);
 
 static const char hns3_nic_test_strs[][ETH_GSTRING_LEN] = {
-       "Mac    Loopback test",
+       "App    Loopback test",
        "Serdes Loopback test",
        "Phy    Loopback test"
 };
@@ -493,7 +493,7 @@ static int hclge_get_sset_count(struct hnae3_handle *handle, int stringset)
                    hdev->hw.mac.speed == HCLGE_MAC_SPEED_100M ||
                    hdev->hw.mac.speed == HCLGE_MAC_SPEED_1G) {
                        count += 1;
-                       handle->flags |= HNAE3_SUPPORT_MAC_LOOPBACK;
+                       handle->flags |= HNAE3_SUPPORT_APP_LOOPBACK;
                }
 
                count++;
@@ -521,9 +521,9 @@ static void hclge_get_strings(struct hnae3_handle *handle,
                                           p);
                p = hclge_tqps_get_strings(handle, p);
        } else if (stringset == ETH_SS_TEST) {
-               if (handle->flags & HNAE3_SUPPORT_MAC_LOOPBACK) {
+               if (handle->flags & HNAE3_SUPPORT_APP_LOOPBACK) {
                        memcpy(p,
-                              hns3_nic_test_strs[HNAE3_LOOP_MAC],
+                              hns3_nic_test_strs[HNAE3_LOOP_APP],
                               ETH_GSTRING_LEN);
                        p += ETH_GSTRING_LEN;
                }
@@ -3345,7 +3345,7 @@ static void hclge_cfg_mac_mode(struct hclge_dev *hdev, bool enable)
                        "mac enable fail, ret =%d.\n", ret);
 }
 
-static int hclge_set_mac_loopback(struct hclge_dev *hdev, bool en)
+static int hclge_set_app_loopback(struct hclge_dev *hdev, bool en)
 {
        struct hclge_config_mac_mode_cmd *req;
        struct hclge_desc desc;
@@ -3459,8 +3459,8 @@ static int hclge_set_loopback(struct hnae3_handle *handle,
        int i, ret;
 
        switch (loop_mode) {
-       case HNAE3_LOOP_MAC:
-               ret = hclge_set_mac_loopback(hdev, en);
+       case HNAE3_LOOP_APP:
+               ret = hclge_set_app_loopback(hdev, en);
                break;
        case HNAE3_LOOP_SERDES:
                ret = hclge_set_serdes_loopback(hdev, en);