diff mbox

[5/6] ath9k: Use defined constants consistently.

Message ID 1465305001-26067-5-git-send-email-benjamin@sipsolutions.net (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Benjamin Berg June 7, 2016, 1:10 p.m. UTC
From: Benjamin Berg <benjamin.berg@open-mesh.com>

Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com>
---
 drivers/net/wireless/ath/ath9k/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Felix Fietkau June 7, 2016, 1:32 p.m. UTC | #1
On 2016-06-07 15:10, Benjamin Berg wrote:
> From: Benjamin Berg <benjamin.berg@open-mesh.com>
> 
> Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com>
> ---
>  drivers/net/wireless/ath/ath9k/main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index f2ebc85..6a81298 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -1785,9 +1785,10 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
>  	if ((avp->chanctx == sc->cur_chan) &&
>  	    (changed & BSS_CHANGED_ERP_SLOT)) {
>  		if (bss_conf->use_short_slot)
> -			slottime = 9;
> +			slottime = ATH9K_SLOT_TIME_9;
>  		else
> -			slottime = 20;
> +			slottime = ATH9K_SLOT_TIME_20;
Wouldn't it be better to just remove those pointless defines?

- Felix

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index f2ebc85..6a81298 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1785,9 +1785,10 @@  static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
 	if ((avp->chanctx == sc->cur_chan) &&
 	    (changed & BSS_CHANGED_ERP_SLOT)) {
 		if (bss_conf->use_short_slot)
-			slottime = 9;
+			slottime = ATH9K_SLOT_TIME_9;
 		else
-			slottime = 20;
+			slottime = ATH9K_SLOT_TIME_20;
+
 		if (vif->type == NL80211_IFTYPE_AP) {
 			/*
 			 * Defer update, so that connected stations can adjust