📄 e1000_api.c
字号:
{ if (hw->func.clear_vfta) hw->func.clear_vfta (hw);}/** * e1000_write_vfta - Write value to VLAN filter table * @hw: pointer to the HW structure * @offset: the 32-bit offset in which to write the value to. * @value: the 32-bit value to write at location offset. * * This writes a 32-bit value to a 32-bit offset in the VLAN filter * table. This is a function pointer entry point called by drivers. **/void e1000_write_vfta(struct e1000_hw *hw, u32 offset, u32 value){ if (hw->func.write_vfta) hw->func.write_vfta(hw, offset, value);}/** * e1000_update_mc_addr_list - Update Multicast addresses * @hw: pointer to the HW structure * @mc_addr_list: array of multicast addresses to program * @mc_addr_count: number of multicast addresses to program * @rar_used_count: the first RAR register free to program * @rar_count: total number of supported Receive Address Registers * * Updates the Receive Address Registers and Multicast Table Array. * The caller must have a packed mc_addr_list of multicast addresses. * The parameter rar_count will usually be hw->mac.rar_entry_count * unless there are workarounds that change this. Currently no func pointer * exists and all implementations are handled in the generic version of this * function. **/void e1000_update_mc_addr_list(struct e1000_hw *hw, u8 *mc_addr_list, u32 mc_addr_count, u32 rar_used_count, u32 rar_count){ if (hw->func.update_mc_addr_list) hw->func.update_mc_addr_list(hw, mc_addr_list, mc_addr_count, rar_used_count, rar_count);}/** * e1000_force_mac_fc - Force MAC flow control * @hw: pointer to the HW structure * * Force the MAC's flow control settings. Currently no func pointer exists * and all implementations are handled in the generic version of this * function. **/s32 e1000_force_mac_fc(struct e1000_hw *hw){ return e1000_force_mac_fc_generic(hw);}/** * e1000_check_for_link - Check/Store link connection * @hw: pointer to the HW structure * * This checks the link condition of the adapter and stores the * results in the hw->mac structure. This is a function pointer entry * point called by drivers. **/s32 e1000_check_for_link(struct e1000_hw *hw){ if (hw->func.check_for_link) return hw->func.check_for_link(hw); return -E1000_ERR_CONFIG;}/** * e1000_check_mng_mode - Check management mode * @hw: pointer to the HW structure * * This checks if the adapter has manageability enabled. * This is a function pointer entry point called by drivers. **/bool e1000_check_mng_mode(struct e1000_hw *hw){ if (hw->func.check_mng_mode) return hw->func.check_mng_mode(hw); return FALSE;}/** * e1000_mng_write_dhcp_info - Writes DHCP info to host interface * @hw: pointer to the HW structure * @buffer: pointer to the host interface * @length: size of the buffer * * Writes the DHCP information to the host interface. **/s32 e1000_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length){ return e1000_mng_write_dhcp_info_generic(hw, buffer, length);}/** * e1000_reset_hw - Reset hardware * @hw: pointer to the HW structure * * This resets the hardware into a known state. This is a function pointer * entry point called by drivers. **/s32 e1000_reset_hw(struct e1000_hw *hw){ if (hw->func.reset_hw) return hw->func.reset_hw(hw); return -E1000_ERR_CONFIG;}/** * e1000_init_hw - Initialize hardware * @hw: pointer to the HW structure * * This inits the hardware readying it for operation. This is a function * pointer entry point called by drivers. **/s32 e1000_init_hw(struct e1000_hw *hw){ if (hw->func.init_hw) return hw->func.init_hw(hw); return -E1000_ERR_CONFIG;}/** * e1000_setup_link - Configures link and flow control * @hw: pointer to the HW structure * * This configures link and flow control settings for the adapter. This * is a function pointer entry point called by drivers. While modules can * also call this, they probably call their own version of this function. **/s32 e1000_setup_link(struct e1000_hw *hw){ if (hw->func.setup_link) return hw->func.setup_link(hw); return -E1000_ERR_CONFIG;}/** * e1000_get_speed_and_duplex - Returns current speed and duplex * @hw: pointer to the HW structure * @speed: pointer to a 16-bit value to store the speed * @duplex: pointer to a 16-bit value to store the duplex. * * This returns the speed and duplex of the adapter in the two 'out' * variables passed in. This is a function pointer entry point called * by drivers. **/s32 e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed, u16 *duplex){ if (hw->func.get_link_up_info) return hw->func.get_link_up_info(hw, speed, duplex); return -E1000_ERR_CONFIG;}/** * e1000_setup_led - Configures SW controllable LED * @hw: pointer to the HW structure * * This prepares the SW controllable LED for use and saves the current state * of the LED so it can be later restored. This is a function pointer entry * point called by drivers. **/s32 e1000_setup_led(struct e1000_hw *hw){ if (hw->func.setup_led) return hw->func.setup_led(hw); return E1000_SUCCESS;}/** * e1000_cleanup_led - Restores SW controllable LED * @hw: pointer to the HW structure * * This restores the SW controllable LED to the value saved off by * e1000_setup_led. This is a function pointer entry point called by drivers. **/s32 e1000_cleanup_led(struct e1000_hw *hw){ if (hw->func.cleanup_led) return hw->func.cleanup_led(hw); return E1000_SUCCESS;}/** * e1000_blink_led - Blink SW controllable LED * @hw: pointer to the HW structure * * This starts the adapter LED blinking. Request the LED to be setup first * and cleaned up after. This is a function pointer entry point called by * drivers. **/s32 e1000_blink_led(struct e1000_hw *hw){ if (hw->func.blink_led) return hw->func.blink_led(hw); return E1000_SUCCESS;}/** * e1000_led_on - Turn on SW controllable LED * @hw: pointer to the HW structure * * Turns the SW defined LED on. This is a function pointer entry point * called by drivers. **/s32 e1000_led_on(struct e1000_hw *hw){ if (hw->func.led_on) return hw->func.led_on(hw); return E1000_SUCCESS;}/** * e1000_led_off - Turn off SW controllable LED * @hw: pointer to the HW structure * * Turns the SW defined LED off. This is a function pointer entry point * called by drivers. **/s32 e1000_led_off(struct e1000_hw *hw){ if (hw->func.led_off) return hw->func.led_off(hw); return E1000_SUCCESS;}/** * e1000_reset_adaptive - Reset adaptive IFS * @hw: pointer to the HW structure * * Resets the adaptive IFS. Currently no func pointer exists and all * implementations are handled in the generic version of this function. **/void e1000_reset_adaptive(struct e1000_hw *hw){ e1000_reset_adaptive_generic(hw);}/** * e1000_update_adaptive - Update adaptive IFS * @hw: pointer to the HW structure * * Updates adapter IFS. Currently no func pointer exists and all * implementations are handled in the generic version of this function. **/void e1000_update_adaptive(struct e1000_hw *hw){ e1000_update_adaptive_generic(hw);}/** * e1000_disable_pcie_master - Disable PCI-Express master access * @hw: pointer to the HW structure * * Disables PCI-Express master access and verifies there are no pending * requests. Currently no func pointer exists and all implementations are * handled in the generic version of this function. **/s32 e1000_disable_pcie_master(struct e1000_hw *hw){ return e1000_disable_pcie_master_generic(hw);}/** * e1000_config_collision_dist - Configure collision distance * @hw: pointer to the HW structure * * Configures the collision distance to the default value and is used * during link setup. **/void e1000_config_collision_dist(struct e1000_hw *hw){ if (hw->func.config_collision_dist) hw->func.config_collision_dist(hw);}/** * e1000_rar_set - Sets a receive address register * @hw: pointer to the HW structure * @addr: address to set the RAR to * @index: the RAR to set * * Sets a Receive Address Register (RAR) to the specified address. **/void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index){ if (hw->func.rar_set) hw->func.rar_set(hw, addr, index);}/** * e1000_validate_mdi_setting - Ensures valid MDI/MDIX SW state * @hw: pointer to the HW structure * * Ensures that the MDI/MDIX SW state is valid. **/s32 e1000_validate_mdi_setting(struct e1000_hw *hw){ if (hw->func.validate_mdi_setting) return hw->func.validate_mdi_setting(hw); return E1000_SUCCESS;}/** * e1000_mta_set - Sets multicast table bit * @hw: pointer to the HW structure * @hash_value: Multicast hash value. * * This sets the bit in the multicast table corresponding to the * hash value. This is a function pointer entry point called by drivers. **/void e1000_mta_set(struct e1000_hw *hw, u32 hash_value){ if (hw->func.mta_set) hw->func.mta_set(hw, hash_value);}/** * e1000_hash_mc_addr - Determines address location in multicast table * @hw: pointer to the HW structure * @mc_addr: Multicast address to hash. * * This hashes an address to determine its location in the multicast * table. Currently no func pointer exists and all implementations * are handled in the generic version of this function. **/u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr){ return e1000_hash_mc_addr_generic(hw, mc_addr);}/** * e1000_enable_tx_pkt_filtering - Enable packet filtering on TX * @hw: pointer to the HW structure * * Enables packet filtering on transmit packets if manageability is enabled * and host interface is enabled. * Currently no func pointer exists and all implementations are handled in the * generic version of this function. **/bool e1000_enable_tx_pkt_filtering(struct e1000_hw *hw){ return e1000_enable_tx_pkt_filtering_generic(hw);}/** * e1000_mng_host_if_write - Writes to the manageability host interface * @hw: pointer to the HW structure * @buffer: pointer to the host interface buffer * @length: size of the buffer * @offset: location in the buffer to write to * @sum: sum of the data (not checksum) * * This function writes the buffer content at the offset given on the host if. * It also does alignment considerations to do the writes in most efficient * way. Also fills up the sum of the buffer in *buffer parameter. **/s32 e1000_mng_host_if_write(struct e1000_hw * hw, u8 *buffer, u16 length, u16 offset, u8 *sum){ if (hw->func.mng_host_if_write) return hw->func.mng_host_if_write(hw, buffer, length, offset, sum); return E1000_NOT_IMPLEMENTED;}/**
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -