Search Linux Wireless

Re: [RFC v2 76/96] cl8k: add stats.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/24/2022 4:34 AM, viktor.barna@xxxxxxxxxx wrote:
[snip]

+static void _cl_stats_update_tx(struct cl_hw *cl_hw, struct cl_sta *cl_sta,
+				struct cl_agg_tx_report *agg_report)
+{
+	struct cl_stats *stats = cl_sta->stats;
+	struct cl_tx_cntrs *cntrs;
+	union cl_rate_ctrl_info rate_ctrl_info = {
+		.word = le32_to_cpu(agg_report->rate_cntrl_info)};
+	u8 bw, nss, mcs, gi, bf;
+
+	switch (rate_ctrl_info.field.format_mod) {
+	case WRS_MODE_HE:
+		nss = (rate_ctrl_info.field.mcs_index >> 4);
+		mcs = (rate_ctrl_info.field.mcs_index & 0xF);
+		gi = rate_ctrl_info.field.gi;
+
+		{

why an embedded block? seems to serve no purpose

+			bw = rate_ctrl_info.field.bw;
+			bf = agg_report->bf;
+
+				cntrs = &stats->tx.he[bw][nss][mcs][gi][bf];

bad indentation

+		}
+		break;
+	case WRS_MODE_VHT:
+		bw = rate_ctrl_info.field.bw;
+		nss = (rate_ctrl_info.field.mcs_index >> 4);
+		mcs = (rate_ctrl_info.field.mcs_index & 0xF);
+		gi = rate_ctrl_info.field.gi;
+		bf = agg_report->bf;
+
+			cntrs = &stats->tx.vht[bw][nss][mcs][gi][bf];

bad indentation

+		break;
+	case WRS_MODE_HT:
+		bw = rate_ctrl_info.field.bw;
+		nss = (rate_ctrl_info.field.mcs_index >> 3);
+		mcs = (rate_ctrl_info.field.mcs_index & 0x7);
+		gi = rate_ctrl_info.field.gi;
+		cntrs = &stats->tx.ht[bw][nss][mcs][gi];
+		break;
+	case WRS_MODE_OFDM:
+		mcs = rate_ctrl_info.field.mcs_index - RATE_CTRL_OFFSET_OFDM;
+		cntrs = &stats->tx.ofdm[mcs];
+		break;
+	case WRS_MODE_CCK:
+		mcs = rate_ctrl_info.field.mcs_index;
+		cntrs = &stats->tx.cck[mcs];
+		break;
+	default:
+		return;
+	}



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux