On Tue, 2007-07-31 at 00:36 -0700, Michael Wu wrote: > From: Michael Wu <flamingice@xxxxxxxxxxxx> > > These drivers only need 802.11 definitions. I have nothing against the change if I understand the motivation. What's the point? > -#define ORINOCO_MAX_MTU (IEEE80211_DATA_LEN - ENCAPS_OVERHEAD) > +#define ORINOCO_MAX_MTU (IEEE80211_MAX_DATA_LEN - ENCAPS_OVERHEAD) We probably want to standardize on one name and use it consistently in all drivers. > - if ( (new_mtu + ENCAPS_OVERHEAD + IEEE80211_HLEN) > > + if ( (new_mtu + ENCAPS_OVERHEAD + sizeof(struct ieee80211_hdr)) > I prefer the original code. "Size of 802.11 header" is easier to understand than "size of the structure representing 802.11 header". Can we please make IEEE80211_HLEN available to all wireless drivers? And by the way, the definition of struct ieee80211_hdr includes payload (which is a good thing in my opinion). The definition uses a gcc-specific 0-size array, which we may want to convert to a c99 style flexible array (i.e. payload[] as opposed to payload[0]). Taking sizeof of a structure with a flexible array is dubious and is likely to be discouraged in the future (I would support having a warning in sparse). What we really want is the offset of the payload in the frame, not the size allocated by the compiler for the frame with 0-byte payload. I would prefer all the necessary changes to occur without disturbing the individual drivers. -- Regards, Pavel Roskin - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html