Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[linux-2.6-microblaze.git] / drivers / net / ethernet / hisilicon / hns3 / hns3pf / hclge_main.h
index 59b8243..88f6c4c 100644 (file)
 
 /* Factor used to calculate offset and bitmap of VF num */
 #define HCLGE_VF_NUM_PER_CMD           64
-#define HCLGE_VF_NUM_PER_BYTE          8
 
 enum HLCGE_PORT_TYPE {
        HOST_PORT,
@@ -226,8 +225,6 @@ enum hclge_evt_cause {
        HCLGE_VECTOR0_EVENT_OTHER,
 };
 
-#define HCLGE_MPF_ENBALE 1
-
 enum HCLGE_MAC_SPEED {
        HCLGE_MAC_SPEED_UNKNOWN = 0,            /* unknown */
        HCLGE_MAC_SPEED_10M     = 10,           /* 10 Mbps */
@@ -258,6 +255,7 @@ struct hclge_mac {
        u8 support_autoneg;
        u8 speed_type;  /* 0: sfp speed, 1: active speed */
        u32 speed;
+       u32 max_speed;
        u32 speed_ability; /* speed ability supported by current media */
        u32 module_type; /* sub media type, e.g. kr/cr/sr/lr */
        u32 fec_mode; /* active fec mode */
@@ -655,7 +653,6 @@ struct hclge_rst_stats {
        u32 hw_reset_done_cnt;  /* the number of HW reset has completed */
        u32 pf_rst_cnt;         /* the number of PF reset */
        u32 flr_rst_cnt;        /* the number of FLR */
-       u32 core_rst_cnt;       /* the number of CORE reset */
        u32 global_rst_cnt;     /* the number of GLOBAL */
        u32 imp_rst_cnt;        /* the number of IMP reset */
        u32 reset_cnt;          /* the number of reset */
@@ -886,6 +883,15 @@ struct hclge_port_base_vlan_config {
        struct hclge_vlan_info vlan_info;
 };
 
+struct hclge_vf_info {
+       int link_state;
+       u8 mac[ETH_ALEN];
+       u32 spoofchk;
+       u32 max_tx_rate;
+       u32 trusted;
+       u16 promisc_enable;
+};
+
 struct hclge_vport {
        u16 alloc_tqps; /* Allocated Tx/Rx queues */
 
@@ -917,15 +923,15 @@ struct hclge_vport {
        unsigned long state;
        unsigned long last_active_jiffies;
        u32 mps; /* Max packet size */
+       struct hclge_vf_info vf_info;
 
        struct list_head uc_mac_list;   /* Store VF unicast table */
        struct list_head mc_mac_list;   /* Store VF multicast table */
        struct list_head vlan_list;     /* Store VF vlan table */
 };
 
-void hclge_promisc_param_init(struct hclge_promisc_param *param, bool en_uc,
-                             bool en_mc, bool en_bc, int vport_id);
-
+int hclge_set_vport_promisc_mode(struct hclge_vport *vport, bool en_uc_pmc,
+                                bool en_mc_pmc, bool en_bc_pmc);
 int hclge_add_uc_addr_common(struct hclge_vport *vport,
                             const unsigned char *addr);
 int hclge_rm_uc_addr_common(struct hclge_vport *vport,
@@ -994,4 +1000,6 @@ int hclge_query_bd_num_cmd_send(struct hclge_dev *hdev,
                                struct hclge_desc *desc);
 void hclge_report_hw_error(struct hclge_dev *hdev,
                           enum hnae3_hw_error_type type);
+void hclge_inform_vf_promisc_info(struct hclge_vport *vport);
+void hclge_dbg_dump_rst_info(struct hclge_dev *hdev);
 #endif