Commit 270a71e6 authored by Jiawen Wu's avatar Jiawen Wu Committed by Jakub Kicinski

net: txgbe: Remove structure txgbe_adapter

Move the total private structure to libwx.
Signed-off-by: default avatarJiawen Wu <jiawenwu@trustnetic.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9607a3e6
......@@ -802,7 +802,7 @@ static int wx_del_mac_filter(struct wx *wx, u8 *addr, u16 pool)
**/
int wx_set_mac(struct net_device *netdev, void *p)
{
struct wx *wx = container_of(&netdev, struct wx, netdev);
struct wx *wx = netdev_priv(netdev);
struct sockaddr *addr = p;
int retval;
......
......@@ -316,7 +316,9 @@ struct wx {
u8 revision_id;
u16 oem_ssid;
u16 oem_svid;
u16 msg_enable;
bool adapter_stopped;
char eeprom_id[32];
enum wx_reset_type reset_type;
};
......
......@@ -253,25 +253,22 @@ int txgbe_validate_eeprom_checksum(struct wx *wx, u16 *checksum_val)
return status;
}
static void txgbe_reset_misc(struct txgbe_adapter *adapter)
static void txgbe_reset_misc(struct wx *wx)
{
struct wx *wx = &adapter->wx;
wx_reset_misc(wx);
txgbe_init_thermal_sensor_thresh(wx);
}
/**
* txgbe_reset_hw - Perform hardware reset
* @adapter: pointer to adapter structure
* @wx: pointer to wx structure
*
* Resets the hardware by resetting the transmit and receive units, masks
* and clears all interrupts, perform a PHY reset, and perform a link (MAC)
* reset.
**/
int txgbe_reset_hw(struct txgbe_adapter *adapter)
int txgbe_reset_hw(struct wx *wx)
{
struct wx *wx = &adapter->wx;
int status;
/* Call adapter stop to disable tx/rx and clear interrupts */
......@@ -289,7 +286,7 @@ int txgbe_reset_hw(struct txgbe_adapter *adapter)
if (status != 0)
return status;
txgbe_reset_misc(adapter);
txgbe_reset_misc(wx);
/* Store the permanent mac address */
wx_get_mac_addr(wx, wx->mac.perm_addr);
......
......@@ -6,6 +6,6 @@
int txgbe_read_pba_string(struct wx *wx, u8 *pba_num, u32 pba_num_size);
int txgbe_validate_eeprom_checksum(struct wx *wx, u16 *checksum_val);
int txgbe_reset_hw(struct txgbe_adapter *adapter);
int txgbe_reset_hw(struct wx *wx);
#endif /* _TXGBE_HW_H_ */
......@@ -77,18 +77,6 @@
#define TXGBE_SP_RAR_ENTRIES 128
#define TXGBE_SP_MC_TBL_SIZE 128
/* board specific private data structure */
struct txgbe_adapter {
u8 __iomem *io_addr;
/* OS defined structs */
struct net_device *netdev;
struct pci_dev *pdev;
struct wx wx;
u16 msg_enable;
char eeprom_id[32];
};
extern char txgbe_driver_name[];
#endif /* _TXGBE_TYPE_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment