* Re: [PATCH] mac80211: invoke software scan when hardware scan returns EPERM [not found] <1526468599-14665-1-git-send-email-sushant2k1513@gmail.com> @ 2018-05-16 11:27 ` Kalle Valo [not found] ` <1526468599-14665-2-git-send-email-sushant2k1513@gmail.com> 1 sibling, 0 replies; 3+ messages in thread From: Kalle Valo @ 2018-05-16 11:27 UTC (permalink / raw) To: Sushant Kumar Mishra Cc: Sushant Kumar Mishra, linux-wireless, Amitkumar Karwar, Siva Rebbagondla, Sanjay Kumar Konduri, Johannes Berg Sushant Kumar Mishra <sushant2k1513@gmail.com> writes: > From: Sanjay Kumar Konduri <sanjay.konduri@redpinesignals.com> > > Currently, software scan in mac80211 is used by drivers, which don't > implement hardware scan. However some drivers which have implemented > hardware scan may also sometimes want to use software scan in mac80211. > Such drivers can return '-EPERM' and ask mac80211 to fallback to > software scan with this patch. > > Signed-off-by: Sanjay Kumar Konduri <sanjay.konduri@redpinesignals.com> > Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> > Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> This and the following rsi patch should in the same patchset as there's a dependency. This being patch 1 and "rsi: add support for hardware scan offload" patch 2. https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#sending_large_patches_or_multiple_patches Also Johanne's address (Johannes@codeaurora.org, "Berg <johannes"@sipsolutions.net) looked bogus so I fixed it. -- Kalle Valo ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <1526468599-14665-2-git-send-email-sushant2k1513@gmail.com>]
* Re: [v2] rsi: add support for hardware scan offload [not found] ` <1526468599-14665-2-git-send-email-sushant2k1513@gmail.com> @ 2018-05-16 11:33 ` Kalle Valo 2018-05-16 12:24 ` sushant kumar mishra 0 siblings, 1 reply; 3+ messages in thread From: Kalle Valo @ 2018-05-16 11:33 UTC (permalink / raw) To: Sushant Kumar Mishra Cc: Sushant Kumar Mishra, linux-wireless, Amitkumar Karwar, Siva Rebbagondla, Prameela Rani Garnepudi, Johannes Berg Sushant Kumar Mishra <sushant2k1513@gmail.com> writes: > From: Prameela Rani Garnepudi <prameela.j04cs@gmail.com> > > 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@gmail.com> > Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> > Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> 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()? -- Kalle Valo ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v2] rsi: add support for hardware scan offload 2018-05-16 11:33 ` [v2] rsi: add support for hardware scan offload Kalle Valo @ 2018-05-16 12:24 ` sushant kumar mishra 0 siblings, 0 replies; 3+ messages in thread From: sushant kumar mishra @ 2018-05-16 12:24 UTC (permalink / raw) To: Kalle Valo Cc: Sushant Kumar Mishra, linux-wireless, Amitkumar Karwar, Siva Rebbagondla, Prameela Rani Garnepudi, Johannes Berg On Wed, May 16, 2018 at 5:03 PM, Kalle Valo <kvalo@codeaurora.org> wrote: > Sushant Kumar Mishra <sushant2k1513@gmail.com> writes: > >> From: Prameela Rani Garnepudi <prameela.j04cs@gmail.com> >> >> 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@gmail.com> >> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> >> Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> > > 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-16 12:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1526468599-14665-1-git-send-email-sushant2k1513@gmail.com>
2018-05-16 11:27 ` [PATCH] mac80211: invoke software scan when hardware scan returns EPERM Kalle Valo
[not found] ` <1526468599-14665-2-git-send-email-sushant2k1513@gmail.com>
2018-05-16 11:33 ` [v2] rsi: add support for hardware scan offload Kalle Valo
2018-05-16 12:24 ` sushant kumar mishra
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).