numbss = msg1.numbss.data;
 
        for (i = 0; i < numbss; i++) {
+               int freq;
+
                memset(&msg2, 0, sizeof(msg2));
                msg2.msgcode = DIDmsg_dot11req_scan_results;
                msg2.bssindex.data = i;
                ie_buf[1] = msg2.ssid.data.len;
                ie_len = ie_buf[1] + 2;
                memcpy(&ie_buf[2], &(msg2.ssid.data.data), msg2.ssid.data.len);
+               freq = ieee80211_channel_to_frequency(msg2.dschannel.data,
+                                                     IEEE80211_BAND_2GHZ);
                bss = cfg80211_inform_bss(wiphy,
-                       ieee80211_get_channel(wiphy,
-                             ieee80211_dsss_chan_to_freq(msg2.dschannel.data)),
+                       ieee80211_get_channel(wiphy, freq),
                        (const u8 *) &(msg2.bssid.data.data),
                        msg2.timestamp.data, msg2.capinfo.data,
                        msg2.beaconperiod.data,