On Wed, May 16, 2018 at 5:03 PM, Kalle Valo <kvalo@xxxxxxxxxxxxxx> wrote: > Sushant Kumar Mishra <sushant2k1513@xxxxxxxxx> writes: > >> From: Prameela Rani Garnepudi <prameela.j04cs@xxxxxxxxx> >> >> With the current approach of scanning, roaming delays are observed. >> Firmware has support for back ground scanning. To get this advantage, >> mac80211 hardware scan is implemented, which decides type of scan to >> do based on connected state. >> >> When station is in not connected state, this returns operation not >> supported(-EPERM) to trigger software scan in mac80211. In case of >> connected state background scan will be triggered. >> >> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@xxxxxxxxx> >> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@xxxxxxxxxxxxxxxxxx> >> Signed-off-by: Sushant Kumar Mishra <sushant.mishra@xxxxxxxxxxxxxxxxxx> > > This patch looks much better, thanks. But the subject should be: > > [PATCH v2 2/2] rsi: add support for hardware scan offload > >> +static int rsi_prepare_probe_request(struct rsi_common *common, >> + struct cfg80211_scan_request *scan_req, >> + u8 n_ssid, u8 channel, u8 *pbreq, >> + u16 *pbreq_len, struct ieee80211_vif *vif) >> +{ >> + struct cfg80211_ssid *ssid_info; >> + struct ieee80211_hdr *hdr = NULL; >> + u8 *pos; >> + >> + if (common->priv->sc_nvifs <= 0) >> + return -ENODEV; >> + if (!scan_req) >> + return -EINVAL; >> + if (!scan_req->ssids) >> + return -EINVAL; >> + ssid_info = &scan_req->ssids[n_ssid]; >> + hdr = (struct ieee80211_hdr *)pbreq; >> + hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | >> + IEEE80211_STYPE_PROBE_REQ); >> + hdr->duration_id = 0x0; >> + memset(hdr->addr1, 0xff, ETH_ALEN); >> + memset(hdr->addr3, 0xff, ETH_ALEN); >> + ether_addr_copy(hdr->addr2, vif->addr); >> + hdr->seq_ctrl = 0x00; >> + pos = (u8 *)hdr + MIN_802_11_HDR_LEN; >> + >> + *pos++ = WLAN_EID_SSID; >> + *pos++ = ssid_info->ssid_len; >> + if (ssid_info->ssid_len) >> + memcpy(pos, ssid_info->ssid, ssid_info->ssid_len); >> + pos += ssid_info->ssid_len; >> + >> + if (scan_req->ie_len) >> + memcpy(pos, scan_req->ie, scan_req->ie_len); >> + pos += scan_req->ie_len; >> + *pbreq_len = pos - pbreq; >> + >> + return 0; >> +} > > But can't you use ieee80211_probereq_get()? Thanks for the input. We ll address this in updated version. Regards, Sushant