01 May, 2014

2 commits

  • Fixes: a53268be0cb9 ('rtlwifi: rtl8192cu: Fix too long disable of IRQs')
    Cc: stable@vger.kernel.org
    Signed-off-by: Ben Hutchings
    Signed-off-by: John W. Linville

    Ben Hutchings
     
  • Beginning with kernel 3.13, this driver fails on some systems. The problem
    was bisected to:

    Commit 1bf4bbb4024dcdab5e57634dd8ae1072d42a53ac
    Author: Felix Fietkau
    Title: mac80211: send control port protocol frames to the VO queue

    There is noting wrong with the above commit. The regression occurs because
    V0 queue on RTL8192SE cards uses priority 6, not the usual 7. The fix is to
    modify the rtl8192se routine that sets the correct transmit queue.

    Bug: https://bugzilla.kernel.org/show_bug.cgi?id=74541

    Reported-by: Alex Miller
    Tested-by: Alex Miller
    Signed-off-by: Larry Finger
    Cc: Stable [3.13+]
    Signed-off-by: John W. Linville

    Larry Finger
     

23 Apr, 2014

1 commit

  • static code analysis from cppcheck reports:

    [drivers/net/wireless/rtlwifi/rtl8188ee/trx.c:322]:
    (error) Uninitialized variable: packet_beacon

    packet_beacon is not initialized and hence packet_beacon
    contains garbage from the stack, so set it to false.

    Signed-off-by: Colin Ian King
    Cc: Stable [3.10+]
    Acked-by: Larry Finger
    Signed-off-by: John W. Linville

    Colin Ian King
     

10 Apr, 2014

