aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/benet/be.h')
-rw-r--r--drivers/net/benet/be.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index add0b93350dd..ed709a5d07d7 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -225,6 +225,10 @@ struct be_rx_obj {
225 u32 cache_line_barrier[15]; 225 u32 cache_line_barrier[15];
226}; 226};
227 227
228struct be_drv_stats {
229 u8 be_on_die_temperature;
230};
231
228struct be_vf_cfg { 232struct be_vf_cfg {
229 unsigned char vf_mac_addr[ETH_ALEN]; 233 unsigned char vf_mac_addr[ETH_ALEN];
230 u32 vf_if_handle; 234 u32 vf_if_handle;
@@ -234,6 +238,7 @@ struct be_vf_cfg {
234}; 238};
235 239
236#define BE_INVALID_PMAC_ID 0xffffffff 240#define BE_INVALID_PMAC_ID 0xffffffff
241
237struct be_adapter { 242struct be_adapter {
238 struct pci_dev *pdev; 243 struct pci_dev *pdev;
239 struct net_device *netdev; 244 struct net_device *netdev;
@@ -269,6 +274,7 @@ struct be_adapter {
269 u32 big_page_size; /* Compounded page size shared by rx wrbs */ 274 u32 big_page_size; /* Compounded page size shared by rx wrbs */
270 275
271 u8 msix_vec_next_idx; 276 u8 msix_vec_next_idx;
277 struct be_drv_stats drv_stats;
272 278
273 struct vlan_group *vlan_grp; 279 struct vlan_group *vlan_grp;
274 u16 vlans_added; 280 u16 vlans_added;
@@ -281,6 +287,7 @@ struct be_adapter {
281 struct be_dma_mem stats_cmd; 287 struct be_dma_mem stats_cmd;
282 /* Work queue used to perform periodic tasks like getting statistics */ 288 /* Work queue used to perform periodic tasks like getting statistics */
283 struct delayed_work work; 289 struct delayed_work work;
290 u16 work_counter;
284 291
285 /* Ethtool knobs and info */ 292 /* Ethtool knobs and info */
286 bool rx_csum; /* BE card must perform rx-checksumming */ 293 bool rx_csum; /* BE card must perform rx-checksumming */
@@ -298,7 +305,7 @@ struct be_adapter {
298 u32 rx_fc; /* Rx flow control */ 305 u32 rx_fc; /* Rx flow control */
299 u32 tx_fc; /* Tx flow control */ 306 u32 tx_fc; /* Tx flow control */
300 bool ue_detected; 307 bool ue_detected;
301 bool stats_ioctl_sent; 308 bool stats_cmd_sent;
302 int link_speed; 309 int link_speed;
303 u8 port_type; 310 u8 port_type;
304 u8 transceiver; 311 u8 transceiver;
@@ -311,6 +318,8 @@ struct be_adapter {
311 struct be_vf_cfg vf_cfg[BE_MAX_VF]; 318 struct be_vf_cfg vf_cfg[BE_MAX_VF];
312 u8 is_virtfn; 319 u8 is_virtfn;
313 u32 sli_family; 320 u32 sli_family;
321 u8 hba_port_num;
322 u16 pvid;
314}; 323};
315 324
316#define be_physfn(adapter) (!adapter->is_virtfn) 325#define be_physfn(adapter) (!adapter->is_virtfn)
@@ -450,9 +459,8 @@ static inline void be_vf_eth_addr_generate(struct be_adapter *adapter, u8 *mac)
450 mac[5] = (u8)(addr & 0xFF); 459 mac[5] = (u8)(addr & 0xFF);
451 mac[4] = (u8)((addr >> 8) & 0xFF); 460 mac[4] = (u8)((addr >> 8) & 0xFF);
452 mac[3] = (u8)((addr >> 16) & 0xFF); 461 mac[3] = (u8)((addr >> 16) & 0xFF);
453 mac[2] = 0xC9; 462 /* Use the OUI from the current MAC address */
454 mac[1] = 0x00; 463 memcpy(mac, adapter->netdev->dev_addr, 3);
455 mac[0] = 0x00;
456} 464}
457 465
458extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm, 466extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,