39 #define E1000_FACTPS_MNGCG 0x20000000
42 #define E1000_IAMT_SIGNATURE 0x544D4149
60 for (i = 0; i <
length; i++)
81 if (!hw->
mac.arc_subsystem_valid) {
82 e_dbg(
"ARC subsystem not valid.\n");
89 e_dbg(
"E1000_HOST_EN bit disabled.\n");
100 if (i == E1000_MNG_DHCP_COMMAND_TIMEOUT) {
101 e_dbg(
"Previous command timeout failed .\n");
138 hw->
mac.tx_pkt_filtering =
true;
141 if (!hw->
mac.ops.check_mng_mode(hw)) {
142 hw->
mac.tx_pkt_filtering =
false;
143 return hw->
mac.tx_pkt_filtering;
150 ret_val = e1000_mng_enable_host_if(hw);
152 hw->
mac.tx_pkt_filtering =
false;
153 return hw->
mac.tx_pkt_filtering;
159 for (i = 0; i <
len; i++)
164 csum = e1000_calculate_checksum((
u8 *)hdr,
172 hw->
mac.tx_pkt_filtering =
true;
173 return hw->
mac.tx_pkt_filtering;
178 hw->
mac.tx_pkt_filtering =
false;
180 return hw->
mac.tx_pkt_filtering;
190 static s32 e1000_mng_write_cmd_header(
struct e1000_hw *hw,
197 hdr->
checksum = e1000_calculate_checksum((
u8 *)hdr, length);
201 for (i = 0; i <
length; i++) {
227 u16 remaining,
i,
j, prev_bytes;
235 prev_bytes = offset & 0x3;
240 for (j = prev_bytes; j <
sizeof(
u32); j++) {
241 *(tmp +
j) = *bufptr++;
245 length -= j - prev_bytes;
249 remaining = length & 0x3;
259 for (i = 0; i <
length; i++) {
260 for (j = 0; j <
sizeof(
u32); j++) {
261 *(tmp +
j) = *bufptr++;
268 for (j = 0; j <
sizeof(
u32); j++) {
270 *(tmp +
j) = *bufptr++;
303 ret_val = e1000_mng_enable_host_if(hw);
308 ret_val = e1000_mng_host_if_write(hw, buffer, length,
314 ret_val = e1000_mng_write_cmd_header(hw, &hdr);
342 if (hw->
mac.has_fwsm) {
344 factps =
er32(FACTPS);
354 factps =
er32(FACTPS);