From: Ivo v. D. <iv...@gm...> - 2005-08-06 11:02:09
|
Hi, On Saturday 6 August 2005 00:59, James Ketrenos wrote: > 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? Yes, this is correct, this was the exact way the original Ralink drivers ar= e=20 creating a RTS packet, since they don't work with Firmware I guess it is sa= fe=20 to assume this is the correct approach for the creation of a RTS packet. > > /* 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 =3D bytes; > > > >- for (i =3D 0; i < nr_frags; i++) { > >+ i =3D 0; > > Rather than set it to 0 only to set it to 1 later, we can do: > >+ if (rts_required) { > >+ skb_frag =3D txb->fragments[i]; > >+ frag_hdr =3D (struct ieee80211_hdr *)skb_put(skb_frag, hdr_len); > >+ > >+ /* > >+ * Set header frame_ctl to the RTS. > >+ */ > >+ header.frame_ctl =3D 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 =3D cpu_to_le16(fc); > >+ > >+ if (ieee->config & > >+ (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS)) > >+ skb_put(skb_frag, 4); > >+ > >+ txb->rts_included =3D 1; > >+ i =3D 1; > >+ } > > > > > >else i =3D 0; > > add ^^^ Sounds good to me. > 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/ Excellent, thanks. IvD |