if_ath.c (de5af7046072c36212844e2c527a53f94465a53b) | if_ath.c (abb62a415d14d5d94f6fa4b4041ef9f4c2ca6aec) |
---|---|
1/*- 2 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 981 unchanged lines hidden (view full) --- 990 } 991 /* 992 * NB: the beacon data buffer must be 32-bit aligned; 993 * we assume the mbuf routines will return us something 994 * with this alignment (perhaps should assert). 995 */ 996 rs = &ni->ni_rates; 997 pktlen = sizeof (struct ieee80211_frame) | 1/*- 2 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 981 unchanged lines hidden (view full) --- 990 } 991 /* 992 * NB: the beacon data buffer must be 32-bit aligned; 993 * we assume the mbuf routines will return us something 994 * with this alignment (perhaps should assert). 995 */ 996 rs = &ni->ni_rates; 997 pktlen = sizeof (struct ieee80211_frame) |
998 + 8 + 2 + 2 + 2+ni->ni_esslen + 2+rs->rs_nrates + 6; | 998 + 8 + 2 + 2 + 2+ni->ni_esslen + 2+rs->rs_nrates + 3 + 6; |
999 if (rs->rs_nrates > IEEE80211_RATE_SIZE) 1000 pktlen += 2; 1001 if (pktlen <= MHLEN) 1002 MGETHDR(m, M_DONTWAIT, MT_DATA); 1003 else 1004 m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); 1005 if (m == NULL) { 1006 DPRINTF(("ath_beacon_alloc: cannot get mbuf/cluster; size %u\n", --- 40 unchanged lines hidden (view full) --- 1047 capinfo |= IEEE80211_CAPINFO_SHORT_SLOTTIME; 1048 *(u_int16_t *)frm = htole16(capinfo); 1049 frm += 2; 1050 *frm++ = IEEE80211_ELEMID_SSID; 1051 *frm++ = ni->ni_esslen; 1052 memcpy(frm, ni->ni_essid, ni->ni_esslen); 1053 frm += ni->ni_esslen; 1054 frm = ieee80211_add_rates(frm, rs); | 999 if (rs->rs_nrates > IEEE80211_RATE_SIZE) 1000 pktlen += 2; 1001 if (pktlen <= MHLEN) 1002 MGETHDR(m, M_DONTWAIT, MT_DATA); 1003 else 1004 m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); 1005 if (m == NULL) { 1006 DPRINTF(("ath_beacon_alloc: cannot get mbuf/cluster; size %u\n", --- 40 unchanged lines hidden (view full) --- 1047 capinfo |= IEEE80211_CAPINFO_SHORT_SLOTTIME; 1048 *(u_int16_t *)frm = htole16(capinfo); 1049 frm += 2; 1050 *frm++ = IEEE80211_ELEMID_SSID; 1051 *frm++ = ni->ni_esslen; 1052 memcpy(frm, ni->ni_essid, ni->ni_esslen); 1053 frm += ni->ni_esslen; 1054 frm = ieee80211_add_rates(frm, rs); |
1055 *frm++ = IEEE80211_ELEMID_DSPARMS; 1056 *frm++ = 1; 1057 *frm++ = ieee80211_chan2ieee(ic, ni->ni_chan); |
|
1055 if (ic->ic_opmode == IEEE80211_M_IBSS) { 1056 *frm++ = IEEE80211_ELEMID_IBSSPARMS; 1057 *frm++ = 2; 1058 *frm++ = 0; *frm++ = 0; /* TODO: ATIM window */ 1059 } else { 1060 /* TODO: TIM */ 1061 *frm++ = IEEE80211_ELEMID_TIM; 1062 *frm++ = 4; /* length */ --- 1658 unchanged lines hidden --- | 1058 if (ic->ic_opmode == IEEE80211_M_IBSS) { 1059 *frm++ = IEEE80211_ELEMID_IBSSPARMS; 1060 *frm++ = 2; 1061 *frm++ = 0; *frm++ = 0; /* TODO: ATIM window */ 1062 } else { 1063 /* TODO: TIM */ 1064 *frm++ = IEEE80211_ELEMID_TIM; 1065 *frm++ = 4; /* length */ --- 1658 unchanged lines hidden --- |