1 commit

  • There are references to four undefined Kconfig macros in the code.
    Commit 8542373dccd2 ("Staging: rtl8812ae: remove undefined Kconfig
    macros") removed identical references from that staging driver, but
    they resurfaced in rtlwifi. Remove these again as the checks for them
    still will always evaluate to false.

    Signed-off-by: Paul Bolle
    Signed-off-by: John W. Linville

    Paul Bolle
     

01 Apr, 2014

2 commits

  • Some HP notebooks using this rtl8188ee hardware module can't get
    AP scan results with pin-based interrupts mode, enabling MSI interrupts
    mode could fix it.

    As RealTek's testing results, RTL8188EE works well with both MSI mode
    and pin-based mode fallback.

    Signed-off-by: Adam Lee
    Signed-off-by: John W. Linville

    Adam Lee
     
  • Add MSI interrupts mode support, enable it when submodules' msi_support
    flag is true, also could fallback to pin-based interrupts mode if MSI
    interrupts mode fails.

    RealTek's policy(on modules which work well with MSI interrupts mode) is:

    > If the platform supports both MSI and pin-based, use MSI.
    > If the platform supports MSI only, use MSI.
    > If the platform supports pin-based only, use pin-based.

    Also as RealTek's testing results, RTL8188EE and RTL8723BE work well
    with both MSI mode and pin-based mode fallback.

    Signed-off-by: Adam Lee
    Signed-off-by: John W. Linville

    Adam Lee
     

28 Mar, 2014

2 commits

  • Casting a pointer to a pointer of the same type is pointless,
    so remove these unnecessary casts.

    Around these changes:

    o Remove unnecessary parentheses
    o Use consistent dereference style (change ptr[0] to *ptr)
    o Argument alignment

    Done via coccinelle script: (and some typing)

    $ cat typecast_2.cocci
    @@
    type T;
    T *foo;
    @@

    - (T *)foo
    + foo

    Signed-off-by: Joe Perches
    Signed-off-by: John W. Linville

    Joe Perches
     
  • Using addressof then casting to the original type is pointless,
    so remove these unnecessary casts.

    Done via coccinelle script:

    $ cat typecast.cocci
    @@
    type T;
    T foo;
    @@

    - (T *)&foo
    + &foo

    Signed-off-by: Joe Perches
    Signed-off-by: John W. Linville

    Joe Perches
     

14 Mar, 2014

1 commit

  • Commit a619d1abe20c leads to the following static checker warning:

    drivers/net/wireless/rtlwifi/rtl8723be/phy.c:667 _rtl8723be_store_tx_power_by_rate()
    error: buffer overflow 'rtlphy->tx_power_by_rate_offset[band]' 4
    Reported-by: Dan Carpenter
    Signed-off-by: John W. Linville

    Larry Finger
     

07 Mar, 2014

10 commits


05 Mar, 2014

7 commits


01 Mar, 2014

1 commit


25 Feb, 2014

2 commits

  • commit 0baa0fd76f3f5a134461d6cf30294f6bb1bb824c
    ("rtlwifi: Convert core routines for addition of rtl8192se and
    rtl8192de") removed setting HW_VAR_RCR, HW_VAR_MGT_FILTER and
    HW_VAR_CTRL_FILTER. The last two are probably done because some hardware
    does not support them. The first is probably a mistake. This patch adds
    the missing set_hw_reg call.

    For PCI support, rx_conf is not touched directly. Instead, get_hw_reg is
    used to abstract between receive_config (for PCI) and rx_conf (for USB).

    This was tested on a 10ec:8176 Realtek RTL8188CE (according to the
    label on the mini-PCIe card). Before this patch, `iw wlan0 set monitor
    otherbss` did not capture frames from other BSS's. After this patch, it
    does print packets.

    Tested-by: Peter Wu
    Signed-off-by: Peter Wu
    Acked-by: Larry Finger
    Signed-off-by: John W. Linville

    Peter Wu
     
  • The rtl*_set_check_bssid functions are mostly the same, but access the
    RCR register in different ways. Use the get_hw_reg abstraction layer
    (which reads rtlpci->receive_config for PCI devices and mac->rx_conf for
    USB).

    There is no functional change for cases where receive_config was
    accessed directly. For rtl8192ce, there is still no change because
    nothing modifies REG_RCR or receive_config. For rtl8192cu, it now also
    applies changes to rx_conf from configure_filter, but that can be
    considered a bug which is fixed later.

    Signed-off-by: Peter Wu
    Acked-by: Larry Finger
    Signed-off-by: John W. Linville

    Peter Wu
     

14 Feb, 2014

2 commits

  • rtl_ps_enable_nic() is called from loops that will loop until this function returns true or a
    maximum number of retries is performed.

    hw_init() returns non-zero on error. In that situation return false to
    restore the original design intent to retry hw init when it fails.

    Signed-off-by: Olivier Langlois
    Cc: Stable
    Acked-by: Larry Finger
    Signed-off-by: John W. Linville

    Olivier Langlois
     
  • rtl8192ce is disabling for too long the local interrupts during hw initiatialisation when performing scans

    The observable symptoms in dmesg can be:

    - underruns from ALSA playback
    - clock freezes (tstamps do not change for several dmesg entries until irqs are finaly reenabled):

    [ 250.817669] rtlwifi:rtl_op_config(): 0x100
    [ 250.817685] rtl8192ce:_rtl92ce_phy_set_rf_power_state(): IPS Set eRf nic enable
    [ 250.817732] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.817796] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.817910] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.818024] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.818139] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.818253] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.818367] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.818472] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.818472] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.818472] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.818472] rtl8192ce:_rtl92ce_init_mac(): reg0xec:18051d59:11
    [ 250.818472] rtl8192ce:_rtl92ce_init_mac(): reg0xec:98053f15:10
    [ 250.818472] rtl8192ce:rtl92ce_sw_led_on(): LedAddr:4E ledpin=1
    [ 250.818472] rtl8192c_common:rtl92c_download_fw(): Firmware Version(49), Signature(0x88c1),Size(32)
    [ 250.818472] rtl8192ce:rtl92ce_enable_hw_security_config(): PairwiseEncAlgorithm = 0 GroupEncAlgorithm = 0
    [ 250.818472] rtl8192ce:rtl92ce_enable_hw_security_config(): The SECR-value cc
    [ 250.818472] rtl8192c_common:rtl92c_dm_check_txpower_tracking_thermal_meter(): Schedule TxPowerTracking direct call!!
    [ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter(): rtl92c_dm_txpower_tracking_callback_thermalmeter
    [ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter(): Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf
    [ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter(): Initial pathA ele_d reg0xc80 = 0x40000000, ofdm_index=0xc
    [ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter(): Initial reg0xa24 = 0x90e1317, cck_index=0xc, ch14 0
    [ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter(): Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf delta 0x1 delta_lck 0x0 delta_iqk 0x0
    [ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter(): pMgntInfo->txpower_tracking = 1
    [ 250.818472] rtl8192ce:rtl92ce_led_control(): ledaction 3
    [ 250.818472] rtl8192ce:rtl92ce_sw_led_on(): LedAddr:4E ledpin=1
    [ 250.818472] rtlwifi:rtl_ips_nic_on(): before spin_unlock_irqrestore
    [ 251.154656] PCM: Lost interrupts? [Q]-0 (stream=0, delta=15903, new_hw_ptr=293408, old_hw_ptr=277505)

    The exact code flow that causes that is:

    1. wpa_supplicant send a start_scan request to the nl80211 driver
    2. mac80211 module call rtl_op_config with IEEE80211_CONF_CHANGE_IDLE
    3. rtl_ips_nic_on is called which disable local irqs
    4. rtl92c_phy_set_rf_power_state() is called
    5. rtl_ps_enable_nic() is called and hw_init()is executed and then the interrupts on the device are enabled

    A good solution could be to refactor the code to avoid calling rtl92ce_hw_init() with the irqs disabled
    but a quick and dirty solution that has proven to work is
    to reenable the irqs during the function rtl92ce_hw_init().

    I think that it is safe doing so since the device interrupt will only be enabled after the init function succeed.

    Signed-off-by: Olivier Langlois
    Cc: Stable
    Acked-by: Larry Finger
    Signed-off-by: John W. Linville

    Olivier Langlois
     

05 Feb, 2014

3 commits


18 Jan, 2014

1 commit


14 Jan, 2014

2 commits


10 Jan, 2014

1 commit


08 Jan, 2014

1 commit


07 Jan, 2014

1 commit