aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192se/sw.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192se/sw.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
index aadba29c167a..fb003868bdef 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
@@ -236,6 +236,19 @@ static void rtl92s_deinit_sw_vars(struct ieee80211_hw *hw)
236 } 236 }
237} 237}
238 238
239static bool rtl92se_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue,
240 u16 index)
241{
242 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
243 struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
244 u8 *entry = (u8 *)(&ring->desc[ring->idx]);
245 u8 own = (u8)rtl92se_get_desc(entry, true, HW_DESC_OWN);
246
247 if (own)
248 return false;
249 return true;
250}
251
239static struct rtl_hal_ops rtl8192se_hal_ops = { 252static struct rtl_hal_ops rtl8192se_hal_ops = {
240 .init_sw_vars = rtl92s_init_sw_vars, 253 .init_sw_vars = rtl92s_init_sw_vars,
241 .deinit_sw_vars = rtl92s_deinit_sw_vars, 254 .deinit_sw_vars = rtl92s_deinit_sw_vars,
@@ -269,6 +282,7 @@ static struct rtl_hal_ops rtl8192se_hal_ops = {
269 .led_control = rtl92se_led_control, 282 .led_control = rtl92se_led_control,
270 .set_desc = rtl92se_set_desc, 283 .set_desc = rtl92se_set_desc,
271 .get_desc = rtl92se_get_desc, 284 .get_desc = rtl92se_get_desc,
285 .is_tx_desc_closed = rtl92se_is_tx_desc_closed,
272 .tx_polling = rtl92se_tx_polling, 286 .tx_polling = rtl92se_tx_polling,
273 .enable_hw_sec = rtl92se_enable_hw_security_config, 287 .enable_hw_sec = rtl92se_enable_hw_security_config,
274 .set_key = rtl92se_set_key, 288 .set_key = rtl92se_set_key,
@@ -306,6 +320,8 @@ static struct rtl_hal_cfg rtl92se_hal_cfg = {
306 .maps[MAC_RCR_ACRC32] = RCR_ACRC32, 320 .maps[MAC_RCR_ACRC32] = RCR_ACRC32,
307 .maps[MAC_RCR_ACF] = RCR_ACF, 321 .maps[MAC_RCR_ACF] = RCR_ACF,
308 .maps[MAC_RCR_AAP] = RCR_AAP, 322 .maps[MAC_RCR_AAP] = RCR_AAP,
323 .maps[MAC_HIMR] = INTA_MASK,
324 .maps[MAC_HIMRE] = INTA_MASK + 4,
309 325
310 .maps[EFUSE_TEST] = REG_EFUSE_TEST, 326 .maps[EFUSE_TEST] = REG_EFUSE_TEST,
311 .maps[EFUSE_CTRL] = REG_EFUSE_CTRL, 327 .maps[EFUSE_CTRL] = REG_EFUSE_CTRL,