···730730 if (bss->wmm_ie) {731731 wmm = 1;732732 }733733+734734+ /* get all rates supported by the device and the AP as735735+ * some APs don't like getting a superset of their rates736736+ * in the association request (e.g. D-Link DAP 1353 in737737+ * b-only mode) */738738+ rates_len = ieee80211_compatible_rates(bss, sband, &rates);739739+733740 ieee80211_rx_bss_put(dev, bss);741741+ } else {742742+ rates = ~0;743743+ rates_len = sband->n_bitrates;734744 }735745736746 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);···771761 *pos++ = ifsta->ssid_len;772762 memcpy(pos, ifsta->ssid, ifsta->ssid_len);773763774774- /* all supported rates should be added here but some APs775775- * (e.g. D-Link DAP 1353 in b-only mode) don't like that776776- * Therefore only add rates the AP supports */777777- rates_len = ieee80211_compatible_rates(bss, sband, &rates);764764+ /* add all rates which were marked to be used above */778765 supp_rates_len = rates_len;779766 if (supp_rates_len > 8)780767 supp_rates_len = 8;