net: aquantia: renaming for better visibility
authorNikita Danilov <nikita.danilov@aquantia.com>
Mon, 10 Sep 2018 09:39:33 +0000 (12:39 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Sep 2018 06:41:02 +0000 (23:41 -0700)
Removed extra characters from the names of structures to unify prefixes
used through the driver code (we normally use hw_atl for hw specifics).
HW_ATL_B0_ and HW_ATL_A0_ are the same and useless copies.

Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_hw.h
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0_internal.h
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0_internal.h
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils_fw2x.c

index 908f19fe19b3f8489bb22faea1904b03b53a0cec..e8689241204e9086fdb2c8750402ff7467e129ac 100644 (file)
@@ -112,7 +112,7 @@ struct aq_hw_s {
        const struct aq_fw_ops *aq_fw_ops;
        void __iomem *mmio;
        struct aq_hw_link_status_s aq_link_status;
-       struct hw_aq_atl_utils_mbox mbox;
+       struct hw_atl_utils_mbox mbox;
        struct hw_atl_stats_s last_stats;
        struct aq_stats_s curr_stats;
        u64 speed;
@@ -124,7 +124,7 @@ struct aq_hw_s {
        u32 mbox_addr;
        u32 rpc_addr;
        u32 rpc_tid;
-       struct hw_aq_atl_utils_fw_rpc rpc;
+       struct hw_atl_utils_fw_rpc rpc;
 };
 
 struct aq_ring_s;
index d1d5bfda6a5b828a0516ed604003b40eeb92f2ab..2469ed4d86b939816e46c59fb631820f8cf3872a 100644 (file)
 const struct aq_hw_caps_s hw_atl_a0_caps_aqc100 = {
        DEFAULT_A0_BOARD_BASIC_CAPABILITIES,
        .media_type = AQ_HW_MEDIA_TYPE_FIBRE,
-       .link_speed_msk = HW_ATL_A0_RATE_5G |
-                         HW_ATL_A0_RATE_2G5 |
-                         HW_ATL_A0_RATE_1G |
-                         HW_ATL_A0_RATE_100M,
+       .link_speed_msk = AQ_NIC_RATE_5G |
+                         AQ_NIC_RATE_2GS |
+                         AQ_NIC_RATE_1G |
+                         AQ_NIC_RATE_100M,
 };
 
 const struct aq_hw_caps_s hw_atl_a0_caps_aqc107 = {
        DEFAULT_A0_BOARD_BASIC_CAPABILITIES,
        .media_type = AQ_HW_MEDIA_TYPE_TP,
-       .link_speed_msk = HW_ATL_A0_RATE_10G |
-                         HW_ATL_A0_RATE_5G |
-                         HW_ATL_A0_RATE_2G5 |
-                         HW_ATL_A0_RATE_1G |
-                         HW_ATL_A0_RATE_100M,
+       .link_speed_msk = AQ_NIC_RATE_10G |
+                         AQ_NIC_RATE_5G |
+                         AQ_NIC_RATE_2GS |
+                         AQ_NIC_RATE_1G |
+                         AQ_NIC_RATE_100M,
 };
 
 const struct aq_hw_caps_s hw_atl_a0_caps_aqc108 = {
        DEFAULT_A0_BOARD_BASIC_CAPABILITIES,
        .media_type = AQ_HW_MEDIA_TYPE_TP,
-       .link_speed_msk = HW_ATL_A0_RATE_5G  |
-                         HW_ATL_A0_RATE_2G5 |
-                         HW_ATL_A0_RATE_1G  |
-                         HW_ATL_A0_RATE_100M,
+       .link_speed_msk = AQ_NIC_RATE_5G |
+                         AQ_NIC_RATE_2GS |
+                         AQ_NIC_RATE_1G |
+                         AQ_NIC_RATE_100M,
 };
 
 const struct aq_hw_caps_s hw_atl_a0_caps_aqc109 = {
        DEFAULT_A0_BOARD_BASIC_CAPABILITIES,
        .media_type = AQ_HW_MEDIA_TYPE_TP,
-       .link_speed_msk = HW_ATL_A0_RATE_2G5 |
-                         HW_ATL_A0_RATE_1G |
-                         HW_ATL_A0_RATE_100M,
+       .link_speed_msk = AQ_NIC_RATE_2GS |
+                         AQ_NIC_RATE_1G |
+                         AQ_NIC_RATE_100M,
 };
 
 static int hw_atl_a0_hw_reset(struct aq_hw_s *self)
index 3c94cff57876dcb7d59eee357b05be3a02f6f2b7..a021dc431ef7b95e9af4967e68361d1de1887549 100644 (file)
 #define HW_ATL_A0_MPI_SPEED_MSK       0xFFFFU
 #define HW_ATL_A0_MPI_SPEED_SHIFT     16U
 
-#define HW_ATL_A0_RATE_10G            BIT(0)
-#define HW_ATL_A0_RATE_5G             BIT(1)
-#define HW_ATL_A0_RATE_2G5            BIT(3)
-#define HW_ATL_A0_RATE_1G             BIT(4)
-#define HW_ATL_A0_RATE_100M           BIT(5)
-
 #define HW_ATL_A0_TXBUF_MAX 160U
 #define HW_ATL_A0_RXBUF_MAX 320U
 
index 7c8ee103c825654c222171867c0ac70bca0ff1cd..76d25d594a0f62fedf507e50b58701933b1872c2 100644 (file)
 const struct aq_hw_caps_s hw_atl_b0_caps_aqc100 = {
        DEFAULT_B0_BOARD_BASIC_CAPABILITIES,
        .media_type = AQ_HW_MEDIA_TYPE_FIBRE,
-       .link_speed_msk = HW_ATL_B0_RATE_10G |
-                         HW_ATL_B0_RATE_5G |
-                         HW_ATL_B0_RATE_2G5 |
-                         HW_ATL_B0_RATE_1G |
-                         HW_ATL_B0_RATE_100M,
+       .link_speed_msk = AQ_NIC_RATE_10G |
+                         AQ_NIC_RATE_5G |
+                         AQ_NIC_RATE_2GS |
+                         AQ_NIC_RATE_1G |
+                         AQ_NIC_RATE_100M,
 };
 
 const struct aq_hw_caps_s hw_atl_b0_caps_aqc107 = {
        DEFAULT_B0_BOARD_BASIC_CAPABILITIES,
        .media_type = AQ_HW_MEDIA_TYPE_TP,
-       .link_speed_msk = HW_ATL_B0_RATE_10G |
-                         HW_ATL_B0_RATE_5G |
-                         HW_ATL_B0_RATE_2G5 |
-                         HW_ATL_B0_RATE_1G |
-                         HW_ATL_B0_RATE_100M,
+       .link_speed_msk = AQ_NIC_RATE_10G |
+                         AQ_NIC_RATE_5G |
+                         AQ_NIC_RATE_2GS |
+                         AQ_NIC_RATE_1G |
+                         AQ_NIC_RATE_100M,
 };
 
 const struct aq_hw_caps_s hw_atl_b0_caps_aqc108 = {
        DEFAULT_B0_BOARD_BASIC_CAPABILITIES,
        .media_type = AQ_HW_MEDIA_TYPE_TP,
-       .link_speed_msk = HW_ATL_B0_RATE_5G |
-                         HW_ATL_B0_RATE_2G5 |
-                         HW_ATL_B0_RATE_1G |
-                         HW_ATL_B0_RATE_100M,
+       .link_speed_msk = AQ_NIC_RATE_5G |
+                         AQ_NIC_RATE_2GS |
+                         AQ_NIC_RATE_1G |
+                         AQ_NIC_RATE_100M,
 };
 
 const struct aq_hw_caps_s hw_atl_b0_caps_aqc109 = {
        DEFAULT_B0_BOARD_BASIC_CAPABILITIES,
        .media_type = AQ_HW_MEDIA_TYPE_TP,
-       .link_speed_msk = HW_ATL_B0_RATE_2G5 |
-                         HW_ATL_B0_RATE_1G |
-                         HW_ATL_B0_RATE_100M,
+       .link_speed_msk = AQ_NIC_RATE_2GS |
+                         AQ_NIC_RATE_1G |
+                         AQ_NIC_RATE_100M,
 };
 
 static int hw_atl_b0_hw_reset(struct aq_hw_s *self)
index 28568f5fa74b0f2d72d460c755fad49c09089889..b318eefd36ae673cb27e668604472b6b736aa0a2 100644 (file)
 #define HW_ATL_B0_MPI_SPEED_MSK         0xFFFFU
 #define HW_ATL_B0_MPI_SPEED_SHIFT       16U
 
-#define HW_ATL_B0_RATE_10G              BIT(0)
-#define HW_ATL_B0_RATE_5G               BIT(1)
-#define HW_ATL_B0_RATE_2G5              BIT(3)
-#define HW_ATL_B0_RATE_1G               BIT(4)
-#define HW_ATL_B0_RATE_100M             BIT(5)
-
 #define HW_ATL_B0_TXBUF_MAX  160U
 #define HW_ATL_B0_RXBUF_MAX  320U
 
index 5b7116d015a4f45512608920aeea0dbf94191dde..0dd59b09060bfc7c66540841be6a7837506f6170 100644 (file)
@@ -439,7 +439,7 @@ err_exit:
 }
 
 int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
-                            struct hw_aq_atl_utils_fw_rpc **rpc)
+                            struct hw_atl_utils_fw_rpc **rpc)
 {
        int err = 0;
        struct aq_hw_atl_utils_fw_rpc_tid_s sw;
@@ -504,7 +504,7 @@ err_exit:
 }
 
 int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self,
