qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_tx_send.c
Fix Datapath kernel checkpatch warnings in ol_tx_send.c
Change-Id: I94b3e093eac8d51524a689151028ef296cc4da82
CRs-Fixed: 2032874
diff --git a/core/dp/txrx/ol_tx_send.c b/core/dp/txrx/ol_tx_send.c
index 80b1def..8b3c8c8 100644
--- a/core/dp/txrx/ol_tx_send.c
+++ b/core/dp/txrx/ol_tx_send.c
@@ -107,13 +107,11 @@
static inline void
ol_tx_target_credit_decr_int(struct ol_txrx_pdev_t *pdev, int delta)
{
- return;
}
static inline void
ol_tx_target_credit_incr_int(struct ol_txrx_pdev_t *pdev, int delta)
{
- return;
}
#endif
@@ -139,6 +137,7 @@
static void ol_tx_flow_ct_unpause_os_q(ol_txrx_pdev_handle pdev)
{
struct ol_txrx_vdev_t *vdev;
+
TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) {
if (qdf_atomic_read(&vdev->os_q_paused) &&
(vdev->tx_fl_hwm != 0)) {
@@ -159,6 +158,7 @@
static void ol_tx_flow_ct_unpause_os_q(ol_txrx_pdev_handle pdev)
{
struct ol_txrx_vdev_t *vdev;
+
TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) {
if (qdf_atomic_read(&vdev->os_q_paused) &&
(vdev->tx_fl_hwm != 0)) {
@@ -181,7 +181,6 @@
static inline void ol_tx_flow_ct_unpause_os_q(ol_txrx_pdev_handle pdev)
{
- return;
}
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
@@ -254,6 +253,7 @@
qdf_nbuf_t head_msdu, int num_msdus)
{
qdf_nbuf_t rejected;
+
OL_TX_CREDIT_RECLAIM(pdev);
rejected = htt_tx_send_batch(pdev->htt_pdev, head_msdu, num_msdus);
@@ -351,6 +351,7 @@
qdf_nbuf_t msdu, uint16_t msdu_id)
{
struct ol_txrx_pdev_t *pdev = txrx_pdev;
+
ol_tx_download_done_base(pdev, status, msdu, msdu_id);
}
@@ -401,7 +402,6 @@
enum htt_tx_status status,
uint16_t *desc_ids, int num_msdus)
{
- return;
}
#endif /* QCA_COMPUTE_TX_DELAY */
@@ -459,12 +459,12 @@
#define ol_tx_msdu_complete(_pdev, _tx_desc, _tx_descs, \
_netbuf, _lcl_freelist, \
_tx_desc_last, _status, is_tx_desc_freed) \
- do { \
+ { \
is_tx_desc_freed = 0; \
ol_tx_msdu_complete_single((_pdev), (_tx_desc), \
(_netbuf), (_lcl_freelist), \
_tx_desc_last) \
- } while (0)
+ }
#else /* !QCA_TX_STD_PATH_ONLY */
#define ol_tx_msdu_complete(_pdev, _tx_desc, _tx_descs, \
_netbuf, _lcl_freelist, \
@@ -488,11 +488,11 @@
#define ol_tx_msdu_complete(_pdev, _tx_desc, _tx_descs, \
_netbuf, _lcl_freelist, \
_tx_desc_last, _status, is_tx_desc_freed) \
- do { \
+ { \
is_tx_desc_freed = 0; \
ol_tx_msdu_complete_batch((_pdev), (_tx_desc), \
(_tx_descs), (_status)) \
- } while (0)
+ }
#else /* !QCA_TX_STD_PATH_ONLY */
#define ol_tx_msdu_complete(_pdev, _tx_desc, _tx_descs, \
_netbuf, _lcl_freelist, \
@@ -539,8 +539,8 @@
if (num_disarded)
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO,
- "Warning: freed %d tx descs for which"
- "no tx completion rcvd from the target", num_disarded);
+ "Warning: freed %d tx descs for which no tx completion rcvd from the target",
+ num_disarded);
}
#endif
@@ -555,11 +555,12 @@
ol_tx_flow_ct_unpause_os_q(pdev);
}
-/* WARNING: ol_tx_inspect_handler()'s bahavior is similar to that of
- ol_tx_completion_handler().
- * any change in ol_tx_completion_handler() must be mirrored in
- ol_tx_inspect_handler().
-*/
+/**
+ * WARNING: ol_tx_inspect_handler()'s bahavior is similar to that of
+ * ol_tx_completion_handler().
+ * any change in ol_tx_completion_handler() must be mirrored in
+ * ol_tx_inspect_handler().
+ */
void
ol_tx_completion_handler(ol_txrx_pdev_handle pdev,
int num_msdus,
@@ -851,8 +852,9 @@
}
}
-/* WARNING: ol_tx_inspect_handler()'s bahavior is similar to that of
- ol_tx_completion_handler().
+/**
+ * WARNING: ol_tx_inspect_handler()'s bahavior is similar to that of
+ * ol_tx_completion_handler().
* any change in ol_tx_completion_handler() must be mirrored here.
*/
void
@@ -892,8 +894,9 @@
if (qdf_atomic_dec_and_test(&tx_desc->ref_cnt))
#endif
{
- /* for this function only, force htt status to be
- "htt_tx_status_ok"
+ /*
+ * For this function only, force htt status to be
+ * "htt_tx_status_ok"
* for graceful freeing of this multicast frame
*/
ol_tx_msdu_complete(pdev, tx_desc, tx_descs, netbuf,
@@ -1053,6 +1056,7 @@
for (i = 0, j = 0; i < QCA_TX_DELAY_HIST_REPORT_BINS - 1; i++) {
uint16_t internal_bin_sum = 0;
+
while (j < (1 << i))
internal_bin_sum += data->hist_bins_queue[j++];
@@ -1090,12 +1094,14 @@
if (pdev->frame_format == wlan_frm_fmt_802_3) {
struct ethernet_hdr_t *enet_hdr;
+
enet_hdr = (struct ethernet_hdr_t *)qdf_nbuf_data(msdu);
l2_hdr_size = sizeof(struct ethernet_hdr_t);
ethertype =
(enet_hdr->ethertype[0] << 8) | enet_hdr->ethertype[1];
if (!IS_ETHERTYPE(ethertype)) {
struct llc_snap_hdr_t *llc_hdr;
+
llc_hdr = (struct llc_snap_hdr_t *)
(qdf_nbuf_data(msdu) + l2_hdr_size);
l2_hdr_size += sizeof(struct llc_snap_hdr_t);
@@ -1105,6 +1111,7 @@
}
} else {
struct llc_snap_hdr_t *llc_hdr;
+
l2_hdr_size = sizeof(struct ieee80211_frame);
llc_hdr = (struct llc_snap_hdr_t *)(qdf_nbuf_data(msdu)
+ l2_hdr_size);
@@ -1129,14 +1136,16 @@
#ifdef QCA_COMPUTE_TX_DELAY_PER_TID
struct ol_tx_desc_t *tx_desc = ol_tx_desc_find(pdev, msdu_id);
uint8_t tid;
-
qdf_nbuf_t msdu = tx_desc->netbuf;
+
tid = qdf_nbuf_get_tid(msdu);
if (tid == QDF_NBUF_TX_EXT_TID_INVALID) {
tid = ol_tx_delay_tid_from_l3_hdr(pdev, msdu, tx_desc);
if (tid == QDF_NBUF_TX_EXT_TID_INVALID) {
- /* TID could not be determined
- (this is not an IP frame?) */
+ /*
+ * TID could not be determined
+ * (this is not an IP frame?)
+ */
return -EINVAL;
}
}