Skip to contentSkip to conversation

mac80211: Fix pkt_type annotations

PATCH Applied Michael Buesch 2 participants 2 messages Mar 6, 2007 – Mar 23, 2007 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Fix pkt_type annotations

There is no need for an instance of the enum in ieee80211_local. Remove it. Also make the constants uppercase to respect kernel coding style.

net/mac80211/ieee80211.c +4 -4
Index: wireless-dev/net/mac80211/ieee80211.c
===================================================================
@@ -4051,7 +4051,7 @@ void ieee80211_rx_irqsafe(struct ieee802
 	skb->dev = local->mdev;
 	/* copy status into skb->cb for use by tasklet */
 	memcpy(skb->cb, status, sizeof(*status));
-	skb->pkt_type = ieee80211_rx_msg;
+	skb->pkt_type = IEEE80211_RX_MSG;
 	skb_queue_tail(&local->skb_queue, skb);
 	tasklet_schedule(&local->tasklet);
 }
@@ -4081,7 +4081,7 @@ void ieee80211_tx_status_irqsafe(struct 
 	/* copy pointer to saved status into skb->cb for use by tasklet */
 	memcpy(skb->cb, &saved, sizeof(saved));
 
-	skb->pkt_type = ieee80211_tx_status_msg;
+	skb->pkt_type = IEEE80211_TX_STATUS_MSG;
 	skb_queue_tail(status->control.flags & IEEE80211_TXCTL_REQ_TX_STATUS ?
 		       &local->skb_queue : &local->skb_queue_unreliable, skb);
 	tmp = skb_queue_len(&local->skb_queue) +
@@ -4108,7 +4108,7 @@ static void ieee80211_tasklet_handler(un
 	while ((skb = skb_dequeue(&local->skb_queue)) ||
 	       (skb = skb_dequeue(&local->skb_queue_unreliable))) {
 		switch (skb->pkt_type) {
-		case ieee80211_rx_msg:
+		case IEEE80211_RX_MSG:
 			/* status is in skb->cb */
 			memcpy(&rx_status, skb->cb, sizeof(rx_status));
 			/* Clear skb->type in order to not confuse kernel
@@ -4116,7 +4116,7 @@ static void ieee80211_tasklet_handler(un
 			skb->pkt_type = 0;
 			__ieee80211_rx(local_to_hw(local), skb, &rx_status);
 			break;
-		case ieee80211_tx_status_msg:
+		case IEEE80211_TX_STATUS_MSG:
 			/* get pointer to saved status out of skb->cb */
 			memcpy(&tx_status, skb->cb, sizeof(tx_status));
 			skb->pkt_type = 0;
net/mac80211/ieee80211_i.h +5 -4
Index: wireless-dev/net/mac80211/ieee80211_i.h
===================================================================
@@ -342,6 +342,11 @@ struct ieee80211_sub_if_data {
 
 #define IEEE80211_DEV_TO_SUB_IF(dev) netdev_priv(dev)
 
+enum {
+	IEEE80211_RX_MSG	= 1,
+	IEEE80211_TX_STATUS_MSG	= 2,
+};
+
 struct ieee80211_local {
 	/* embed the driver visible part.
 	 * don't cast (use the static inlines below), but we keep
@@ -374,10 +379,6 @@ struct ieee80211_local {
 	struct tasklet_struct tasklet;
 	struct sk_buff_head skb_queue;
 	struct sk_buff_head skb_queue_unreliable;
-	enum {
-		ieee80211_rx_msg = 1,
-		ieee80211_tx_status_msg = 2
-	} ieee80211_msg_enum;
 
 	/* Station data structures */
 	struct kset sta_kset;
Signature · 1 line
Greetings Michael.
Applied
#1 lore raw
Quoted 3 lines · Michael Buesch

There is no need for an instance of the enum in ieee80211_local. Remove it. Also make the constants uppercase to respect kernel coding style.

Applied to my tree, thanks!

Jiri

Signature · 2 lines
Jiri Benc
SUSE Labs