From: James K. <jke...@li...> - 2005-08-05 22:59:21
|
Ivo van Doorn wrote: >This patch adds support for the creation of RTS packets when the config flag >CFG_IEEE80211_RTS has been set. > > Just to make sure I understand... if RTS is enabled, you want to build a single packet, with no payload, that has the RTS bit set, correct? > /* When we allocate the TXB we allocate enough space for the reserve > * and full fragment bytes (bytes_per_frag doesn't include prefix, > * postfix, header, FCS, etc.) */ >@@ -414,7 +418,31 @@ > else > txb->payload_size = bytes; > >- for (i = 0; i < nr_frags; i++) { >+ i = 0; > > Rather than set it to 0 only to set it to 1 later, we can do: >+ if (rts_required) { >+ skb_frag = txb->fragments[i]; >+ frag_hdr = (struct ieee80211_hdr *)skb_put(skb_frag, hdr_len); >+ >+ /* >+ * Set header frame_ctl to the RTS. >+ */ >+ header.frame_ctl = cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS); >+ memcpy(frag_hdr, &header, hdr_len); >+ >+ /* >+ * Restore header frame_ctl to the original data setting. >+ */ >+ header.frame_ctl = cpu_to_le16(fc); >+ >+ if (ieee->config & >+ (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS)) >+ skb_put(skb_frag, 4); >+ >+ txb->rts_included = 1; >+ i = 1; >+ } > >else i = 0; > > add ^^^ I've applied this and your ieee80211_frame_3addr header fix. Updating GIT overlay in a few minutes. NOTE: I've updated the GIT overlay scripts to pull the ancestor data from .git/info vs. .git/refs If you use my git- scripts then you should pull new copies from rsync://bughost.org/repos/scripts/ James |