From: Kalle Valo <kvalo@codeaurora.org>
To: Karthikeyan Periyasamy <periyasa@codeaurora.org>
Cc: ath11k@lists.infradead.org
Subject: Re: [PATCH] ath11k: Cleanup the access code of hw mac_id mapping
Date: Wed, 12 Jun 2019 11:08:13 +0300 [thread overview]
Message-ID: <87o933fcpe.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1560159795-5931-1-git-send-email-periyasa@codeaurora.org> (Karthikeyan Periyasamy's message of "Mon, 10 Jun 2019 15:13:15 +0530")
Karthikeyan Periyasamy <periyasa@codeaurora.org> writes:
> Added separate function call to get the hw mac id from the pdev index.
>
> Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
[...]
> +/* Map from pdev index to hw mac index */
> +u8 ath11k_core_get_hw_mac_id(struct ath11k_base *ab, int pdev_idx)
> +{
> + u8 mac_id;
> +
> + switch (pdev_idx) {
> + case 0:
> + mac_id = 0;
> + break;
> + case 1:
> + mac_id = 2;
> + break;
> + case 2:
> + mac_id = 1;
> + break;
> + default:
> + mac_id = ATH11K_INVALID_HW_MAC_ID;
> + ath11k_warn(ab, "Invalid pdev idx %d\n", pdev_idx);
> + break;
> + }
> + return mac_id;
> +}
I simplified this function to:
u8 ath11k_core_get_hw_mac_id(struct ath11k_base *ab, int pdev_idx)
{
switch (pdev_idx) {
case 0:
return 0;
case 1:
return 2;
case 2:
return 1;
default:
ath11k_warn(ab, "Invalid pdev idx %d\n", pdev_idx);
return ATH11K_INVALID_HW_MAC_ID;
}
}
--
Kalle Valo
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2019-06-12 8:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 9:43 [PATCH] ath11k: Cleanup the access code of hw mac_id mapping Karthikeyan Periyasamy
2019-06-12 8:08 ` Kalle Valo [this message]
2019-06-12 9:03 ` Karthikeyan Periyasamy
2019-06-12 11:12 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o933fcpe.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=periyasa@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox