Changeset 1b20da0 in mainline for uspace/drv/nic


Ignore:
Timestamp:
2018-02-28T17:52:03Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3061bc1
Parents:
df6ded8
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
Message:

style: Remove trailing whitespace on non-empty lines, in certain file types.

Command used: tools/srepl '\([^[:space:]]\)\s\+$' '\1' -- *.c *.h *.py *.sh *.s *.S *.ag

Location:
uspace/drv/nic
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/ar9271/ar9271.c

    rdf6ded8 r1b20da0  
    381381                rate_msg.legacy_rates_count = ARRAY_SIZE(ieee80211bg_data_rates);
    382382                memcpy(&rate_msg.legacy_rates,
    383                     ieee80211bg_data_rates, 
     383                    ieee80211bg_data_rates,
    384384                    ARRAY_SIZE(ieee80211bg_data_rates));
    385385               
  • uspace/drv/nic/ar9271/ar9271.h

    rdf6ded8 r1b20da0  
    148148        AR9271_AGC_CONTROL = 0x9860,
    149149        AR9271_PHY_CAL = 0x9864,
    150         AR9271_PHY_SYNTH_CONTROL = 0x9874, 
     150        AR9271_PHY_SYNTH_CONTROL = 0x9874,
    151151        AR9271_PHY_SPECTRAL_SCAN = 0x9910,
    152152        AR9271_PHY_RADAR0 = 0x9954,
     
    156156        AR9271_PHY_MODE = 0xA200,
    157157        AR9271_PHY_CCK_TX_CTRL = 0xA204,
    158         AR9271_PHY_TPCRG1 = 0xA258, 
     158        AR9271_PHY_TPCRG1 = 0xA258,
    159159        AR9271_CARRIER_LEAK_CONTROL = 0xA358,
    160160        AR9271_ADC_CONTROL_OFF_PWDADC = 0x00008000,
    161161        AR9271_AGC_CONTROL_CALIB = 0x00000001,
    162162        AR9271_AGC_CONTROL_NF_CALIB = 0x00000002,
    163         AR9271_AGC_CONTROL_NF_CALIB_EN = 0x00008000, 
     163        AR9271_AGC_CONTROL_NF_CALIB_EN = 0x00008000,
    164164        AR9271_AGC_CONTROL_TX_CALIB = 0x00010000,
    165165        AR9271_AGC_CONTROL_NF_NOT_UPDATE = 0x00020000,
  • uspace/drv/nic/ar9271/ath_usb.c

    rdf6ded8 r1b20da0  
    137137/** Send data message.
    138138 *
    139  * @param ath         Generic Atheros WiFi device structure. 
     139 * @param ath         Generic Atheros WiFi device structure.
    140140 * @param buffer      Buffer with data to send.
    141141 * @param buffer_size Buffer size.
  • uspace/drv/nic/ar9271/htc.c

    rdf6ded8 r1b20da0  
    320320            ((void *) buffer + sizeof(htc_frame_header_t));
    321321       
    322         config_message->message_id = 
     322        config_message->message_id =
    323323            host2uint16_t_be(HTC_MESSAGE_CONFIG);
    324324        /* Magic number to initialize device. */
  • uspace/drv/nic/ar9271/wmi.h

    rdf6ded8 r1b20da0  
    2929/** @file wmi.h
    3030 *
    31  * Definitions of the Atheros WMI protocol specified in the 
     31 * Definitions of the Atheros WMI protocol specified in the
    3232 * Wireless Module Interface (WMI).
    3333 *
  • uspace/drv/nic/ne2k/ne2k.c

    rdf6ded8 r1b20da0  
    6868        {
    6969                .base = 0,
    70                 .size = NE2K_IO_SIZE, 
     70                .size = NE2K_IO_SIZE,
    7171        }
    7272};
  • uspace/drv/nic/rtl8139/defs.h

    rdf6ded8 r1b20da0  
    310310        RCR_ACCEPT_MULTICAST  = 1 << 2,  /**< Accept multicast */
    311311        RCR_ACCEPT_PHYS_MATCH = 1 << 1,  /**< Accept device MAC address match */
    312         RCR_ACCEPT_ALL_PHYS   = 1 << 0,  /**< Accept all frames with 
    313                                           * phys. desticnation 
     312        RCR_ACCEPT_ALL_PHYS   = 1 << 0,  /**< Accept all frames with
     313                                          * phys. desticnation
    314314                                                                          */
    315315        RCR_ACCEPT_MASK = (1 << 6) - 1   /**< Mask of accept part */
     
    325325        CS_F_LINK100     = (1 << 6),
    326326        CS_F_CONNECT     = (1 << 5),
    327         CS_CON_STATUS    = (1 << 3),  /**< connection status: 
    328                                        *   1 = valid, 0 = disconnected 
     327        CS_CON_STATUS    = (1 << 3),  /**< connection status:
     328                                       *   1 = valid, 0 = disconnected
    329329                                                                   */
    330330        CS_CON_STATUS_EN = (1 << 2),  /**< LED1 pin connection status indication */
     
    361361enum rtl8139_anar {
    362362        ANAR_NEXT_PAGE    = (1 << 15),  /**< Next page bit, 0 - primary capability
    363                                          *  1 - protocol specific 
     363                                         *  1 - protocol specific
    364364                                                                         */
    365365        ANAR_ACK          = (1 << 14),  /**< Capability reception acknowledge */
     
    371371        ANAR_10_FD        = (1 << 6),   /**< 10BASE_T full duplex */
    372372        ANAR_10_HD        = (1 << 5),   /**< 10BASE_T half duplex */
    373         ANAR_SELECTOR     = 0x1         /**< Selector, 
     373        ANAR_SELECTOR     = 0x1         /**< Selector,
    374374                                         *   CSMA/CD (0x1) supported only
    375375                                                                         */
     
    391391
    392392        /** Descending/ascending grow of Rx/Tx FIFO (to test FIFO SRAM only) */
    393         CONFIG5_FIFO_ADDR_PTR = (1 << 3),   
     393        CONFIG5_FIFO_ADDR_PTR = (1 << 3),
    394394        /** Powersave if cable is disconnected */
    395         CONFIG5_LINK_DOWN_POWERSAVE = (1 << 2), 
     395        CONFIG5_LINK_DOWN_POWERSAVE = (1 << 2),
    396396
    397397        CONFIG5_LAN_WAKE     = (1 << 1),   /**< LANWake signal enabled */
     
    411411        CONFIG4_RxFIFOAutoClr = (1 << 7),  /**< Automatic RxFIFO owerflow clear */
    412412        CONFIG4_AnaOff        = (1 << 6),  /**< Analog poweroff */
    413         CONFIG4_LongWF        = (1 << 5),  /**< Long wakeup frame 
    414                                             *   (2xCRC8 + 3xCRC16) 
     413        CONFIG4_LongWF        = (1 << 5),  /**< Long wakeup frame
     414                                            *   (2xCRC8 + 3xCRC16)
    415415                                                                                */
    416416        CONFIG4_LWPME         = (1 << 4),  /**< LWAKE and PMEB assertion  */
     
    450450
    451451        LOOPBACK_SHIFT  = 17,           /**< Loopback mode shift */
    452         LOOPBACK_SIZE   = 2,            /**< Loopback mode size 
    453                                           *  00 = normal, 11 = loopback 
     452        LOOPBACK_SIZE   = 2,            /**< Loopback mode size
     453                                          *  00 = normal, 11 = loopback
    454454                                                                          */
    455455
     
    462462        TX_RETRY_COUNT_SIZE  = 4,            /**< Retries before aborting size */
    463463
    464         CLEAR_ABORT = 1 << 0    /**< Retransmit aborted frame at the last 
    465                                   *  transmitted descriptor 
     464        CLEAR_ABORT = 1 << 0    /**< Retransmit aborted frame at the last
     465                                  *  transmitted descriptor
    466466                                                          */
    467467};
     
    500500#define RTL8139_RXFLAGS_SIZE_64 3
    501501
    502 /** Get the buffer initial size without 16B padding 
     502/** Get the buffer initial size without 16B padding
    503503 *  Size is (8 + 2^flags) kB (^ in mean power)
    504504 *
  • uspace/drv/nic/rtl8139/driver.c

    rdf6ded8 r1b20da0  
    154154        uint32_t rcr = rtl8139->rcr_data.rcr_base | rtl8139->rcr_data.ucast_mask
    155155            | rtl8139->rcr_data.mcast_mask | rtl8139->rcr_data.bcast_mask
    156             | rtl8139->rcr_data.defect_mask | 
     156            | rtl8139->rcr_data.defect_mask |
    157157            (RXBUF_SIZE_FLAGS << RCR_RBLEN_SHIFT);
    158158       
     
    288288    nic_channel_mode_t duplex, nic_role_t);
    289289
    290 static errno_t rtl8139_pause_get(ddf_fun_t*, nic_result_t*, nic_result_t*, 
     290static errno_t rtl8139_pause_get(ddf_fun_t*, nic_result_t*, nic_result_t*,
    291291    uint16_t *);
    292292static errno_t rtl8139_pause_set(ddf_fun_t*, int, int, uint16_t);
     
    295295static errno_t rtl8139_autoneg_disable(ddf_fun_t *fun);
    296296static errno_t rtl8139_autoneg_probe(ddf_fun_t *fun, uint32_t *our_advertisement,
    297     uint32_t *their_advertisement, nic_result_t *result, 
     297    uint32_t *their_advertisement, nic_result_t *result,
    298298    nic_result_t *their_result);
    299299static errno_t rtl8139_autoneg_restart(ddf_fun_t *fun);
     
    501501 * @param rtl8139  controller private data
    502502 */
    503 static void rtl8139_rx_reset(rtl8139_t *rtl8139) 
     503static void rtl8139_rx_reset(rtl8139_t *rtl8139)
    504504{
    505505        /* Disable receiver, update offset and enable receiver again */
     
    511511        write_barrier();
    512512        pio_write_32(rtl8139->io_port + CAPR, 0);
    513         pio_write_32(rtl8139->io_port + RBSTART, 
     513        pio_write_32(rtl8139->io_port + RBSTART,
    514514            PTR2U32(rtl8139->rx_buff_phys));
    515515
     
    680680        while (tx_used != tx_next) {
    681681                size_t desc_to_check = tx_used % TX_BUFF_COUNT;
    682                 void * tsd_to_check = rtl8139->io_port + TSD0 
     682                void * tsd_to_check = rtl8139->io_port + TSD0
    683683                    + desc_to_check * sizeof(uint32_t);
    684684                uint32_t tsd_value = pio_read_32(tsd_to_check);
     
    13861386
    13871387        if (rtl8139->hw_version < RTL8139_VER_COUNT) {
    1388                 str_cpy(info->model_name, NIC_MODEL_MAX_LENGTH, 
     1388                str_cpy(info->model_name, NIC_MODEL_MAX_LENGTH,
    13891389                    model_names[rtl8139->hw_version]);
    13901390        } else {
     
    14651465};
    14661466
    1467 /** Check if pause frame operations are valid in current situation 
     1467/** Check if pause frame operations are valid in current situation
    14681468 *
    14691469 *  @param rtl8139  RTL8139 private structure
     
    15021502 *  @return EOK if succeed
    15031503 */
    1504 static errno_t rtl8139_pause_get(ddf_fun_t *fun, nic_result_t *we_send, 
     1504static errno_t rtl8139_pause_get(ddf_fun_t *fun, nic_result_t *we_send,
    15051505    nic_result_t *we_receive, uint16_t *time)
    15061506{
     
    15371537 *  @return EOK if succeed, INVAL if the pause frame has no sence
    15381538 */
    1539 static errno_t rtl8139_pause_set(ddf_fun_t *fun, int allow_send, int allow_receive, 
     1539static errno_t rtl8139_pause_set(ddf_fun_t *fun, int allow_send, int allow_receive,
    15401540    uint16_t time)
    15411541{
     
    20912091                rtl8139->int_mask = INT_TIME_OUT;
    20922092
    2093                 /* Force timer interrupt start be writing nonzero value to timer 
     2093                /* Force timer interrupt start be writing nonzero value to timer
    20942094                 * interrutp register (should be small to prevent big delay)
    20952095                 * Read TCTR to reset timer counter
  • uspace/drv/nic/rtl8139/general.c

    rdf6ded8 r1b20da0  
    7272}
    7373
    74 /** Initialize the timer register structures 
     74/** Initialize the timer register structures
    7575 *
    76  *  The structure will be initialized to the state that the first call of 
     76 *  The structure will be initialized to the state that the first call of
    7777 *  rtl8139_timer_act_step function will be the period expiration
    7878 *
     
    8484 */
    8585errno_t rtl8139_timer_act_init(rtl8139_timer_act_t * ta, uint32_t timer_freq,
    86     const struct timeval *time) 
     86    const struct timeval *time)
    8787{
    8888        if (!ta || timer_freq == 0 || !time)
  • uspace/drv/nic/rtl8169/driver.c

    rdf6ded8 r1b20da0  
    5959static errno_t rtl8169_set_operation_mode(ddf_fun_t *fun, int speed,
    6060    nic_channel_mode_t duplex, nic_role_t role);
    61 static errno_t rtl8169_pause_get(ddf_fun_t *fun, nic_result_t *we_send, 
     61static errno_t rtl8169_pause_get(ddf_fun_t *fun, nic_result_t *we_send,
    6262    nic_result_t *we_receive, uint16_t *time);
    63 static errno_t rtl8169_pause_set(ddf_fun_t *fun, int allow_send, int allow_receive, 
     63static errno_t rtl8169_pause_set(ddf_fun_t *fun, int allow_send, int allow_receive,
    6464    uint16_t time);
    6565static errno_t rtl8169_autoneg_enable(ddf_fun_t *fun, uint32_t advertisement);
     
    237237        /* Allocate TX ring */
    238238        rtl8169->tx_ring = AS_AREA_ANY;
    239         rc = dmamem_map_anonymous(TX_RING_SIZE, DMAMEM_4GiB, 
     239        rc = dmamem_map_anonymous(TX_RING_SIZE, DMAMEM_4GiB,
    240240            AS_AREA_READ | AS_AREA_WRITE, 0, &rtl8169->tx_ring_phys,
    241241            (void **)&rtl8169->tx_ring);
     
    251251        /* Allocate RX ring */
    252252        rtl8169->rx_ring = AS_AREA_ANY;
    253         rc = dmamem_map_anonymous(RX_RING_SIZE, DMAMEM_4GiB, 
     253        rc = dmamem_map_anonymous(RX_RING_SIZE, DMAMEM_4GiB,
    254254            AS_AREA_READ | AS_AREA_WRITE, 0, &rtl8169->rx_ring_phys,
    255255            (void **)&rtl8169->rx_ring);
     
    265265        /* Allocate TX buffers */
    266266        rtl8169->tx_buff = AS_AREA_ANY;
    267         rc = dmamem_map_anonymous(TX_BUFFERS_SIZE, DMAMEM_4GiB, 
     267        rc = dmamem_map_anonymous(TX_BUFFERS_SIZE, DMAMEM_4GiB,
    268268            AS_AREA_READ | AS_AREA_WRITE, 0, &rtl8169->tx_buff_phys,
    269269            &rtl8169->tx_buff);
     
    277277        /* Allocate RX buffers */
    278278        rtl8169->rx_buff = AS_AREA_ANY;
    279         rc = dmamem_map_anonymous(RX_BUFFERS_SIZE, DMAMEM_4GiB, 
     279        rc = dmamem_map_anonymous(RX_BUFFERS_SIZE, DMAMEM_4GiB,
    280280            AS_AREA_READ | AS_AREA_WRITE, 0, &rtl8169->rx_buff_phys,
    281281            &rtl8169->rx_buff);
     
    594594}
    595595
    596 static errno_t rtl8169_pause_get(ddf_fun_t *fun, nic_result_t *we_send, 
     596static errno_t rtl8169_pause_get(ddf_fun_t *fun, nic_result_t *we_send,
    597597    nic_result_t *we_receive, uint16_t *time)
    598598{
     
    600600}
    601601
    602 static errno_t rtl8169_pause_set(ddf_fun_t *fun, int allow_send, int allow_receive, 
     602static errno_t rtl8169_pause_set(ddf_fun_t *fun, int allow_send, int allow_receive,
    603603    uint16_t time)
    604604{
Note: See TracChangeset for help on using the changeset viewer.