diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-18 11:00:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-18 11:00:00 -0700 |
commit | 2475c515d4031c494ff452508a8bf8c281ec6e56 (patch) | |
tree | 0303935bbd919ec522bf0fe02066f09b391d2b57 /drivers/staging/rtlwifi | |
parent | 336722eb9d9732c5a497fb6299bf38cde413592b (diff) | |
parent | e4f6a44c4aeca9eda153302abb0c14d053914f72 (diff) | |
download | linux-2475c515d4031c494ff452508a8bf8c281ec6e56.tar.bz2 |
Merge tag 'staging-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here are the big staging/iio patches for 4.19-rc1.
Lots of churn here, with tons of cleanups happening in staging
drivers, a removal of an old crypto driver that no one was using
(skein), and the addition of some new IIO drivers. Also added was a
"gasket" driver from Google that needs loads of work and the erofs
filesystem.
Even with adding all of the new drivers and a new filesystem, we are
only adding about 1000 lines overall to the kernel linecount, which
shows just how much cleanup happened, and how big the unused crypto
driver was.
All of these have been in the linux-next tree for a while now with no
reported issues"
* tag 'staging-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (903 commits)
staging:rtl8192u: Remove unused macro definitions - Style
staging:rtl8192u: Add spaces around '+' operator - Style
staging:rtl8192u: Remove stale comment - Style
staging: rtl8188eu: remove unused mp_custom_oid.h
staging: fbtft: Add spaces around / - Style
staging: fbtft: Erases some repetitive usage of function name - Style
staging: fbtft: Adjust some empty-line problems - Style
staging: fbtft: Removes one nesting level to help readability - Style
staging: fbtft: Changes gamma table to define.
staging: fbtft: A bit more information on dev_err.
staging: fbtft: Fixes some alignment issues - Style
staging: fbtft: Puts macro arguments in parenthesis to avoid precedence issues - Style
staging: rtl8188eu: remove unused array dB_Invert_Table
staging: rtl8188eu: remove whitespace, add missing blank line
staging: rtl8188eu: use is_multicast_ether_addr in rtw_sta_mgt.c
staging: rtl8188eu: remove whitespace - style
staging: rtl8188eu: cleanup block comment - style
staging: rtl8188eu: use is_multicast_ether_addr in rtl8188eu_xmit.c
staging: rtl8188eu: use is_multicast_ether_addr in recv_linux.c
staging: rtlwifi: refactor rtl_get_tcb_desc
...
Diffstat (limited to 'drivers/staging/rtlwifi')
-rw-r--r-- | drivers/staging/rtlwifi/base.c | 107 | ||||
-rw-r--r-- | drivers/staging/rtlwifi/halmac/halmac_api.h | 1 | ||||
-rw-r--r-- | drivers/staging/rtlwifi/halmac/halmac_pcie_reg.h | 17 | ||||
-rw-r--r-- | drivers/staging/rtlwifi/halmac/rtl_halmac.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtlwifi/phydm/phydm.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtlwifi/rtl8822be/fw.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtlwifi/rtl8822be/sw.c | 2 |
7 files changed, 54 insertions, 79 deletions
diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c index 094827c1879a..50b1c187a920 100644 --- a/drivers/staging/rtlwifi/base.c +++ b/drivers/staging/rtlwifi/base.c @@ -685,9 +685,8 @@ static void _rtl_query_protection_mode(struct ieee80211_hw *hw, } } -u8 rtl_mrate_idx_to_arfr_id( - struct ieee80211_hw *hw, u8 rate_index, - enum wireless_mode wirelessmode) +u8 rtl_mrate_idx_to_arfr_id(struct ieee80211_hw *hw, u8 rate_index, + enum wireless_mode wirelessmode) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &rtlpriv->phy; @@ -1237,67 +1236,61 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw, if (rtl_is_tx_report_skb(hw, skb)) tcb_desc->use_spe_rpt = 1; - if (ieee80211_is_data(fc)) { - /* - *we set data rate INX 0 - *in rtl_rc.c if skb is special data or - *mgt which need low data rate. - */ - - /* - *So tcb_desc->hw_rate is just used for - *special data and mgt frames - */ - if (info->control.rates[0].idx == 0 || - ieee80211_is_nullfunc(fc)) { - tcb_desc->use_driver_rate = true; - tcb_desc->ratr_index = - SET_RATE_ID(RATR_INX_WIRELESS_MC); + if (!ieee80211_is_data(fc)) { + tcb_desc->use_driver_rate = true; + tcb_desc->ratr_index = SET_RATE_ID(RATR_INX_WIRELESS_MC); + tcb_desc->disable_ratefallback = 1; + tcb_desc->mac_id = 0; + tcb_desc->packet_bw = false; - tcb_desc->disable_ratefallback = 1; - } else { - /* because hw will never use hw_rate - * when tcb_desc->use_driver_rate = false - * so we never set highest N rate here, - * and N rate will all be controlled by FW - * when tcb_desc->use_driver_rate = false - */ - if (sta && sta->vht_cap.vht_supported) { - tcb_desc->hw_rate = - _rtl_get_vht_highest_n_rate(hw, sta); - } else { - if (sta && sta->ht_cap.ht_supported) { - tcb_desc->hw_rate = - _rtl_get_highest_n_rate(hw, sta); - } else { - if (rtlmac->mode == WIRELESS_MODE_B) { - tcb_desc->hw_rate = - rtlpriv->cfg->maps[RTL_RC_CCK_RATE11M]; - } else { - tcb_desc->hw_rate = - rtlpriv->cfg->maps[RTL_RC_OFDM_RATE54M]; - } - } - } - } + return; + } - if (is_multicast_ether_addr(hdr->addr1)) - tcb_desc->multicast = 1; - else if (is_broadcast_ether_addr(hdr->addr1)) - tcb_desc->broadcast = 1; + /* + * We set data rate INX 0 + * in rtl_rc.c if skb is special data or + * mgt which need low data rate. + */ - _rtl_txrate_selectmode(hw, sta, tcb_desc); - _rtl_query_bandwidth_mode(hw, sta, tcb_desc); - _rtl_qurey_shortpreamble_mode(hw, tcb_desc, info); - _rtl_query_shortgi(hw, sta, tcb_desc, info); - _rtl_query_protection_mode(hw, tcb_desc, info); - } else { + /* + * So tcb_desc->hw_rate is just used for + * special data and mgt frames + */ + if (info->control.rates[0].idx == 0 || ieee80211_is_nullfunc(fc)) { tcb_desc->use_driver_rate = true; tcb_desc->ratr_index = SET_RATE_ID(RATR_INX_WIRELESS_MC); + tcb_desc->disable_ratefallback = 1; - tcb_desc->mac_id = 0; - tcb_desc->packet_bw = false; + } else if (sta && sta->vht_cap.vht_supported) { + /* + * Because hw will never use hw_rate + * when tcb_desc->use_driver_rate = false + * so we never set highest N rate here, + * and N rate will all be controlled by FW + * when tcb_desc->use_driver_rate = false + */ + tcb_desc->hw_rate = _rtl_get_vht_highest_n_rate(hw, sta); + } else if (sta && sta->ht_cap.ht_supported) { + tcb_desc->hw_rate = _rtl_get_highest_n_rate(hw, sta); + } else { + enum rtl_var_map var = RTL_RC_OFDM_RATE54M; + + if (rtlmac->mode == WIRELESS_MODE_B) + var = RTL_RC_CCK_RATE11M; + + tcb_desc->hw_rate = rtlpriv->cfg->maps[var]; } + + if (is_multicast_ether_addr(hdr->addr1)) + tcb_desc->multicast = 1; + else if (is_broadcast_ether_addr(hdr->addr1)) + tcb_desc->broadcast = 1; + + _rtl_txrate_selectmode(hw, sta, tcb_desc); + _rtl_query_bandwidth_mode(hw, sta, tcb_desc); + _rtl_qurey_shortpreamble_mode(hw, tcb_desc, info); + _rtl_query_shortgi(hw, sta, tcb_desc, info); + _rtl_query_protection_mode(hw, tcb_desc, info); #undef SET_RATE_ID } diff --git a/drivers/staging/rtlwifi/halmac/halmac_api.h b/drivers/staging/rtlwifi/halmac/halmac_api.h index 4922cc8ce6f2..e220db39c8a7 100644 --- a/drivers/staging/rtlwifi/halmac/halmac_api.h +++ b/drivers/staging/rtlwifi/halmac/halmac_api.h @@ -29,7 +29,6 @@ #include "halmac_usb_reg.h" #include "halmac_sdio_reg.h" -#include "halmac_pcie_reg.h" #include "halmac_bit2.h" #include "halmac_reg2.h" diff --git a/drivers/staging/rtlwifi/halmac/halmac_pcie_reg.h b/drivers/staging/rtlwifi/halmac/halmac_pcie_reg.h deleted file mode 100644 index a2552b27367b..000000000000 --- a/drivers/staging/rtlwifi/halmac/halmac_pcie_reg.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/****************************************************************************** - * - * Copyright(c) 2016 Realtek Corporation. - * - * Contact Information: - * wlanfae <wlanfae@realtek.com> - * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, - * Hsinchu 300, Taiwan. - * - * Larry Finger <Larry.Finger@lwfinger.net> - * - *****************************************************************************/ -#ifndef __HALMAC_PCIE_REG_H__ -#define __HALMAC_PCIE_REG_H__ - -#endif /* __HALMAC_PCIE_REG_H__ */ diff --git a/drivers/staging/rtlwifi/halmac/rtl_halmac.c b/drivers/staging/rtlwifi/halmac/rtl_halmac.c index ae433aa6ebbb..f0c6fc8c6aca 100644 --- a/drivers/staging/rtlwifi/halmac/rtl_halmac.c +++ b/drivers/staging/rtlwifi/halmac/rtl_halmac.c @@ -870,7 +870,7 @@ static bool _is_fw_read_cmd_down(struct rtl_priv *rtlpriv, u8 msgbox_num) if (valid == 0) read_down = true; else - schedule(); + mdelay(1); } while ((!read_down) && (retry_cnts--)); return read_down; diff --git a/drivers/staging/rtlwifi/phydm/phydm.c b/drivers/staging/rtlwifi/phydm/phydm.c index 985978d3decc..27635feedba2 100644 --- a/drivers/staging/rtlwifi/phydm/phydm.c +++ b/drivers/staging/rtlwifi/phydm/phydm.c @@ -149,7 +149,7 @@ static void phydm_traffic_load_decision(void *dm_void) { struct phy_dm_struct *dm = (struct phy_dm_struct *)dm_void; - /*---TP & Trafic-load calculation---*/ + /*---TP & Traffic-load calculation---*/ if (dm->last_tx_ok_cnt > *dm->num_tx_bytes_unicast) dm->last_tx_ok_cnt = *dm->num_tx_bytes_unicast; diff --git a/drivers/staging/rtlwifi/rtl8822be/fw.c b/drivers/staging/rtlwifi/rtl8822be/fw.c index efec7281511c..a40396614814 100644 --- a/drivers/staging/rtlwifi/rtl8822be/fw.c +++ b/drivers/staging/rtlwifi/rtl8822be/fw.c @@ -82,7 +82,7 @@ static void _rtl8822be_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id, } while (!bwrite_success) { - /* 2. Find the last BOX number which has been writen. */ + /* 2. Find the last BOX number which has been written. */ boxnum = rtlhal->last_hmeboxnum; switch (boxnum) { case 0: diff --git a/drivers/staging/rtlwifi/rtl8822be/sw.c b/drivers/staging/rtlwifi/rtl8822be/sw.c index 7825e85ed091..a2ab19fa94f2 100644 --- a/drivers/staging/rtlwifi/rtl8822be/sw.c +++ b/drivers/staging/rtlwifi/rtl8822be/sw.c @@ -43,7 +43,7 @@ static void rtl8822be_init_aspm_vars(struct ieee80211_hw *hw) * 0 - Disable ASPM, * 1 - Enable ASPM without Clock Req, * 2 - Enable ASPM with Clock Req, - * 3 - Alwyas Enable ASPM with Clock Req, + * 3 - Always Enable ASPM with Clock Req, * 4 - Always Enable ASPM without Clock Req. * set default to RTL8822BE:3 RTL8822B:2 * |