Page MenuHomeFreeBSD

D21239.diff
No OneTemporary

D21239.diff

Index: head/sys/dev/e1000/e1000_82540.c
===================================================================
--- head/sys/dev/e1000/e1000_82540.c
+++ head/sys/dev/e1000/e1000_82540.c
@@ -696,7 +696,7 @@
DEBUGFUNC("e1000_read_mac_addr");
- for (i = 0; i < ETH_ADDR_LEN; i += 2) {
+ for (i = 0; i < ETHER_ADDR_LEN; i += 2) {
offset = i >> 1;
ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);
if (ret_val) {
@@ -711,7 +711,7 @@
if (hw->bus.func == E1000_FUNC_1)
hw->mac.perm_addr[5] ^= 1;
- for (i = 0; i < ETH_ADDR_LEN; i++)
+ for (i = 0; i < ETHER_ADDR_LEN; i++)
hw->mac.addr[i] = hw->mac.perm_addr[i];
out:
Index: head/sys/dev/e1000/e1000_82541.c
===================================================================
--- head/sys/dev/e1000/e1000_82541.c
+++ head/sys/dev/e1000/e1000_82541.c
@@ -1285,7 +1285,7 @@
DEBUGFUNC("e1000_read_mac_addr");
- for (i = 0; i < ETH_ADDR_LEN; i += 2) {
+ for (i = 0; i < ETHER_ADDR_LEN; i += 2) {
offset = i >> 1;
ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);
if (ret_val) {
@@ -1296,7 +1296,7 @@
hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8);
}
- for (i = 0; i < ETH_ADDR_LEN; i++)
+ for (i = 0; i < ETHER_ADDR_LEN; i++)
hw->mac.addr[i] = hw->mac.perm_addr[i];
out:
Index: head/sys/dev/e1000/e1000_82542.c
===================================================================
--- head/sys/dev/e1000/e1000_82542.c
+++ head/sys/dev/e1000/e1000_82542.c
@@ -573,7 +573,7 @@
DEBUGFUNC("e1000_read_mac_addr");
- for (i = 0; i < ETH_ADDR_LEN; i += 2) {
+ for (i = 0; i < ETHER_ADDR_LEN; i += 2) {
offset = i >> 1;
ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);
if (ret_val) {
@@ -584,7 +584,7 @@
hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8);
}
- for (i = 0; i < ETH_ADDR_LEN; i++)
+ for (i = 0; i < ETHER_ADDR_LEN; i++)
hw->mac.addr[i] = hw->mac.perm_addr[i];
out:
Index: head/sys/dev/e1000/e1000_82543.c
===================================================================
--- head/sys/dev/e1000/e1000_82543.c
+++ head/sys/dev/e1000/e1000_82543.c
@@ -1574,7 +1574,7 @@
DEBUGFUNC("e1000_read_mac_addr");
- for (i = 0; i < ETH_ADDR_LEN; i += 2) {
+ for (i = 0; i < ETHER_ADDR_LEN; i += 2) {
offset = i >> 1;
ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);
if (ret_val) {
@@ -1589,7 +1589,7 @@
if (hw->bus.func == E1000_FUNC_1)
hw->mac.perm_addr[5] ^= 1;
- for (i = 0; i < ETH_ADDR_LEN; i++)
+ for (i = 0; i < ETHER_ADDR_LEN; i++)
hw->mac.addr[i] = hw->mac.perm_addr[i];
out:
Index: head/sys/dev/e1000/e1000_defines.h
===================================================================
--- head/sys/dev/e1000/e1000_defines.h
+++ head/sys/dev/e1000/e1000_defines.h
@@ -1206,10 +1206,6 @@
#define PCIE_LINK_SPEED_5000 0x02
#define PCIE_DEVICE_CONTROL2_16ms 0x0005
-#ifndef ETH_ADDR_LEN
-#define ETH_ADDR_LEN 6
-#endif
-
#define PHY_REVISION_MASK 0xFFFFFFF0
#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */
#define MAX_PHY_MULTI_PAGE_REG 0xF
Index: head/sys/dev/e1000/e1000_hw.h
===================================================================
--- head/sys/dev/e1000/e1000_hw.h
+++ head/sys/dev/e1000/e1000_hw.h
@@ -785,8 +785,8 @@
struct e1000_mac_info {
struct e1000_mac_operations ops;
- u8 addr[ETH_ADDR_LEN];
- u8 perm_addr[ETH_ADDR_LEN];
+ u8 addr[ETHER_ADDR_LEN];
+ u8 perm_addr[ETHER_ADDR_LEN];
enum e1000_mac_type type;
Index: head/sys/dev/e1000/e1000_ich8lan.c
===================================================================
--- head/sys/dev/e1000/e1000_ich8lan.c
+++ head/sys/dev/e1000/e1000_ich8lan.c
@@ -2780,7 +2780,7 @@
* SHRAL/H) and initial CRC values to the MAC
*/
for (i = 0; i < hw->mac.rar_entry_count; i++) {
- u8 mac_addr[ETH_ADDR_LEN] = {0};
+ u8 mac_addr[ETHER_ADDR_LEN] = {0};
u32 addr_high, addr_low;
addr_high = E1000_READ_REG(hw, E1000_RAH(i));
Index: head/sys/dev/e1000/e1000_mac.c
===================================================================
--- head/sys/dev/e1000/e1000_mac.c
+++ head/sys/dev/e1000/e1000_mac.c
@@ -371,7 +371,7 @@
void e1000_init_rx_addrs_generic(struct e1000_hw *hw, u16 rar_count)
{
u32 i;
- u8 mac_addr[ETH_ADDR_LEN] = {0};
+ u8 mac_addr[ETHER_ADDR_LEN] = {0};
DEBUGFUNC("e1000_init_rx_addrs_generic");
@@ -403,7 +403,7 @@
u32 i;
s32 ret_val;
u16 offset, nvm_alt_mac_addr_offset, nvm_data;
- u8 alt_mac_addr[ETH_ADDR_LEN];
+ u8 alt_mac_addr[ETHER_ADDR_LEN];
DEBUGFUNC("e1000_check_alt_mac_addr_generic");
@@ -440,7 +440,7 @@
if (hw->bus.func == E1000_FUNC_3)
nvm_alt_mac_addr_offset += E1000_ALT_MAC_ADDRESS_OFFSET_LAN3;
- for (i = 0; i < ETH_ADDR_LEN; i += 2) {
+ for (i = 0; i < ETHER_ADDR_LEN; i += 2) {
offset = nvm_alt_mac_addr_offset + (i >> 1);
ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);
if (ret_val) {
@@ -604,7 +604,7 @@
hash_bit = hash_value & 0x1F;
hw->mac.mta_shadow[hash_reg] |= (1 << hash_bit);
- mc_addr_list += (ETH_ADDR_LEN);
+ mc_addr_list += (ETHER_ADDR_LEN);
}
/* replace the entire MTA table */
Index: head/sys/dev/e1000/e1000_nvm.c
===================================================================
--- head/sys/dev/e1000/e1000_nvm.c
+++ head/sys/dev/e1000/e1000_nvm.c
@@ -1143,7 +1143,7 @@
for (i = 0; i < E1000_RAH_MAC_ADDR_LEN; i++)
hw->mac.perm_addr[i+4] = (u8)(rar_high >> (i*8));
- for (i = 0; i < ETH_ADDR_LEN; i++)
+ for (i = 0; i < ETHER_ADDR_LEN; i++)
hw->mac.addr[i] = hw->mac.perm_addr[i];
return E1000_SUCCESS;
Index: head/sys/dev/e1000/e1000_vf.c
===================================================================
--- head/sys/dev/e1000/e1000_vf.c
+++ head/sys/dev/e1000/e1000_vf.c
@@ -431,7 +431,7 @@
hash_value = e1000_hash_mc_addr_vf(hw, mc_addr_list);
DEBUGOUT1("Hash value = 0x%03X\n", hash_value);
hash_list[i] = hash_value & 0x0FFF;
- mc_addr_list += ETH_ADDR_LEN;
+ mc_addr_list += ETHER_ADDR_LEN;
}
e1000_write_msg_read_ack(hw, msgbuf, E1000_VFMAILBOX_SIZE);
@@ -517,7 +517,7 @@
{
int i;
- for (i = 0; i < ETH_ADDR_LEN; i++)
+ for (i = 0; i < ETHER_ADDR_LEN; i++)
hw->mac.addr[i] = hw->mac.perm_addr[i];
return E1000_SUCCESS;
Index: head/sys/dev/e1000/if_em.h
===================================================================
--- head/sys/dev/e1000/if_em.h
+++ head/sys/dev/e1000/if_em.h
@@ -340,7 +340,6 @@
#define EM_MSIX_MASK 0x01F00000 /* For 82574 use */
#define EM_MSIX_LINK 0x01000000 /* For 82574 use */
#define ETH_ZLEN 60
-#define ETH_ADDR_LEN 6
#define EM_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP) /* Offload bits in mbuf flag */
#define IGB_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP | \
CSUM_IP_SCTP | CSUM_IP6_UDP | CSUM_IP6_TCP | \
Index: head/sys/dev/e1000/if_em.c
===================================================================
--- head/sys/dev/e1000/if_em.c
+++ head/sys/dev/e1000/if_em.c
@@ -1002,7 +1002,7 @@
hw->mac.report_tx_early = 1;
/* Allocate multicast array memory. */
- adapter->mta = malloc(sizeof(u8) * ETH_ADDR_LEN *
+ adapter->mta = malloc(sizeof(u8) * ETHER_ADDR_LEN *
MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT);
if (adapter->mta == NULL) {
device_printf(dev, "Can not allocate multicast setup array\n");
@@ -1672,7 +1672,7 @@
if (cnt == MAX_NUM_MULTICAST_ADDRESSES)
return (1);
- bcopy(LLADDR(sdl), &mta[cnt * ETH_ADDR_LEN], ETH_ADDR_LEN);
+ bcopy(LLADDR(sdl), &mta[cnt * ETHER_ADDR_LEN], ETHER_ADDR_LEN);
return (1);
}
@@ -1696,7 +1696,7 @@
IOCTL_DEBUGOUT("em_set_multi: begin");
mta = adapter->mta;
- bzero(mta, sizeof(u8) * ETH_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES);
+ bzero(mta, sizeof(u8) * ETHER_ADDR_LEN * MAX_NUM_MULTICAST_ADDRESSES);
if (adapter->hw.mac.type == e1000_82542 &&
adapter->hw.revision_id == E1000_REVISION_2) {
Index: head/sys/dev/oce/oce_hw.c
===================================================================
--- head/sys/dev/oce/oce_hw.c
+++ head/sys/dev/oce/oce_hw.c
@@ -553,7 +553,7 @@
return (0);
bcopy(LLADDR(sdl), &req->params.req.mac[req->params.req.num_mac++],
- ETH_ADDR_LEN);
+ ETHER_ADDR_LEN);
return (1);
}
Index: head/sys/dev/oce/oce_if.h
===================================================================
--- head/sys/dev/oce/oce_if.h
+++ head/sys/dev/oce/oce_if.h
@@ -200,7 +200,6 @@
#define OCE_IF_CAPABILITIES_NONE 0
-#define ETH_ADDR_LEN 6
#define MAX_VLANFILTER_SIZE 64
#define MAX_VLANS 4096

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 21, 5:18 AM (22 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14755195
Default Alt Text
D21239.diff (8 KB)

Event Timeline