On Tue, 2008-07-08 at 16:13 -0700, Harvey Harrison wrote: > On Wed, 2008-07-09 at 01:04 +0200, Johannes Berg wrote: > > On Tue, 2008-07-08 at 15:25 -0700, Harvey Harrison wrote: > > > Those functions that still use ieee80211_get_hdrlen are moved over > > > to use the little endian frame control. > > > > > - switch (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) { > > > - case IEEE80211_FCTL_TODS: > > > - /* BSSID SA DA */ > > > - memcpy(dst, hdr->addr3, ETH_ALEN); > > > - memcpy(src, hdr->addr2, ETH_ALEN); > > > - > > > + switch (hdr->frame_control & > > > + cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) { > > > + case __constant_cpu_to_le16(IEEE80211_FCTL_TODS): > > > if (unlikely(sdata->vif.type != IEEE80211_IF_TYPE_AP && > > > sdata->vif.type != IEEE80211_IF_TYPE_VLAN)) > > > return -1; > > > break; > > > > Looks good, but didn't you just lose all the memcpys? > > > > See the three lines immediately before the part you quoted. Oh I see, sorry. Wouldn't it be more efficient to keep it inlined in the switch though? Or is the compiler actually smart enough to move the inline into there? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part