diff -u -p -r1.137 CHANGES --- CHANGES 31 Jan 2005 16:59:55 -0000 1.137 +++ CHANGES 31 Jan 2005 21:15:35 -0000 @@ -1,3 +1,11 @@ +Changes in 1.0.1 + +* Yanked script trace (-x) from helper scripts (thanks to Henrik Brix + Andersen) +* Added support for long/short preamble based on probe response +* Added additional debug output during scan to dump all 16 bits of + capability field + Changes in 1.0.0 * Fixed part of #430 problem with an AP never being considered for Index: ieee80211_rx.c =================================================================== RCS file: /usr/src/repository/wireless/ipw2200/ieee80211_rx.c,v retrieving revision 1.51 diff -u -p -r1.51 ieee80211_rx.c --- ieee80211_rx.c 28 Jan 2005 21:33:07 -0000 1.51 +++ ieee80211_rx.c 31 Jan 2005 21:15:35 -0000 @@ -1042,7 +1042,7 @@ static inline void update_network(struct static inline void ieee80211_process_probe_response( struct ieee80211_device *ieee, - struct ieee80211_probe_response *beacon, + struct ieee80211_probe_response *beacon, struct ieee80211_rx_stats *stats) { struct ieee80211_network network; @@ -1053,17 +1053,25 @@ static inline void ieee80211_process_pro #endif IEEE80211_DEBUG_SCAN( - "'%s' (" MAC_FMT "): %c%c%c%c-%c%c%c%c\n", + "'%s' (" MAC_FMT "): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n", escape_essid(info_element->data, info_element->len), MAC_ARG(beacon->header.addr3), - (beacon->capability & BIT(7)) ? '1' : '0', - (beacon->capability & BIT(6)) ? '1' : '0', - (beacon->capability & BIT(5)) ? '1' : '0', - (beacon->capability & BIT(4)) ? '1' : '0', - (beacon->capability & BIT(3)) ? '1' : '0', - (beacon->capability & BIT(2)) ? '1' : '0', - (beacon->capability & BIT(1)) ? '1' : '0', - (beacon->capability & BIT(0)) ? '1' : '0'); + (beacon->capability & BIT(0xf)) ? '1' : '0', + (beacon->capability & BIT(0xe)) ? '1' : '0', + (beacon->capability & BIT(0xd)) ? '1' : '0', + (beacon->capability & BIT(0xc)) ? '1' : '0', + (beacon->capability & BIT(0xb)) ? '1' : '0', + (beacon->capability & BIT(0xa)) ? '1' : '0', + (beacon->capability & BIT(0x9)) ? '1' : '0', + (beacon->capability & BIT(0x8)) ? '1' : '0', + (beacon->capability & BIT(0x7)) ? '1' : '0', + (beacon->capability & BIT(0x6)) ? '1' : '0', + (beacon->capability & BIT(0x5)) ? '1' : '0', + (beacon->capability & BIT(0x4)) ? '1' : '0', + (beacon->capability & BIT(0x3)) ? '1' : '0', + (beacon->capability & BIT(0x2)) ? '1' : '0', + (beacon->capability & BIT(0x1)) ? '1' : '0', + (beacon->capability & BIT(0x0)) ? '1' : '0'); if (ieee80211_network_init(ieee, beacon, &network, stats)) { IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n", Index: ipw2200.c =================================================================== RCS file: /usr/src/repository/wireless/ipw2200/ipw2200.c,v retrieving revision 1.552 diff -u -p -r1.552 ipw2200.c --- ipw2200.c 31 Jan 2005 17:26:01 -0000 1.552 +++ ipw2200.c 31 Jan 2005 21:15:35 -0000 @@ -4585,13 +4585,28 @@ static int ipw_associate_network(struct else if (network->mode & priv->ieee->mode & IEEE_B) priv->assoc_request.ieee_mode = IPW_B_MODE; + priv->assoc_request.capability = network->capability; + if ((network->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) + && !(priv->config & CFG_PREAMBLE_LONG)) { + priv->assoc_request.preamble_length = DCT_FLAG_SHORT_PREAMBLE; + } else { + priv->assoc_request.preamble_length = DCT_FLAG_LONG_PREAMBLE; + + /* Clear the short preamble if we won't be supporting it */ + priv->assoc_request.capability &= ~WLAN_CAPABILITY_SHORT_PREAMBLE; + } + IPW_DEBUG_ASSOC("%sssocation attempt: '%s', channel %d, " - "802.11%c [%d], enc=%s%s%s%c%c\n", + "802.11%c [%d], %s[:%s], enc=%s%s%s%c%c\n", roaming ? "Rea" : "A", escape_essid(priv->essid, priv->essid_len), network->channel, ipw_modes[priv->assoc_request.ieee_mode], rates->num_rates, + priv->assoc_request.preamble_length == + DCT_FLAG_LONG_PREAMBLE ? "long" : "short", + network->capability & + WLAN_CAPABILITY_SHORT_PREAMBLE ? "short" : "long", priv->capability & CAP_PRIVACY_ON ? "on " : "off", priv->capability & CAP_PRIVACY_ON ? (priv->capability & CAP_SHARED_KEY ? "(shared)" : @@ -4629,7 +4644,6 @@ static int ipw_associate_network(struct priv->assoc_request.atim_window = 0; } - priv->assoc_request.capability = network->capability; priv->assoc_request.listen_interval = network->listen_interval; err = ipw_send_ssid(priv, priv->essid, priv->essid_len); @@ -6330,8 +6344,8 @@ static inline void ipw_tx_skb(struct ipw else tfd->u.data.tx_flags_ext = DCT_FLAG_EXT_MODE_OFDM; - if (priv->config & CFG_PREAMBLE) - tfd->u.data.tx_flags |= DCT_FLAG_SHORT_PREMBL; + if (priv->assoc_request.preamble_length == DCT_FLAG_SHORT_PREAMBLE) + tfd->u.data.tx_flags |= DCT_FLAG_SHORT_PREAMBLE; memcpy(&tfd->u.data.tfd.tfd_24.mchdr, hdr, hdr_len); Index: ipw2200.h =================================================================== RCS file: /usr/src/repository/wireless/ipw2200/ipw2200.h,v retrieving revision 1.179 diff -u -p -r1.179 ipw2200.h --- ipw2200.h 17 Jan 2005 15:07:23 -0000 1.179 +++ ipw2200.h 31 Jan 2005 21:15:35 -0000 @@ -190,7 +190,8 @@ enum connection_manager_assoc_states #define DCT_FLAG_CTS_REQUIRED 0x02 /* use short preamble */ -#define DCT_FLAG_SHORT_PREMBL 0x04 +#define DCT_FLAG_LONG_PREAMBLE 0x00 +#define DCT_FLAG_SHORT_PREAMBLE 0x04 /* RTS/CTS first */ #define DCT_FLAG_RTS_REQD 0x08 @@ -968,7 +969,7 @@ struct ipw_cmd { #define CFG_STATIC_ESSID BIT(1) /* Restrict assoc. to single SSID */ #define CFG_STATIC_BSSID BIT(2) /* Restrict assoc. to single BSSID */ #define CFG_CUSTOM_MAC BIT(3) -#define CFG_PREAMBLE BIT(4) +#define CFG_PREAMBLE_LONG BIT(4) #define CFG_ADHOC_PERSIST BIT(5) #define CFG_ASSOCIATE BIT(6) #define CFG_FIXED_RATE BIT(7)