-                              struct hw_aq_atl_utils_mbox_header *pmbox)
+                              struct hw_atl_utils_mbox_header *pmbox)
 {
        return hw_atl_utils_fw_downld_dwords(self,
                                             self->mbox_addr,
@@ -513,7 +513,7 @@ int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self,
 }
 
 void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self,
-                                struct hw_aq_atl_utils_mbox *pmbox)
+                                struct hw_atl_utils_mbox *pmbox)
 {
        int err = 0;
 
@@ -553,7 +553,7 @@ static int hw_atl_utils_mpi_set_state(struct aq_hw_s *self,
 {
        int err = 0;
        u32 transaction_id = 0;
-       struct hw_aq_atl_utils_mbox_header mbox;
+       struct hw_atl_utils_mbox_header mbox;
        u32 val = aq_hw_read_reg(self, HW_ATL_MPI_CONTROL_ADR);
 
        if (state == MPI_RESET) {
@@ -747,7 +747,7 @@ static int hw_atl_fw1x_deinit(struct aq_hw_s *self)
 
 int hw_atl_utils_update_stats(struct aq_hw_s *self)
 {
-       struct hw_aq_atl_utils_mbox mbox;
+       struct hw_atl_utils_mbox mbox;
 
        hw_atl_utils_mpi_read_stats(self, &mbox);
 
@@ -834,7 +834,7 @@ int hw_atl_utils_get_fw_version(struct aq_hw_s *self, u32 *fw_version)
 
 static int aq_fw1x_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac)
 {
-       struct hw_aq_atl_utils_fw_rpc *prpc = NULL;
+       struct hw_atl_utils_fw_rpc *prpc = NULL;
        unsigned int rpc_size = 0U;
        int err = 0;
 
@@ -873,7 +873,7 @@ err_exit:
 int aq_fw1x_set_power(struct aq_hw_s *self, unsigned int power_state,
                      u8 *mac)
 {
-       struct hw_aq_atl_utils_fw_rpc *prpc = NULL;
+       struct hw_atl_utils_fw_rpc *prpc = NULL;
        unsigned int rpc_size = 0U;
        int err = 0;
 
index f3d830f423f2d61551a33350c987e202fce98cfc..3613fca64b58e653375686ce1d1581e5e6935355 100644 (file)
@@ -75,7 +75,7 @@ union __packed ip_addr {
        } v4;
 };
 
-struct __packed hw_aq_atl_utils_fw_rpc {
+struct __packed hw_atl_utils_fw_rpc {
        u32 msg_id;
 
        union {
@@ -165,7 +165,7 @@ struct __packed hw_aq_atl_utils_fw_rpc {
        };
 };
 
-struct __packed hw_aq_atl_utils_mbox_header {
+struct __packed hw_atl_utils_mbox_header {
        u32 version;
        u32 transaction_id;
        u32 error;
@@ -183,8 +183,8 @@ struct __packed hw_aq_info {
        u32 caps_hi;
 };
 
-struct __packed hw_aq_atl_utils_mbox {
-       struct hw_aq_atl_utils_mbox_header header;
+struct __packed hw_atl_utils_mbox {
+       struct hw_atl_utils_mbox_header header;
        struct hw_atl_stats_s stats;
        struct hw_aq_info info;
 };
@@ -386,10 +386,10 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self);
 void hw_atl_utils_hw_chip_features_init(struct aq_hw_s *self, u32 *p);
 
 int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self,
-                              struct hw_aq_atl_utils_mbox_header *pmbox);
+                              struct hw_atl_utils_mbox_header *pmbox);
 
 void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self,
-                                struct hw_aq_atl_utils_mbox *pmbox);
+                                struct hw_atl_utils_mbox *pmbox);
 
 void hw_atl_utils_mpi_set(struct aq_hw_s *self,
                          enum hal_atl_utils_fw_state_e state,
@@ -425,7 +425,7 @@ int hw_atl_utils_fw_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac);
 int hw_atl_utils_fw_rpc_call(struct aq_hw_s *self, unsigned int rpc_size);
 
 int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
-                            struct hw_aq_atl_utils_fw_rpc **rpc);
+                            struct hw_atl_utils_fw_rpc **rpc);
 
 extern const struct aq_fw_ops aq_fw_1x_ops;
 extern const struct aq_fw_ops aq_fw_2x_ops;
index 7410e28e5a1fd16d67f17e22a1212f73dc5b3598..c0568465e10b5c143466358cdc62392bbc09a2fb 100644 (file)
@@ -302,7 +302,7 @@ int aq_fw2x_update_stats(struct aq_hw_s *self)
 
 static int aq_fw2x_set_sleep_proxy(struct aq_hw_s *self, u8 *mac)
 {
-       struct hw_aq_atl_utils_fw_rpc *rpc = NULL;
+       struct hw_atl_utils_fw_rpc *rpc = NULL;
        struct offload_info *cfg = NULL;
        unsigned int rpc_size = 0U;
        u32 mpi_opts;
@@ -344,7 +344,7 @@ err_exit:
 
 static int aq_fw2x_set_wol_params(struct aq_hw_s *self, u8 *mac)
 {
-       struct hw_aq_atl_utils_fw_rpc *rpc = NULL;
+       struct hw_atl_utils_fw_rpc *rpc = NULL;
        struct fw2x_msg_wol *msg = NULL;
        u32 mpi_opts;
        int err = 0;
@@ -412,7 +412,7 @@ static int aq_fw2x_get_eee_rate(struct aq_hw_s *self, u32 *rate,
        u32 mpi_state;
        u32 caps_hi;
        int err = 0;
-       u32 addr = self->mbox_addr + offsetof(struct hw_aq_atl_utils_mbox, info) +
+       u32 addr = self->mbox_addr + offsetof(struct hw_atl_utils_mbox, info) +
                   offsetof(struct hw_aq_info, caps_hi);
 
        err = hw_atl_utils_fw_downld_dwords(self, addr, &caps_hi,