Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: rename ieee80211_tx_status() to ieee80211_tx_status_skb()

make htmldocs warns:

Documentation/driver-api/80211/mac80211:109: ./include/net/mac80211.h:5170: WARNING: Duplicate C declaration, also defined at mac80211:1117.
Declaration is '.. c:function:: void ieee80211_tx_status (struct ieee80211_hw *hw, struct sk_buff *skb)'.

This is because there's a function named ieee80211_tx_status() and a struct named
ieee80211_tx_status. This has been discussed previously but no solution found:

https://lore.kernel.org/all/20220521114629.6ee9fc06@coco.lan/

There's also a bug open for three years with no solution in sight:

https://github.com/sphinx-doc/sphinx/pull/8313

So I guess we have no other solution than to a workaround this in the code,
for example to rename the function to ieee80211_tx_status_skb() to avoid the
name conflict. I got the idea for the name from ieee80211_tx_status_noskb() in
which the skb is not provided as an argument, instead with
ieee80211_tx_status_skb() the skb is provided.

Compile tested only.

Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231012114229.2931808-2-kvalo@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Kalle Valo and committed by
Johannes Berg
2703bc85 c3e5f5f6

+37 -37
+1 -1
Documentation/driver-api/80211/mac80211.rst
··· 120 120 ieee80211_rx 121 121 ieee80211_rx_ni 122 122 ieee80211_rx_irqsafe 123 - ieee80211_tx_status 123 + ieee80211_tx_status_skb 124 124 ieee80211_tx_status_ni 125 125 ieee80211_tx_status_irqsafe 126 126 ieee80211_rts_get
+2 -2
drivers/net/wireless/ath/ath12k/dp_tx.c
··· 401 401 } 402 402 } 403 403 404 - ieee80211_tx_status(ar->hw, msdu); 404 + ieee80211_tx_status_skb(ar->hw, msdu); 405 405 } 406 406 407 407 static void ··· 498 498 * Might end up reporting it out-of-band from HTT stats. 499 499 */ 500 500 501 - ieee80211_tx_status(ar->hw, msdu); 501 + ieee80211_tx_status_skb(ar->hw, msdu); 502 502 503 503 exit: 504 504 rcu_read_unlock();
+1 -1
drivers/net/wireless/ath/ath5k/base.c
··· 1770 1770 ah->stats.antenna_tx[0]++; /* invalid */ 1771 1771 1772 1772 trace_ath5k_tx_complete(ah, skb, txq, ts); 1773 - ieee80211_tx_status(ah->hw, skb); 1773 + ieee80211_tx_status_skb(ah->hw, skb); 1774 1774 } 1775 1775 1776 1776 static void
+1 -1
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
··· 523 523 } 524 524 525 525 /* Send status to mac80211 */ 526 - ieee80211_tx_status(priv->hw, skb); 526 + ieee80211_tx_status_skb(priv->hw, skb); 527 527 } 528 528 529 529 static inline void ath9k_htc_tx_drainq(struct ath9k_htc_priv *priv,
+1 -1
drivers/net/wireless/ath/ath9k/xmit.c
··· 94 94 95 95 if (info->flags & (IEEE80211_TX_CTL_REQ_TX_STATUS | 96 96 IEEE80211_TX_STATUS_EOSP)) { 97 - ieee80211_tx_status(hw, skb); 97 + ieee80211_tx_status_skb(hw, skb); 98 98 return; 99 99 } 100 100
+2 -2
drivers/net/wireless/broadcom/b43/dma.c
··· 1531 1531 ring->nr_failed_tx_packets++; 1532 1532 ring->nr_total_packet_tries += status->frame_count; 1533 1533 #endif /* DEBUG */ 1534 - ieee80211_tx_status(dev->wl->hw, meta->skb); 1534 + ieee80211_tx_status_skb(dev->wl->hw, meta->skb); 1535 1535 1536 - /* skb will be freed by ieee80211_tx_status(). 1536 + /* skb will be freed by ieee80211_tx_status_skb(). 1537 1537 * Poison our pointer. */ 1538 1538 meta->skb = B43_DMA_PTR_POISON; 1539 1539 } else {
+1 -1
drivers/net/wireless/broadcom/b43/pio.c
··· 582 582 q->buffer_used -= total_len; 583 583 q->free_packet_slots += 1; 584 584 585 - ieee80211_tx_status(dev->wl->hw, pack->skb); 585 + ieee80211_tx_status_skb(dev->wl->hw, pack->skb); 586 586 pack->skb = NULL; 587 587 list_add(&pack->list, &q->packets_list); 588 588
+2 -2
drivers/net/wireless/intel/iwlwifi/dvm/tx.c
··· 1247 1247 1248 1248 while (!skb_queue_empty(&skbs)) { 1249 1249 skb = __skb_dequeue(&skbs); 1250 - ieee80211_tx_status(priv->hw, skb); 1250 + ieee80211_tx_status_skb(priv->hw, skb); 1251 1251 } 1252 1252 } 1253 1253 ··· 1384 1384 1385 1385 while (!skb_queue_empty(&reclaimed_skbs)) { 1386 1386 skb = __skb_dequeue(&reclaimed_skbs); 1387 - ieee80211_tx_status(priv->hw, skb); 1387 + ieee80211_tx_status_skb(priv->hw, skb); 1388 1388 } 1389 1389 }
+2 -2
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
··· 1724 1724 RS_DRV_DATA_PACK(lq_color, tx_resp->reduced_tpc); 1725 1725 1726 1726 if (likely(!iwl_mvm_time_sync_frame(mvm, skb, hdr->addr1))) 1727 - ieee80211_tx_status(mvm->hw, skb); 1727 + ieee80211_tx_status_skb(mvm->hw, skb); 1728 1728 } 1729 1729 1730 1730 /* This is an aggregation queue or might become one, so we use ··· 2080 2080 2081 2081 while (!skb_queue_empty(&reclaimed_skbs)) { 2082 2082 skb = __skb_dequeue(&reclaimed_skbs); 2083 - ieee80211_tx_status(mvm->hw, skb); 2083 + ieee80211_tx_status_skb(mvm->hw, skb); 2084 2084 } 2085 2085 } 2086 2086
+1 -1
drivers/net/wireless/mediatek/mt7601u/tx.c
··· 110 110 info->flags |= IEEE80211_TX_STAT_ACK; 111 111 112 112 spin_lock_bh(&dev->mac_lock); 113 - ieee80211_tx_status(dev->hw, skb); 113 + ieee80211_tx_status_skb(dev->hw, skb); 114 114 spin_unlock_bh(&dev->mac_lock); 115 115 } 116 116
+1 -1
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
··· 533 533 */ 534 534 if (!(skbdesc_flags & SKBDESC_NOT_MAC80211)) { 535 535 if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_TASKLET_CONTEXT)) 536 - ieee80211_tx_status(rt2x00dev->hw, entry->skb); 536 + ieee80211_tx_status_skb(rt2x00dev->hw, entry->skb); 537 537 else 538 538 ieee80211_tx_status_ni(rt2x00dev->hw, entry->skb); 539 539 } else {
+1 -1
drivers/net/wireless/st/cw1200/txrx.c
··· 994 994 txpriv->raw_link_id, txpriv->tid); 995 995 tx_policy_put(priv, txpriv->rate_id); 996 996 } 997 - ieee80211_tx_status(priv->hw, skb); 997 + ieee80211_tx_status_skb(priv->hw, skb); 998 998 } 999 999 1000 1000 void cw1200_rx_cb(struct cw1200_common *priv,
+3 -3
drivers/net/wireless/ti/wl1251/tx.c
··· 434 434 result->status, wl1251_tx_parse_status(result->status)); 435 435 436 436 437 - ieee80211_tx_status(wl->hw, skb); 437 + ieee80211_tx_status_skb(wl->hw, skb); 438 438 439 439 wl->tx_frames[result->id] = NULL; 440 440 } ··· 566 566 if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) 567 567 continue; 568 568 569 - ieee80211_tx_status(wl->hw, skb); 569 + ieee80211_tx_status_skb(wl->hw, skb); 570 570 } 571 571 572 572 for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++) ··· 577 577 if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) 578 578 continue; 579 579 580 - ieee80211_tx_status(wl->hw, skb); 580 + ieee80211_tx_status_skb(wl->hw, skb); 581 581 wl->tx_frames[i] = NULL; 582 582 } 583 583 }
+15 -15
include/net/mac80211.h
··· 4911 4911 * for a single hardware must be synchronized against each other. Calls to 4912 4912 * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be 4913 4913 * mixed for a single hardware. Must not run concurrently with 4914 - * ieee80211_tx_status() or ieee80211_tx_status_ni(). 4914 + * ieee80211_tx_status_skb() or ieee80211_tx_status_ni(). 4915 4915 * 4916 4916 * This function must be called with BHs disabled and RCU read lock 4917 4917 * ··· 4936 4936 * for a single hardware must be synchronized against each other. Calls to 4937 4937 * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be 4938 4938 * mixed for a single hardware. Must not run concurrently with 4939 - * ieee80211_tx_status() or ieee80211_tx_status_ni(). 4939 + * ieee80211_tx_status_skb() or ieee80211_tx_status_ni(). 4940 4940 * 4941 4941 * This function must be called with BHs disabled. 4942 4942 * ··· 4961 4961 * for a single hardware must be synchronized against each other. Calls to 4962 4962 * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be 4963 4963 * mixed for a single hardware. Must not run concurrently with 4964 - * ieee80211_tx_status() or ieee80211_tx_status_ni(). 4964 + * ieee80211_tx_status_skb() or ieee80211_tx_status_ni(). 4965 4965 * 4966 4966 * In process context use instead ieee80211_rx_ni(). 4967 4967 * ··· 4981 4981 * 4982 4982 * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not 4983 4983 * be mixed for a single hardware.Must not run concurrently with 4984 - * ieee80211_tx_status() or ieee80211_tx_status_ni(). 4984 + * ieee80211_tx_status_skb() or ieee80211_tx_status_ni(). 4985 4985 * 4986 4986 * @hw: the hardware this frame came in on 4987 4987 * @skb: the buffer to receive, owned by mac80211 after this call ··· 4996 4996 * 4997 4997 * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may 4998 4998 * not be mixed for a single hardware. Must not run concurrently with 4999 - * ieee80211_tx_status() or ieee80211_tx_status_ni(). 4999 + * ieee80211_tx_status_skb() or ieee80211_tx_status_ni(). 5000 5000 * 5001 5001 * @hw: the hardware this frame came in on 5002 5002 * @skb: the buffer to receive, owned by mac80211 after this call ··· 5172 5172 struct ieee80211_tx_info *info); 5173 5173 5174 5174 /** 5175 - * ieee80211_tx_status - transmit status callback 5175 + * ieee80211_tx_status_skb - transmit status callback 5176 5176 * 5177 5177 * Call this function for all transmitted frames after they have been 5178 5178 * transmitted. It is permissible to not call this function for ··· 5187 5187 * @hw: the hardware the frame was transmitted by 5188 5188 * @skb: the frame that was transmitted, owned by mac80211 after this call 5189 5189 */ 5190 - void ieee80211_tx_status(struct ieee80211_hw *hw, 5191 - struct sk_buff *skb); 5190 + void ieee80211_tx_status_skb(struct ieee80211_hw *hw, 5191 + struct sk_buff *skb); 5192 5192 5193 5193 /** 5194 5194 * ieee80211_tx_status_ext - extended transmit status callback 5195 5195 * 5196 - * This function can be used as a replacement for ieee80211_tx_status 5196 + * This function can be used as a replacement for ieee80211_tx_status_skb() 5197 5197 * in drivers that may want to provide extra information that does not 5198 5198 * fit into &struct ieee80211_tx_info. 5199 5199 * ··· 5210 5210 /** 5211 5211 * ieee80211_tx_status_noskb - transmit status callback without skb 5212 5212 * 5213 - * This function can be used as a replacement for ieee80211_tx_status 5213 + * This function can be used as a replacement for ieee80211_tx_status_skb() 5214 5214 * in drivers that cannot reliably map tx status information back to 5215 5215 * specific skbs. 5216 5216 * ··· 5238 5238 /** 5239 5239 * ieee80211_tx_status_ni - transmit status callback (in process context) 5240 5240 * 5241 - * Like ieee80211_tx_status() but can be called in process context. 5241 + * Like ieee80211_tx_status_skb() but can be called in process context. 5242 5242 * 5243 - * Calls to this function, ieee80211_tx_status() and 5243 + * Calls to this function, ieee80211_tx_status_skb() and 5244 5244 * ieee80211_tx_status_irqsafe() may not be mixed 5245 5245 * for a single hardware. 5246 5246 * ··· 5251 5251 struct sk_buff *skb) 5252 5252 { 5253 5253 local_bh_disable(); 5254 - ieee80211_tx_status(hw, skb); 5254 + ieee80211_tx_status_skb(hw, skb); 5255 5255 local_bh_enable(); 5256 5256 } 5257 5257 5258 5258 /** 5259 5259 * ieee80211_tx_status_irqsafe - IRQ-safe transmit status callback 5260 5260 * 5261 - * Like ieee80211_tx_status() but can be called in IRQ context 5261 + * Like ieee80211_tx_status_skb() but can be called in IRQ context 5262 5262 * (internally defers to a tasklet.) 5263 5263 * 5264 - * Calls to this function, ieee80211_tx_status() and 5264 + * Calls to this function, ieee80211_tx_status_skb() and 5265 5265 * ieee80211_tx_status_ni() may not be mixed for a single hardware. 5266 5266 * 5267 5267 * @hw: the hardware the frame was transmitted by
+1 -1
net/mac80211/main.c
··· 319 319 break; 320 320 case IEEE80211_TX_STATUS_MSG: 321 321 skb->pkt_type = 0; 322 - ieee80211_tx_status(&local->hw, skb); 322 + ieee80211_tx_status_skb(&local->hw, skb); 323 323 break; 324 324 default: 325 325 WARN(1, "mac80211: Packet is of unknown type %d\n",
+2 -2
net/mac80211/status.c
··· 1092 1092 send_to_cooked, status); 1093 1093 } 1094 1094 1095 - void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) 1095 + void ieee80211_tx_status_skb(struct ieee80211_hw *hw, struct sk_buff *skb) 1096 1096 { 1097 1097 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 1098 1098 struct ieee80211_local *local = hw_to_local(hw); ··· 1111 1111 ieee80211_tx_status_ext(hw, &status); 1112 1112 rcu_read_unlock(); 1113 1113 } 1114 - EXPORT_SYMBOL(ieee80211_tx_status); 1114 + EXPORT_SYMBOL(ieee80211_tx_status_skb); 1115 1115 1116 1116 void ieee80211_tx_status_ext(struct ieee80211_hw *hw, 1117 1117 struct ieee80211_tx_status *status)