Skip to contentSkip to conversation

ath6kl: use netdev_features_t

PATCH In review Kalle Valo 1 participant 4 messages Jan 17, 2012 – Jan 18, 2012 Atheros ATH6KL wireless driver

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

PATCH 1/3 ath6kl: use netdev_features_t

Commit c8f44affb7 ("net: introduce and use netdev_features_t for device features sets") added netdev_features_t to ndo_set_features. Change ath6kl to use the new type.

This fixes a warning:

ath6kl/main.c:1170: warning: initialization from incompatible pointer type

---
 drivers/net/wireless/ath/ath6kl/main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/wireless/ath/ath6kl/main.c +2 -1
index 0a6d6e2..3a3b2cc 100644
@@ -1021,7 +1021,8 @@ static struct net_device_stats *ath6kl_get_stats(struct net_device *dev)
 	return &vif->net_stats;
 }
 
-static int ath6kl_set_features(struct net_device *dev, u32 features)
+static int ath6kl_set_features(struct net_device *dev,
+			       netdev_features_t features)
 {
 	struct ath6kl_vif *vif = netdev_priv(dev);
 	struct ath6kl *ar = vif->ar;
author
#1 lore raw

PATCH 2/3 ath6kl: remove -D__CHECK_ENDIAN__ from Makefile

As drivers/net/wireless/ath/Makefile contains the flag to enable endian checks there's no need to have it in ath6kl makefile anymore.

---
 drivers/net/wireless/ath/ath6kl/Makefile |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath6kl/Makefile +0 -2
index 7070693..e24b617 100644
@@ -33,5 +33,3 @@ ath6kl-y += txrx.o
 ath6kl-y += wmi.o
 ath6kl-y += sdio.o
 ath6kl-$(CONFIG_NL80211_TESTMODE) += testmode.o
-
-ccflags-y += -D__CHECK_ENDIAN__
author
#2 lore raw

PATCH 3/3 ath6kl: fix uninitialized warning in ath6kl_process_uapsdq()

In reply to Kalle Valo

Before I commited patch c1762a3fe ("ath6kl: Add support for uAPSD") I did a minor change how up variable is initialised in ath6kl_process_uapsdq(). But I was sloppy and caused this compiler warning:

txrx.c:88:5: warning: 'up' may be used uninitialized in this function

Revert my change to fix the warning.

---
 drivers/net/wireless/ath/ath6kl/txrx.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath6kl/txrx.c +1 -3
index 91bbc1f..dd63371 100644
@@ -85,7 +85,7 @@ static bool ath6kl_process_uapsdq(struct ath6kl_sta *conn,
 	struct ath6kl *ar = vif->ar;
 	bool is_apsdq_empty = false;
 	struct ethhdr *datap = (struct ethhdr *) skb->data;
-	u8 up, traffic_class, *ip_hdr;
+	u8 up = 0, traffic_class, *ip_hdr;
 	u16 ether_type;
 	struct ath6kl_llc_snap_hdr *llc_hdr;
 
@@ -122,8 +122,6 @@ static bool ath6kl_process_uapsdq(struct ath6kl_sta *conn,
 		if (ether_type == IP_ETHERTYPE)
 			up = ath6kl_wmi_determine_user_priority(
 							ip_hdr, 0);
-	} else {
-		up = 0;
 	}
 
 	traffic_class = ath6kl_wmi_get_traffic_class(up);
author
#3 lore raw
In reply to Kalle Valo
Quoted 9 lines · Kalle Valo

Commit c8f44affb7 ("net: introduce and use netdev_features_t for device features sets") added netdev_features_t to ndo_set_features. Change ath6kl to use the new type.

This fixes a warning:

ath6kl/main.c:1170: warning: initialization from incompatible pointer type

All three applied.

Kalle