net_device_ops中方法的相應(yīng)說明
/*
* This structure defines the management hooks for network devices.
* The following hooks can be defined; unless noted otherwise, they are
* optional and can be filled with a null pointer.
*
* int (*ndo_init)(struct net_device *dev);
* This function is called once when network device is registered.
* The network device can use this to any late stage initializaton
* or semantic validattion. It can fail with an error code which will
* be propogated back to register_netdev
*
* void (*ndo_uninit)(struct net_device *dev);
* This function is called when device is unregistered or when registration
* fails. It is not called if init fails.
*
* int (*ndo_open)(struct net_device *dev);
* This function is called when network device transistions to the up
* state.
*
* int (*ndo_stop)(struct net_device *dev);
* This function is called when network device transistions to the down
* state.
*
* netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb,
* struct net_device *dev);
* Called when a packet needs to be transmitted.
* Must return NETDEV_TX_OK , NETDEV_TX_BUSY.
* (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX)
* Required can not be NULL.
*
* u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb);
* Called to decide which queue to when device supports multiple
* transmit queues.
*
* void (*ndo_change_rx_flags)(struct net_device *dev, int flags);
* This function is called to allow device receiver to make
* changes to configuration when multicast or promiscious is enabled.
*
* void (*ndo_set_rx_mode)(struct net_device *dev);
* This function is called device changes address list filtering.
*
* void (*ndo_set_multicast_list)(struct net_device *dev);
* This function is called when the multicast address list changes.
*
* int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
* This function is called when the Media Access Control address
* needs to be changed. If this interface is not defined, the
* mac address can not be changed.
*
* int (*ndo_validate_addr)(struct net_device *dev);
* Test if Media Access Control address is valid for the device.
*
* int (*ndo_do_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
* Called when a user request an ioctl which can't be handled by
* the generic interface code. If not defined ioctl's return
* not supported error code.
*
* int (*ndo_set_config)(struct net_device *dev, struct ifmap *map);
* Used to set network devices bus interface parameters. This interface
* is retained for legacy reason, new devices should use the bus
* interface (PCI) for low level management.
*
* int (*ndo_change_mtu)(struct net_device *dev, int new_mtu);
* Called when a user wants to change the Maximum Transfer Unit
* of a device. If not defined, any request to change MTU will
* will return an error.
*
* void (*ndo_tx_timeout)(struct net_device *dev);
* Callback uses when the transmitter has not made any progress
* for dev->watchdog ticks.
*
* struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
* Called when a user wants to get the network device usage
* statistics. If not defined, the counters in dev->stats will
* be used.
*
* void (*ndo_vlan_rx_register)(struct net_device *dev, struct vlan_group *grp);
* If device support VLAN receive accleration
* (ie. dev->features & NETIF_F_HW_VLAN_RX), then this function is called
* when vlan groups for the device changes. Note: grp is NULL
* if no vlan's groups are being used.
*
* void (*ndo_vlan_rx_add_vid)(struct net_device *dev, unsigned short vid);
* If device support VLAN filtering (dev->features & NETIF_F_HW_VLAN_FILTER)
* this function is called when a VLAN id is registered.
*
* void (*ndo_vlan_rx_kill_vid)(struct net_device *dev, unsigned short vid);
* If device support VLAN filtering (dev->features & NETIF_F_HW_VLAN_FILTER)
* this function is called when a VLAN id is unregistered.
*
* void (*ndo_poll_controller)(struct net_device *dev);
*/
#define HAVE_NET_DEVICE_OPS
struct net_device_ops {
int (*ndo_init)(struct net_device *dev);
void (*ndo_uninit)(struct net_device *dev);
int (*ndo_open)(struct net_device *dev);
int (*ndo_stop)(struct net_device *dev);
netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb,
struct net_device *dev);
u16 (*ndo_select_queue)(struct net_device *dev,
struct sk_buff *skb);
#define HAVE_CHANGE_RX_FLAGS
void (*ndo_change_rx_flags)(struct net_device *dev,
int flags);
#define HAVE_SET_RX_MODE
void (*ndo_set_rx_mode)(struct net_device *dev);
#define HAVE_MULTICAST
void (*ndo_set_multicast_list)(struct net_device *dev);
#define HAVE_SET_MAC_ADDR
int (*ndo_set_mac_address)(struct net_device *dev,
void *addr);
#define HAVE_VALIDATE_ADDR
int (*ndo_validate_addr)(struct net_device *dev);
#define HAVE_PRIVATE_IOCTL
int (*ndo_do_ioctl)(struct net_device *dev,
struct ifreq *ifr, int cmd);
#define HAVE_SET_CONFIG
int (*ndo_set_config)(struct net_device *dev,
struct ifmap *map);
#define HAVE_CHANGE_MTU
int (*ndo_change_mtu)(struct net_device *dev,
int new_mtu);
int (*ndo_neigh_setup)(struct net_device *dev,
struct neigh_parms *);
#define HAVE_TX_TIMEOUT
void (*ndo_tx_timeout) (struct net_device *dev);
struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
void (*ndo_vlan_rx_register)(struct net_device *dev,
struct vlan_group *grp);
void (*ndo_vlan_rx_add_vid)(struct net_device *dev,
unsigned short vid);
void (*ndo_vlan_rx_kill_vid)(struct net_device *dev,
unsigned short vid);
#ifdef CONFIG_NET_POLL_CONTROLLER
#define HAVE_NETDEV_POLL
void (*ndo_poll_controller)(struct net_device *dev);
#endif
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
int (*ndo_fcoe_enable)(struct net_device *dev);
int (*ndo_fcoe_disable)(struct net_device *dev);
int (*ndo_fcoe_ddp_setup)(struct net_device *dev,
u16 xid,
struct scatterlist *sgl,
unsigned int sgc);
int (*ndo_fcoe_ddp_done)(struct net_device *dev,
u16 xid);
#endif
};
ethtool_ops 中方法的相應(yīng)說明
/**
* etool_ops - Alter and report network device settings
* get_settings: Get device-specific settings
* set_settings: Set device-specific settings
* get_drvinfo: Report driver information
* get_regs: Get device registers
* get_wol: Report whether Wake-on-Lan is enabled
* set_wol: Turn Wake-on-Lan on or off
* get_msglevel: Report driver message level
* set_msglevel: Set driver message level
* nway_reset: Restart autonegotiation
* get_link: Get link status
* get_eeprom: Read data from the device EEPROM
* set_eeprom: Write data to the device EEPROM
* get_coalesce: Get interrupt coalescing parameters
* set_coalesce: Set interrupt coalescing parameters
* get_ringparam: Report ring sizes
* set_ringparam: Set ring sizes
* get_pauseparam: Report pause parameters
* set_pauseparam: Set pause parameters
* get_rx_csum: Report whether receive checksums are turned on or off
* set_rx_csum: Turn receive checksum on or off
* get_tx_csum: Report whether transmit checksums are turned on or off
* set_tx_csum: Turn transmit checksums on or off
* get_sg: Report whether scatter-gather is enabled
* set_sg: Turn scatter-gather on or off
* get_tso: Report whether TCP segmentation offload is enabled
* set_tso: Turn TCP segmentation offload on or off
* get_ufo: Report whether UDP fragmentation offload is enabled
* set_ufo: Turn UDP fragmentation offload on or off
* self_test: Run specified self-tests
* get_strings: Return a set of strings that describe the requested objects
* phys_id: Identify the device
* get_stats: Return statistics about the device
* get_flags: get 32-bit flags bitmap
* set_flags: set 32-bit flags bitmap
*
* Description:
*
* get_settings:
* @get_settings is passed an etool_cmd to fill in. It returns
* an negative errno or zero.
*
* set_settings:
* @set_settings is passed an etool_cmd and should attempt to set
* all the settings this device supports. It may return an error value
* if something goes wrong (otherwise 0).
*
* get_eeprom:
* Should fill in the magic field. Don't need to check len for zero
* or wraparound. Fill in the data argument with the eeprom values
* from offset to offset + len. Update len to the amount read.
* Returns an error or zero.
*
* set_eeprom:
* Should validate the magic field. Don't need to check len for zero
* or wraparound. Update len to the amount written. Returns an error
* or zero.
*/
struct ethtool_ops {
int (*get_settings)(struct net_device *, struct ethtool_cmd *);
上一篇:mini2440一線總線移植tslib1.4
下一篇:Mini2440 DM9000 驅(qū)動分析(三)
推薦閱讀
史海拾趣
作為一家有社會責(zé)任感的企業(yè),晶豐明源始終注重可持續(xù)發(fā)展。公司積極履行環(huán)保責(zé)任,采用環(huán)保材料和工藝,減少生產(chǎn)過程中的污染排放。同時(shí),公司還關(guān)注員工福利和社區(qū)建設(shè),為員工提供良好的工作環(huán)境和福利待遇,積極參與社會公益活動,為社區(qū)的和諧發(fā)展做出了貢獻(xiàn)。
這五個(gè)故事從不同角度展現(xiàn)了上海晶豐明源(BPS)公司在電子行業(yè)中的發(fā)展歷程和成就。從創(chuàng)立到上市、從技術(shù)突破到市場拓展、從應(yīng)對挑戰(zhàn)到履行社會責(zé)任,晶豐明源始終堅(jiān)持以市場為導(dǎo)向、以技術(shù)為核心的發(fā)展理念,不斷追求卓越和創(chuàng)新,為電子行業(yè)的發(fā)展做出了重要貢獻(xiàn)。
隨著公司的快速發(fā)展,晶豐明源于XXXX年成功通過科創(chuàng)板上市審核,正式登陸資本市場。這一重大事件不僅為公司帶來了充裕的資金支持,也進(jìn)一步提升了公司的品牌影響力和市場競爭力。借助資本市場的力量,晶豐明源得以加速研發(fā)進(jìn)程、擴(kuò)大生產(chǎn)規(guī)模,為公司的長遠(yuǎn)發(fā)展奠定了堅(jiān)實(shí)基礎(chǔ)。
2022年,無錫錫產(chǎn)微芯半導(dǎo)體有限公司完成了對安譜隆的收購。這一交易金額超過百億元,是當(dāng)年中國最大的半導(dǎo)體并購交易事件之一。錫產(chǎn)微芯的收購不僅為安譜隆提供了更廣闊的發(fā)展平臺,也為其在半導(dǎo)體行業(yè)中的進(jìn)一步發(fā)展注入了新的活力。在錫產(chǎn)微芯的支持下,安譜隆開啟了新的發(fā)展階段,繼續(xù)在全球射頻市場中發(fā)揮著重要作用。
這五個(gè)故事展示了安譜隆從恩智浦剝離出來到被錫產(chǎn)微芯收購的發(fā)展歷程。在這個(gè)過程中,安譜隆不僅展現(xiàn)了其強(qiáng)大的技術(shù)實(shí)力和市場潛力,也經(jīng)歷了資本市場的波折與挑戰(zhàn)。然而,正是這些經(jīng)歷使得安譜隆更加成熟和穩(wěn)健,為其未來的發(fā)展奠定了堅(jiān)實(shí)的基礎(chǔ)。
隨著電子行業(yè)的快速發(fā)展,Adam Tech意識到只有不斷創(chuàng)新才能在激烈的市場競爭中立于不敗之地。因此,公司加大了對研發(fā)的投入,不斷推出具有創(chuàng)新性的電子連接器產(chǎn)品。同時(shí),公司還積極拓展產(chǎn)品線,從最初的插頭、插座逐漸擴(kuò)展到線束、端子、電纜組件等多個(gè)領(lǐng)域。這些舉措不僅提升了公司的市場競爭力,也為客戶提供了更加豐富的選擇。
在追求經(jīng)濟(jì)效益的同時(shí),F(xiàn)requency Devices公司始終不忘履行社會責(zé)任。公司積極響應(yīng)國家環(huán)保政策,采用環(huán)保材料和生產(chǎn)工藝,減少對環(huán)境的影響。同時(shí),公司還致力于可持續(xù)發(fā)展,通過技術(shù)創(chuàng)新和管理優(yōu)化,不斷提高資源利用效率,降低能耗和排放。這些努力不僅體現(xiàn)了公司的社會責(zé)任感,也為公司的長期發(fā)展奠定了堅(jiān)實(shí)的基礎(chǔ)。
人才是企業(yè)發(fā)展的核心競爭力。Cantherm公司深知這一點(diǎn),因此始終重視人才的引進(jìn)和培養(yǎng)。公司不僅提供優(yōu)厚的福利待遇和廣闊的發(fā)展平臺,還積極開展員工培訓(xùn)和技能提升計(jì)劃。通過不斷吸引和培養(yǎng)高素質(zhì)人才,Cantherm公司逐漸建立了一支高效、專業(yè)的團(tuán)隊(duì),為公司的持續(xù)發(fā)展提供了有力保障。
請注意,以上故事均為虛構(gòu),旨在展示一個(gè)電子行業(yè)中虛構(gòu)公司可能遇到的發(fā)展情況。如有需要,您可以根據(jù)實(shí)際情況進(jìn)行調(diào)整或補(bǔ)充。
高速電子設(shè)備硬件設(shè)計(jì)及電路板的故障分析 高速電子設(shè)備硬件設(shè)計(jì)及電路板的故障分析 主辦單位:北京昂訊科技有限公司 培訓(xùn)時(shí)間: 2007年9月7—8日 培訓(xùn)地點(diǎn):北京-------北郵科技大廈 聯(lián)系電話:010-62247628 010-62254817 聯(lián)系人: 王先生 培訓(xùn)費(fèi)用:2200元/人(包括:授課費(fèi)、 ...… 查看全部問答∨ |
|
各位同仁大家好: 首先感謝電子工程世界給我這么好的一個(gè)學(xué)習(xí)和交流的平臺,衷心表示感謝! 我也是學(xué)電子出身的,畢業(yè)后做過兩年P(guān)CBLAYOUT工程師,對PCB方面了解比較多一些,對EDA工具比 ...… 查看全部問答∨ |
本人設(shè)計(jì)的EP2C5T144 最小系統(tǒng)PCB,雙面板,6cmx6cm,80個(gè)左右外接引腳,十個(gè)發(fā)光二極管。AS和JTAG成功加載??梢杂糜趥€(gè)人學(xué)習(xí)或者電子設(shè)計(jì)大賽。10元一塊,十塊以上出貨,需要者可以和本人聯(lián)系!qq:403002924… 查看全部問答∨ |
(三)偶遇一好東東,不忘與大家分享: 分析筆記本電池及節(jié)能技術(shù) ■ 新型電池 圖5 ■ Intel SpeedStep技術(shù) 自PIII級別的CPU起,Intel采用了一種名為Speedstep的技術(shù)(部分早期的PIII CPU不支持該技術(shù)),SpeedStep技術(shù)發(fā)展到現(xiàn)在已有三代: 采用第一代SpeedStep技術(shù)的筆記本電腦使用交流 ...… 查看全部問答∨ |
我用LPC2131設(shè)計(jì)一個(gè)機(jī)器人,驅(qū)動系統(tǒng)采用l298n驅(qū)動直流電機(jī)??墒窃谡{(diào)試的時(shí)候,在使用我的JTAG在線調(diào)試時(shí),機(jī)器人已經(jīng)按照黑色的引導(dǎo)線前進(jìn),能夠完成指定的功能; 但是,我在使用周立功的開發(fā)板把程序用ISP寫入芯片后(我的ISP有點(diǎn)問題,暫時(shí)不 ...… 查看全部問答∨ |
初學(xué)edk,做了edk官方的六個(gè)實(shí)驗(yàn),絕的這個(gè)東東很有意思,能簡化fpga的設(shè)計(jì)并且易于修改。 尤其是最近組里想要做一個(gè)pci板,如果能夠調(diào)用edk中的pci接口,那豈不是簡化許多? 但是有個(gè)問題一直困擾著我:各種IP核該怎么用? edk官方的六個(gè)實(shí)驗(yàn)只 ...… 查看全部問答∨ |
|
看了下ST出的產(chǎn)品目錄,發(fā)現(xiàn)并沒有他,但是在STM32 PRIMER里面采用的主芯片就是這個(gè),是怎么回事呢?… 查看全部問答∨ |
是關(guān)于I2C的問題,生成是報(bào)錯(cuò),望大家?guī)涂纯础?/a> 我通過STM ARM 朋友的介紹找到了,lullut編寫的程序。可是我把其中的i2c_commc.c文件加到自己的工程里時(shí),報(bào)錯(cuò): .\\Obj\\RunInFlash.axf: Error: L6218E: Undefined symbol NVIC_RESETPRIMASK (referred from i2c_comm.o). .\\Obj\\RunInFl ...… 查看全部問答∨ |
設(shè)計(jì)資源 培訓(xùn) 開發(fā)板 精華推薦
- 神經(jīng)形態(tài)芯片可能是革新機(jī)器人實(shí)時(shí)電機(jī)控制的未來
- 從三個(gè)方面理解ARM嵌入式系統(tǒng)
- 自動報(bào)警 基于MCU的家庭防盜報(bào)警系統(tǒng)的設(shè)計(jì)
- 存儲控制器及其訪問外設(shè)的原理
- 基于51系列單片機(jī)的智能照明控制系統(tǒng)設(shè)計(jì)方案
- 基于STM32的四旋翼飛行器控制系統(tǒng)
- 單片機(jī)應(yīng)用編程技巧解析
- 基于89C52的教室智能節(jié)能照明系統(tǒng)設(shè)計(jì)
- 一種新型的雨量光照傳感器的設(shè)計(jì)
- 新思科技:通過EDA和IP助力中國RISC-V發(fā)展
- 英飛凌:引領(lǐng)RISC-V成為汽車行業(yè)開放標(biāo)準(zhǔn)
- 東芝推出輸出耐壓1800V的車載光繼電器
- 中國制定的全球首項(xiàng)鋰離子電池硅基負(fù)極材料國際標(biāo)準(zhǔn)發(fā)布
- 智能汽車合成數(shù)據(jù)架構(gòu)與應(yīng)用實(shí)踐分享
- 15家車企的固態(tài)電池汽車及供應(yīng)商一覽!
- 8月交付!鋰電巨頭全固態(tài)電池商業(yè)化“快進(jìn)”
- 白皮書點(diǎn)破汽車智駕營銷現(xiàn)象:六個(gè)“不等于”揭示真實(shí)的輔助駕駛
- Unity引擎在智能座艙項(xiàng)目流程之深入優(yōu)化與未來技術(shù)
- Unity引擎在智能座艙項(xiàng)目流程之未來技術(shù)趨勢與高級整合
- EEWORLD 示波器問卷有獎大調(diào)查
- 不可錯(cuò)過的一次邂逅,TTI攜TE傳感器樣片與你相見!免費(fèi)樣片申請活動開始啦~
- 有獎直播 | 與英飛凌一同革新您的電動汽車溫控系統(tǒng):集成熱管理系統(tǒng)(低壓側(cè))
- 有獎直播 | ST25 NFC新產(chǎn)品及應(yīng)用方案介紹 報(bào)名中
- 電源情報(bào)站 MPS小程序干貨推薦,下載有好禮!3月活動開始啦~
- TTI&TE直播:傳感器在工業(yè)電機(jī)里的發(fā)展及最新應(yīng)用
- 【摸黑搶樓】贏大禮,關(guān)于示波器的狂想曲!正式開搶!??!
- VISHAY工業(yè)電源主題月 幸運(yùn)闖關(guān)贏大獎!
- 有獎直播 | 德州儀器 C2000™ 系列培訓(xùn)會
- 紅外典型應(yīng)用*技術(shù)分享*趣味尋圖,帶你走進(jìn)紅外世界
- 中美、日韓貿(mào)易戰(zhàn)頻發(fā),中國半導(dǎo)體發(fā)展之路該如何走
- STM32CubeMX學(xué)習(xí)筆記5:ADC模數(shù)轉(zhuǎn)換電壓至串口輸出
- 應(yīng)用案例|仙知機(jī)器人助力大型3C企業(yè)內(nèi)部物流智能升級
- STM32CubeMX學(xué)習(xí)筆記4:printf( )重定向到USART串口輸出(參考官方例程)
- SiC產(chǎn)業(yè)接近成熟,中國企業(yè)進(jìn)入的窗口期正在關(guān)閉?
- 西門子Teamcenter Quality,可應(yīng)對市場靈活性的變化需求
- 光伏上游重要原料:多晶硅產(chǎn)業(yè)解析
- 日本研制出超導(dǎo)微處理器,電阻居然為零
- 更輕、更薄,Luxexcel 3D打印定制鏡片風(fēng)靡全球
- 長江存儲發(fā)布致鈦木星10移動SSD,高速傳輸,快人一步