Changeset cfb79747 in mainline for uspace/drv/nic/rtl8139/driver.h


Ignore:
Timestamp:
2012-02-14T22:06:15Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a31aad1
Parents:
199112e4 (diff), e10d41a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8139/driver.h

    r199112e4 rcfb79747  
    3030#define RTL8139_DRIVER_H_
    3131
     32#include <sys/types.h>
     33#include <stdint.h>
    3234#include "defs.h"
    3335#include "general.h"
    34 #include <sys/types.h>
    35 #include <stdint.h>
    3636
    3737/** The driver name */
    38 #define NAME "rtl8139"
     38#define NAME  "rtl8139"
     39
    3940/** Transmittion buffers count */
    40 #define TX_BUFF_COUNT 4
    41 /** Size of buffer for one packet
    42  *  - 2kB
    43  */
    44 #define TX_BUFF_SIZE (2 * 1024)
    45 /** Count of pages to allocate for TxBuffers */
    46 #define TX_PAGES 2
     41#define TX_BUFF_COUNT  4
     42
     43/** Size of buffer for one frame (2kB) */
     44#define TX_BUFF_SIZE  (2 * 1024)
     45
     46/** Number of pages to allocate for TxBuffers */
     47#define TX_PAGES  2
    4748
    4849/** Size of the CRC after the received frame in the receiver buffer */
    49 #define RTL8139_CRC_SIZE 4
    50 
    51 /** The default mode of accepting unicast packets */
    52 #define RTL8139_RCR_UCAST_DEFAULT RCR_ACCEPT_PHYS_MATCH
    53 /** The default mode of accepting multicast packets */
    54 #define RTL8139_RCR_MCAST_DEFAULT 0
    55 /** The default mode of accepting broadcast packets */
    56 #define RTL8139_RCR_BCAST_DEFAULT RCR_ACCEPT_BROADCAST
    57 /** The default mode of accepting defect packets */
    58 #define RTL8139_RCR_DEFECT_DEFAULT 0
     50#define RTL8139_CRC_SIZE  4
     51
     52/** The default mode of accepting unicast frames */
     53#define RTL8139_RCR_UCAST_DEFAULT  RCR_ACCEPT_PHYS_MATCH
     54
     55/** The default mode of accepting multicast frames */
     56#define RTL8139_RCR_MCAST_DEFAULT  0
     57
     58/** The default mode of accepting broadcast frames */
     59#define RTL8139_RCR_BCAST_DEFAULT  RCR_ACCEPT_BROADCAST
     60
     61/** The default mode of accepting defect frames */
     62#define RTL8139_RCR_DEFECT_DEFAULT  0
    5963
    6064/** Mask for accepting all multicast */
    61 #define RTL8139_MCAST_MASK_PROMISC UINT64_MAX
    62 
    63 /** Data  */
     65#define RTL8139_MCAST_MASK_PROMISC  UINT64_MAX
     66
     67/** Data */
    6468struct rtl8139_rcr_data {
    6569        /** Configuration part of RCR */
     
    112116        size_t tx_used;
    113117
    114         /** Buffer for receiving packets */
     118        /** Buffer for receiving frames */
    115119        void *rx_buff_phys;
    116120        void *rx_buff_virt;
     
    134138
    135139        /** Version of RT8139 controller */
    136         enum rtl8139_version_id hw_version;
     140        rtl8139_version_id_t hw_version;
    137141} rtl8139_t;
    138 
    139142
    140143/* ***** Pointers casting - for both amd64 and ia32 ***** */
     
    160163 */
    161164#define IOADDR_TO_PTR(ioaddr) ((void*)((size_t)(ioaddr)))
    162 
    163 
    164165
    165166/* ***** Bit operation macros ***** */
     
    177178 * @return New value
    178179 */
    179 #define bit_set_part_g( src, value, mask, type ) \
     180#define bit_set_part_g(src, value, mask, type) \
    180181        ((type)(((src) & ~((type)(mask))) | ((value) & (type)(mask))))
    181182
     
    237238        bit_set_part_32(tsd_value, (size) << TSD_SIZE_SHIFT, TSD_SIZE_MASK << TSD_SIZE_SHIFT)
    238239
    239 
    240240#endif
Note: See TracChangeset for help on using the changeset viewer.