Skip to contentSkip to conversation

About ieee80211.h

ath9k-devel Cheung Hiu Fung 1 participant 1 message Nov 29, 2011

lore
Share & tools
lore
#0 lore raw

Hi all,

I have some question related to defined value. In ieee80211.h there is

#define IEEE80211_QOS_CTL_ACK_POLICY_NORMAL 0x0000
#define IEEE80211_QOS_CTL_ACK_POLICY_NOACK 0x0020
#define IEEE80211_QOS_CTL_ACK_POLICY_NO_EXPL 0x0040
#define IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK 0x0060

But there is none of the any other void try to call the following 3 deintions (what i mean is that they are never used)

IEEE80211_QOS_CTL_ACK_POLICY_NORMAL,
IEEE80211_QOS_CTL_ACK_POLICY_NO_EXPL,
IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK

in the whole driver folder. And for the IEEE80211_QOS_CTL_ACK_POLICY_NOACK it appears in wme.c in the following function.

void ieee80211_set_qos_hdr(struct ieee80211_local *local, struct sk_buff *skb)

{
	struct ieee80211_hdr *hdr = (void *)skb->data;

	/* Fill in the QoS header if there is one. */
	if (ieee80211_is_data_qos(hdr->frame_control)) {
		u8 *p = ieee80211_get_qos_ctl(hdr);
		u8 ack_policy = 0, tid;

		tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;

		if (unlikely(local->wifi_wme_noack_test))
			ack_policy |= IEEE80211_QOS_CTL_ACK_POLICY_NOACK;
		/* qos header is 2 bytes, second reserved */
		*p++ = ack_policy | tid;
		*p = 0;
	}
}

I am just wondering how to modify the policy if there is only one policy that is in operation. When I used raw socket to send out packet, the policy that filled in side the packet is "normal ack".

For normal ACK, there is 0 in the QoS header, and u8 ack_policy = 0 implies normal ACK. But when I modify this void by adding a line after the "tid= ..."

ack_policy|=IEEE80211_QOS_CTL_ACK_POLICY_NOACK ;

And compile the driver again, it doesn't do me a favour. Actually my target is to set a policy that all qos data from normal_ack packet to no_ack. Or am i in wrong direction? Thanks for help.

Regards,
Jax