Commit f3355dd9 authored by Larry Finger's avatar Larry Finger Committed by John W. Linville

rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: rtl8192se: rtl8723ae: rtl8723be:...

rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: rtl8192se: rtl8723ae: rtl8723be: rtl8188eu: Modify for new API

The addition of a driver for the RTL8821AE requires a new API for the
fill_tx_desc() and set_desc() callback routines. This commit makes the
appropriate modifications in all the other drivers.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 997bc71a
...@@ -980,7 +980,7 @@ void exhalbtc_set_chip_type(u8 chip_type) ...@@ -980,7 +980,7 @@ void exhalbtc_set_chip_type(u8 chip_type)
case BT_RTL8723A: case BT_RTL8723A:
gl_bt_coexist.board_info.bt_chip_type = BTC_CHIP_RTL8723A; gl_bt_coexist.board_info.bt_chip_type = BTC_CHIP_RTL8723A;
break; break;
case BT_RTL8821: case BT_RTL8821A:
gl_bt_coexist.board_info.bt_chip_type = BTC_CHIP_RTL8821; gl_bt_coexist.board_info.bt_chip_type = BTC_CHIP_RTL8821;
break; break;
case BT_RTL8723B: case BT_RTL8723B:
......
...@@ -811,19 +811,19 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) ...@@ -811,19 +811,19 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress)) if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress))
return; return;
tmp_one = 1; tmp_one = 1;
rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false, rtlpriv->cfg->ops->set_desc(hw, (u8 *)pdesc, false,
HW_DESC_RXBUFF_ADDR, HW_DESC_RXBUFF_ADDR,
(u8 *)&bufferaddress); (u8 *)&bufferaddress);
rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, rtlpriv->cfg->ops->set_desc(hw, (u8 *)pdesc, false,
HW_DESC_RXPKT_LEN, HW_DESC_RXPKT_LEN,
(u8 *)&rtlpci->rxbuffersize); (u8 *)&rtlpci->rxbuffersize);
if (index == rtlpci->rxringcount - 1) if (index == rtlpci->rxringcount - 1)
rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, rtlpriv->cfg->ops->set_desc(hw, (u8 *)pdesc, false,
HW_DESC_RXERO, HW_DESC_RXERO,
&tmp_one); &tmp_one);
rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, HW_DESC_RXOWN, rtlpriv->cfg->ops->set_desc(hw, (u8 *)pdesc, false, HW_DESC_RXOWN,
&tmp_one); &tmp_one);
index = (index + 1) % rtlpci->rxringcount; index = (index + 1) % rtlpci->rxringcount;
...@@ -983,6 +983,8 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw) ...@@ -983,6 +983,8 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
struct sk_buff *pskb = NULL; struct sk_buff *pskb = NULL;
struct rtl_tx_desc *pdesc = NULL; struct rtl_tx_desc *pdesc = NULL;
struct rtl_tcb_desc tcb_desc; struct rtl_tcb_desc tcb_desc;
/*This is for new trx flow*/
struct rtl_tx_buffer_desc *pbuffer_desc = NULL;
u8 temp_one = 1; u8 temp_one = 1;
memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc)); memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc));
...@@ -1004,11 +1006,12 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw) ...@@ -1004,11 +1006,12 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
info = IEEE80211_SKB_CB(pskb); info = IEEE80211_SKB_CB(pskb);
pdesc = &ring->desc[0]; pdesc = &ring->desc[0];
rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc, rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc,
info, NULL, pskb, BEACON_QUEUE, &tcb_desc); (u8 *)pbuffer_desc, info, NULL, pskb,
BEACON_QUEUE, &tcb_desc);
__skb_queue_tail(&ring->queue, pskb); __skb_queue_tail(&ring->queue, pskb);
rtlpriv->cfg->ops->set_desc((u8 *) pdesc, true, HW_DESC_OWN, rtlpriv->cfg->ops->set_desc(hw, (u8 *)pdesc, true, HW_DESC_OWN,
&temp_one); &temp_one);
return; return;
...@@ -1113,7 +1116,7 @@ static int _rtl_pci_init_tx_ring(struct ieee80211_hw *hw, ...@@ -1113,7 +1116,7 @@ static int _rtl_pci_init_tx_ring(struct ieee80211_hw *hw,
((i + 1) % entries) * ((i + 1) % entries) *
sizeof(*ring); sizeof(*ring);
rtlpriv->cfg->ops->set_desc((u8 *)&(ring[i]), rtlpriv->cfg->ops->set_desc(hw, (u8 *)&(ring[i]),
true, HW_DESC_TX_NEXTDESC_ADDR, true, HW_DESC_TX_NEXTDESC_ADDR,
(u8 *)&nextdescaddress); (u8 *)&nextdescaddress);
} }
...@@ -1188,19 +1191,19 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw) ...@@ -1188,19 +1191,19 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw)
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
return 1; return 1;
} }
rtlpriv->cfg->ops->set_desc((u8 *)entry, false, rtlpriv->cfg->ops->set_desc(hw, (u8 *)entry, false,
HW_DESC_RXBUFF_ADDR, HW_DESC_RXBUFF_ADDR,
(u8 *)&bufferaddress); (u8 *)&bufferaddress);
rtlpriv->cfg->ops->set_desc((u8 *)entry, false, rtlpriv->cfg->ops->set_desc(hw, (u8 *)entry, false,
HW_DESC_RXPKT_LEN, HW_DESC_RXPKT_LEN,
(u8 *)&rtlpci-> (u8 *)&rtlpci->
rxbuffersize); rxbuffersize);
rtlpriv->cfg->ops->set_desc((u8 *) entry, false, rtlpriv->cfg->ops->set_desc(hw, (u8 *)entry, false,
HW_DESC_RXOWN, HW_DESC_RXOWN,
&tmp_one); &tmp_one);
} }
rtlpriv->cfg->ops->set_desc((u8 *) entry, false, rtlpriv->cfg->ops->set_desc(hw, (u8 *)entry, false,
HW_DESC_RXERO, &tmp_one); HW_DESC_RXERO, &tmp_one);
} }
return 0; return 0;
...@@ -1331,7 +1334,7 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw) ...@@ -1331,7 +1334,7 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
for (i = 0; i < rtlpci->rxringcount; i++) { for (i = 0; i < rtlpci->rxringcount; i++) {
entry = &rtlpci->rx_ring[rx_queue_idx].desc[i]; entry = &rtlpci->rx_ring[rx_queue_idx].desc[i];
rtlpriv->cfg->ops->set_desc((u8 *) entry, rtlpriv->cfg->ops->set_desc(hw, (u8 *)entry,
false, false,
HW_DESC_RXOWN, HW_DESC_RXOWN,
&tmp_one); &tmp_one);
...@@ -1424,6 +1427,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, ...@@ -1424,6 +1427,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct rtl8192_tx_ring *ring; struct rtl8192_tx_ring *ring;
struct rtl_tx_desc *pdesc; struct rtl_tx_desc *pdesc;
struct rtl_tx_buffer_desc *ptx_bd_desc = NULL;
u8 idx; u8 idx;
u8 hw_queue = _rtl_mac_to_hwqueue(hw, skb); u8 hw_queue = _rtl_mac_to_hwqueue(hw, skb);
unsigned long flags; unsigned long flags;
...@@ -1464,17 +1468,22 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, ...@@ -1464,17 +1468,22 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
idx = 0; idx = 0;
pdesc = &ring->desc[idx]; pdesc = &ring->desc[idx];
own = (u8) rtlpriv->cfg->ops->get_desc((u8 *) pdesc, if (rtlpriv->use_new_trx_flow) {
true, HW_DESC_OWN); ptx_bd_desc = &ring->buffer_desc[idx];
} else {
own = (u8) rtlpriv->cfg->ops->get_desc((u8 *)pdesc,
true, HW_DESC_OWN);
if ((own == 1) && (hw_queue != BEACON_QUEUE)) { if ((own == 1) && (hw_queue != BEACON_QUEUE)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
"No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n", "No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
hw_queue, ring->idx, idx, hw_queue, ring->idx, idx,
skb_queue_len(&ring->queue)); skb_queue_len(&ring->queue));
spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock,
return skb->len; flags);
return skb->len;
}
} }
if (ieee80211_is_data_qos(fc)) { if (ieee80211_is_data_qos(fc)) {
...@@ -1494,17 +1503,20 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, ...@@ -1494,17 +1503,20 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX); rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc,
info, sta, skb, hw_queue, ptcb_desc); (u8 *)ptx_bd_desc, info, sta, skb, hw_queue, ptcb_desc);
__skb_queue_tail(&ring->queue, skb); __skb_queue_tail(&ring->queue, skb);
rtlpriv->cfg->ops->set_desc((u8 *)pdesc, true, if (rtlpriv->use_new_trx_flow) {
HW_DESC_OWN, &temp_one); rtlpriv->cfg->ops->set_desc(hw, (u8 *)pdesc, true,
HW_DESC_OWN, (u8 *)&hw_queue);
} else {
rtlpriv->cfg->ops->set_desc(hw, (u8 *)pdesc, true,
HW_DESC_OWN, (u8 *)&temp_one);
}
if ((ring->entries - skb_queue_len(&ring->queue)) < 2 && if ((ring->entries - skb_queue_len(&ring->queue)) < 2 &&
hw_queue != BEACON_QUEUE) { hw_queue != BEACON_QUEUE) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD, RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD,
"less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n", "less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
hw_queue, ring->idx, idx, hw_queue, ring->idx, idx,
......
...@@ -137,12 +137,22 @@ struct rtl_tx_cmd_desc { ...@@ -137,12 +137,22 @@ struct rtl_tx_cmd_desc {
u32 dword[16]; u32 dword[16];
} __packed; } __packed;
/* In new TRX flow, Buffer_desc is new concept
* But TX wifi info == TX descriptor in old flow
* RX wifi info == RX descriptor in old flow
*/
struct rtl_tx_buffer_desc {
u32 dword[8]; /*seg = 4*/
} __packed;
struct rtl8192_tx_ring { struct rtl8192_tx_ring {
struct rtl_tx_desc *desc; struct rtl_tx_desc *desc;
dma_addr_t dma; dma_addr_t dma;
unsigned int idx; unsigned int idx;
unsigned int entries; unsigned int entries;
struct sk_buff_head queue; struct sk_buff_head queue;
/*add for new trx flow*/
struct rtl_tx_buffer_desc *buffer_desc; /*tx buffer descriptor*/
}; };
struct rtl8192_rx_ring { struct rtl8192_rx_ring {
......
...@@ -489,9 +489,8 @@ bool rtl88ee_rx_query_desc(struct ieee80211_hw *hw, ...@@ -489,9 +489,8 @@ bool rtl88ee_rx_query_desc(struct ieee80211_hw *hw,
void rtl88ee_tx_fill_desc(struct ieee80211_hw *hw, void rtl88ee_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc_tx,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta, struct sk_buff *skb,
struct sk_buff *skb,
u8 hw_queue, struct rtl_tcb_desc *ptcb_desc) u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
...@@ -734,7 +733,8 @@ void rtl88ee_tx_fill_cmddesc(struct ieee80211_hw *hw, ...@@ -734,7 +733,8 @@ void rtl88ee_tx_fill_cmddesc(struct ieee80211_hw *hw,
pdesc, TX_DESC_SIZE); pdesc, TX_DESC_SIZE);
} }
void rtl88ee_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) void rtl88ee_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val)
{ {
if (istx == true) { if (istx == true) {
switch (desc_name) { switch (desc_name) {
......
...@@ -777,15 +777,15 @@ struct rx_desc_88e { ...@@ -777,15 +777,15 @@ struct rx_desc_88e {
void rtl88ee_tx_fill_desc(struct ieee80211_hw *hw, void rtl88ee_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc_tx,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta, struct sk_buff *skb,
struct sk_buff *skb,
u8 hw_queue, struct rtl_tcb_desc *ptcb_desc); u8 hw_queue, struct rtl_tcb_desc *ptcb_desc);
bool rtl88ee_rx_query_desc(struct ieee80211_hw *hw, bool rtl88ee_rx_query_desc(struct ieee80211_hw *hw,
struct rtl_stats *status, struct rtl_stats *status,
struct ieee80211_rx_status *rx_status, struct ieee80211_rx_status *rx_status,
u8 *pdesc, struct sk_buff *skb); u8 *pdesc, struct sk_buff *skb);
void rtl88ee_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val); void rtl88ee_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val);
u32 rtl88ee_get_desc(u8 *pdesc, bool istx, u8 desc_name); u32 rtl88ee_get_desc(u8 *pdesc, bool istx, u8 desc_name);
void rtl88ee_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); void rtl88ee_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
void rtl88ee_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, void rtl88ee_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
......
...@@ -426,7 +426,7 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw, ...@@ -426,7 +426,7 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc_tx,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, struct sk_buff *skb,
u8 hw_queue, struct rtl_tcb_desc *tcb_desc) u8 hw_queue, struct rtl_tcb_desc *tcb_desc)
...@@ -666,7 +666,8 @@ void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, ...@@ -666,7 +666,8 @@ void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw,
"H2C Tx Cmd Content", pdesc, TX_DESC_SIZE); "H2C Tx Cmd Content", pdesc, TX_DESC_SIZE);
} }
void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) void rtl92ce_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val)
{ {
if (istx) { if (istx) {
switch (desc_name) { switch (desc_name) {
......
...@@ -711,8 +711,8 @@ struct rx_desc_92c { ...@@ -711,8 +711,8 @@ struct rx_desc_92c {
} __packed; } __packed;
void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, struct ieee80211_hdr *hdr, u8 *pdesc,
u8 *pdesc, struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, u8 hw_queue, struct sk_buff *skb, u8 hw_queue,
struct rtl_tcb_desc *ptcb_desc); struct rtl_tcb_desc *ptcb_desc);
...@@ -720,7 +720,8 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw, ...@@ -720,7 +720,8 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
struct rtl_stats *stats, struct rtl_stats *stats,
struct ieee80211_rx_status *rx_status, struct ieee80211_rx_status *rx_status,
u8 *pdesc, struct sk_buff *skb); u8 *pdesc, struct sk_buff *skb);
void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val); void rtl92ce_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val);
u32 rtl92ce_get_desc(u8 *pdesc, bool istx, u8 desc_name); u32 rtl92ce_get_desc(u8 *pdesc, bool istx, u8 desc_name);
void rtl92ce_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); void rtl92ce_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
......
...@@ -495,7 +495,7 @@ static void _rtl_tx_desc_checksum(u8 *txdesc) ...@@ -495,7 +495,7 @@ static void _rtl_tx_desc_checksum(u8 *txdesc)
void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc_tx,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, struct sk_buff *skb,
u8 queue_index, u8 queue_index,
......
...@@ -420,7 +420,7 @@ struct sk_buff *rtl8192c_tx_aggregate_hdl(struct ieee80211_hw *, ...@@ -420,7 +420,7 @@ struct sk_buff *rtl8192c_tx_aggregate_hdl(struct ieee80211_hw *,
struct sk_buff_head *); struct sk_buff_head *);
void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc_tx,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, struct sk_buff *skb,
u8 queue_index, u8 queue_index,
......
...@@ -545,7 +545,7 @@ static void _rtl92de_insert_emcontent(struct rtl_tcb_desc *ptcb_desc, ...@@ -545,7 +545,7 @@ static void _rtl92de_insert_emcontent(struct rtl_tcb_desc *ptcb_desc,
void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc_tx,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, struct sk_buff *skb,
u8 hw_queue, struct rtl_tcb_desc *ptcb_desc) u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
...@@ -786,7 +786,8 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, ...@@ -786,7 +786,8 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw,
SET_TX_DESC_OWN(pdesc, 1); SET_TX_DESC_OWN(pdesc, 1);
} }
void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) void rtl92de_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val)
{ {
if (istx) { if (istx) {
switch (desc_name) { switch (desc_name) {
......
...@@ -728,8 +728,8 @@ struct rx_desc_92d { ...@@ -728,8 +728,8 @@ struct rx_desc_92d {
} __packed; } __packed;
void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, struct ieee80211_hdr *hdr, u8 *pdesc,
u8 *pdesc, struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, u8 hw_queue, struct sk_buff *skb, u8 hw_queue,
struct rtl_tcb_desc *ptcb_desc); struct rtl_tcb_desc *ptcb_desc);
...@@ -737,7 +737,8 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, ...@@ -737,7 +737,8 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw,
struct rtl_stats *stats, struct rtl_stats *stats,
struct ieee80211_rx_status *rx_status, struct ieee80211_rx_status *rx_status,
u8 *pdesc, struct sk_buff *skb); u8 *pdesc, struct sk_buff *skb);
void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val); void rtl92de_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val);
u32 rtl92de_get_desc(u8 *pdesc, bool istx, u8 desc_name); u32 rtl92de_get_desc(u8 *pdesc, bool istx, u8 desc_name);
void rtl92de_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); void rtl92de_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
......
...@@ -336,7 +336,7 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, ...@@ -336,7 +336,7 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc_tx,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, struct sk_buff *skb,
u8 hw_queue, struct rtl_tcb_desc *ptcb_desc) u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
...@@ -573,7 +573,8 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, ...@@ -573,7 +573,8 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
} }
} }
void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) void rtl92se_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val)
{ {
if (istx) { if (istx) {
switch (desc_name) { switch (desc_name) {
......
...@@ -29,8 +29,9 @@ ...@@ -29,8 +29,9 @@
#ifndef __REALTEK_PCI92SE_TRX_H__ #ifndef __REALTEK_PCI92SE_TRX_H__
#define __REALTEK_PCI92SE_TRX_H__ #define __REALTEK_PCI92SE_TRX_H__
void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr, void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
u8 *pdesc, struct ieee80211_tx_info *info, struct ieee80211_hdr *hdr, u8 *pdesc,
u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, u8 hw_queue, struct sk_buff *skb, u8 hw_queue,
struct rtl_tcb_desc *ptcb_desc); struct rtl_tcb_desc *ptcb_desc);
...@@ -39,7 +40,8 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool firstseg, ...@@ -39,7 +40,8 @@ void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool firstseg,
bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
struct ieee80211_rx_status *rx_status, u8 *pdesc, struct ieee80211_rx_status *rx_status, u8 *pdesc,
struct sk_buff *skb); struct sk_buff *skb);
void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val); void rtl92se_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val);
u32 rtl92se_get_desc(u8 *pdesc, bool istx, u8 desc_name); u32 rtl92se_get_desc(u8 *pdesc, bool istx, u8 desc_name);
void rtl92se_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); void rtl92se_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
......
...@@ -365,7 +365,7 @@ bool rtl8723ae_rx_query_desc(struct ieee80211_hw *hw, ...@@ -365,7 +365,7 @@ bool rtl8723ae_rx_query_desc(struct ieee80211_hw *hw,
void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw, void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc_tx,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, u8 hw_queue, struct sk_buff *skb, u8 hw_queue,
struct rtl_tcb_desc *ptcdesc) struct rtl_tcb_desc *ptcdesc)
...@@ -597,7 +597,8 @@ void rtl8723ae_tx_fill_cmddesc(struct ieee80211_hw *hw, ...@@ -597,7 +597,8 @@ void rtl8723ae_tx_fill_cmddesc(struct ieee80211_hw *hw,
pdesc, TX_DESC_SIZE); pdesc, TX_DESC_SIZE);
} }
void rtl8723ae_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) void rtl8723ae_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val)
{ {
if (istx == true) { if (istx == true) {
switch (desc_name) { switch (desc_name) {
......
...@@ -700,8 +700,8 @@ struct rx_desc_8723e { ...@@ -700,8 +700,8 @@ struct rx_desc_8723e {
} __packed; } __packed;
void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw, void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct sk_buff *skb, u8 hw_queue, struct sk_buff *skb, u8 hw_queue,
struct rtl_tcb_desc *ptcb_desc); struct rtl_tcb_desc *ptcb_desc);
...@@ -709,7 +709,8 @@ bool rtl8723ae_rx_query_desc(struct ieee80211_hw *hw, ...@@ -709,7 +709,8 @@ bool rtl8723ae_rx_query_desc(struct ieee80211_hw *hw,
struct rtl_stats *status, struct rtl_stats *status,
struct ieee80211_rx_status *rx_status, struct ieee80211_rx_status *rx_status,
u8 *pdesc, struct sk_buff *skb); u8 *pdesc, struct sk_buff *skb);
void rtl8723ae_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val); void rtl8723ae_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val);
u32 rtl8723ae_get_desc(u8 *pdesc, bool istx, u8 desc_name); u32 rtl8723ae_get_desc(u8 *pdesc, bool istx, u8 desc_name);
void rtl8723ae_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); void rtl8723ae_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
void rtl8723ae_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, void rtl8723ae_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
......
...@@ -639,7 +639,7 @@ bool rtl8723be_rx_query_desc(struct ieee80211_hw *hw, ...@@ -639,7 +639,7 @@ bool rtl8723be_rx_query_desc(struct ieee80211_hw *hw,
void rtl8723be_tx_fill_desc(struct ieee80211_hw *hw, void rtl8723be_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc_tx,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct sk_buff *skb, struct ieee80211_sta *sta, struct sk_buff *skb,
u8 hw_queue, struct rtl_tcb_desc *ptcb_desc) u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
{ {
...@@ -858,7 +858,8 @@ void rtl8723be_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, ...@@ -858,7 +858,8 @@ void rtl8723be_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
SET_TX_DESC_USE_RATE(pdesc, 1); SET_TX_DESC_USE_RATE(pdesc, 1);
} }
void rtl8723be_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) void rtl8723be_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val)
{ {
if (istx) { if (istx) {
switch (desc_name) { switch (desc_name) {
......
...@@ -597,15 +597,16 @@ struct rx_desc_8723be { ...@@ -597,15 +597,16 @@ struct rx_desc_8723be {
} __packed; } __packed;
void rtl8723be_tx_fill_desc(struct ieee80211_hw *hw, void rtl8723be_tx_fill_desc(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u8 *pdesc_tx, struct ieee80211_hdr *hdr, u8 *pdesc,
struct ieee80211_tx_info *info, u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
struct ieee80211_sta *sta, struct sk_buff *skb, struct ieee80211_sta *sta, struct sk_buff *skb,
u8 hw_queue, struct rtl_tcb_desc *ptcb_desc); u8 hw_queue, struct rtl_tcb_desc *ptcb_desc);
bool rtl8723be_rx_query_desc(struct ieee80211_hw *hw, bool rtl8723be_rx_query_desc(struct ieee80211_hw *hw,
struct rtl_stats *status, struct rtl_stats *status,
struct ieee80211_rx_status *rx_status, struct ieee80211_rx_status *rx_status,
u8 *pdesc, struct sk_buff *skb); u8 *pdesc, struct sk_buff *skb);
void rtl8723be_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val); void rtl8723be_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
u8 desc_name, u8 *val);
u32 rtl8723be_get_desc(u8 *pdesc, bool istx, u8 desc_name); u32 rtl8723be_get_desc(u8 *pdesc, bool istx, u8 desc_name);
bool rtl8723be_is_tx_desc_closed(struct ieee80211_hw *hw, bool rtl8723be_is_tx_desc_closed(struct ieee80211_hw *hw,
u8 hw_queue, u16 index); u8 hw_queue, u16 index);
......
...@@ -994,7 +994,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, ...@@ -994,7 +994,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw,
seq_number += 1; seq_number += 1;
seq_number <<= 4; seq_number <<= 4;
} }
rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, sta, skb, rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, NULL, info, sta, skb,
hw_queue, &tcb_desc); hw_queue, &tcb_desc);
if (!ieee80211_has_morefrags(hdr->frame_control)) { if (!ieee80211_has_morefrags(hdr->frame_control)) {
if (qc) if (qc)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment