1. 08 3月, 2014 2 次提交
  2. 07 3月, 2014 3 次提交
  3. 19 2月, 2014 14 次提交
  4. 07 2月, 2014 1 次提交
  5. 17 1月, 2014 1 次提交
  6. 15 1月, 2014 3 次提交
  7. 07 1月, 2014 4 次提交
  8. 04 1月, 2014 1 次提交
  9. 02 1月, 2014 6 次提交
  10. 21 11月, 2013 4 次提交
    • H
      r8152: fix incorrect type in assignment · 500b6d7e
      hayeswang 提交于
      The data from the hardware should be little endian. Correct the
      declaration.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      500b6d7e
    • H
      r8152: support stopping/waking tx queue · dd1b119c
      hayeswang 提交于
      The maximum packet number which a tx aggregation buffer could contain
      is the tx_qlen.
      
      	tx_qlen = buffer size / (packet size + descriptor size).
      
      If the tx buffer is empty and the queued packets are more than the
      maximum value which is defined above, stop the tx queue. Wake the
      tx queue if tx queue is stopped and the queued packets are less than
      tx_qlen.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dd1b119c
    • H
      r8152: modify the tx flow · 61598788
      hayeswang 提交于
      Remove the code for sending the packet in the rtl8152_start_xmit().
      Let rtl8152_start_xmit() to queue the packet only, and schedule a
      tasklet to send the queued packets. This simplify the code and make
      sure all the packet would be sent by the original order.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61598788
    • H
      r8152: fix tx/rx memory overflow · 7937f9e5
      hayeswang 提交于
      The tx/rx would access the memory which is out of the desired range.
      Modify the method of checking the end of the memory to avoid it.
      
      For r8152_tx_agg_fill(), the variable remain may become negative.
      However, the declaration is unsigned, so the while loop wouldn't
      break when reaching the end of the desied memory. Although to change
      the declaration from unsigned to signed is enough to fix it, I also
      modify the checking method for safe. Replace
      
      		remain = rx_buf_sz - sizeof(*tx_desc) -
      			 (u32)((void *)tx_data - agg->head);
      
      with
      
      		remain = rx_buf_sz - (int)(tx_agg_align(tx_data) - agg->head);
      
      to make sure the variable remain is always positive. Then, the
      overflow wouldn't happen.
      
      For rx_bottom(), the rx_desc should not be used to calculate the
      packet length before making sure the rx_desc is in the desired range.
      Change the checking to two parts. First, check the descriptor is in
      the memory. The other, using the descriptor to find out the packet
      length and check if the packet is in the memory.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7937f9e5
  11. 20 8月, 2013 1 次提交