On 4/26/2017 9:58 AM, Luca Coelho wrote:
From: Avraham Stern <[email protected]>

cfg80211_roamed() and cfg80211_roamed_bss() take the same arguments
except that cfg80211_roamed() requires the BSSID and
cfg80211_roamed_bss() requires the bss entry.

Unify the two functions by using a struct for driver initiated
roaming information so that either the BSSID or the bss entry can be
passed as an argument to the unified function.

Signed-off-by: Avraham Stern <[email protected]>
[modified the ath6k, brcm80211, rndis and wlan-ng drivers accordingly]
Signed-off-by: Luca Coelho <[email protected]>
---
  drivers/net/wireless/ath/ath6kl/cfg80211.c         | 10 ++-
  .../broadcom/brcm80211/brcmfmac/cfg80211.c         | 13 +++-
  drivers/net/wireless/rndis_wlan.c                  | 19 +++--
  drivers/staging/wlan-ng/cfg80211.c                 |  7 +-
  include/net/cfg80211.h                             | 58 +++++++-------
  net/wireless/core.h                                | 12 +--
  net/wireless/nl80211.c                             | 18 +++--
  net/wireless/nl80211.h                             |  5 +-
  net/wireless/sme.c                                 | 90 +++++++++-------------
  net/wireless/util.c                                |  4 +-
  10 files changed, 115 insertions(+), 121 deletions(-)


[...]

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 8c7f1ef288c6..a36bccbb40e5 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5359,6 +5359,7 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
        struct ieee80211_supported_band *band;
        struct brcmf_bss_info_le *bi;
        struct brcmu_chan ch;
+       struct cfg80211_roam_info roam_info = {};
        u32 freq;
        s32 err = 0;
        u8 *buf;
@@ -5397,9 +5398,15 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
done:
        kfree(buf);
-       cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid,
-                       conn_info->req_ie, conn_info->req_ie_len,
-                       conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
+
+       roam_info.channel = notify_channel;
+       roam_info.bssid = (u8*)profile->bssid;

I know it was there before, but this cast seem useless.

Regards,
Arend

+       roam_info.req_ie = conn_info->req_ie;
+       roam_info.req_ie_len = conn_info->req_ie_len;
+       roam_info.resp_ie = conn_info->resp_ie;
+       roam_info.resp_ie_len = conn_info->resp_ie_len;
+
+       cfg80211_roamed(ndev, &roam_info, GFP_KERNEL);
        brcmf_dbg(CONN, "Report roaming result\n");

Reply via email to