]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/net/wireless/rndis_wlan.c
cfg80211: unify cfg80211_roamed() and cfg80211_roamed_bss()
[mirror_ubuntu-bionic-kernel.git] / drivers / net / wireless / rndis_wlan.c
index 785334f7a5386e82c32cd6fe41dee6d36b37b969..37ae24cbf00e8055a9575a58de21c806ab291187 100644 (file)
@@ -479,7 +479,7 @@ struct rndis_wlan_private {
  */
 static int rndis_change_virtual_intf(struct wiphy *wiphy,
                                        struct net_device *dev,
-                                       enum nl80211_iftype type, u32 *flags,
+                                       enum nl80211_iftype type,
                                        struct vif_params *params);
 
 static int rndis_scan(struct wiphy *wiphy,
@@ -1857,7 +1857,7 @@ error:
  */
 static int rndis_change_virtual_intf(struct wiphy *wiphy,
                                        struct net_device *dev,
-                                       enum nl80211_iftype type, u32 *flags,
+                                       enum nl80211_iftype type,
                                        struct vif_params *params)
 {
        struct rndis_wlan_private *priv = wiphy_priv(wiphy);
@@ -2830,15 +2830,22 @@ static void rndis_wlan_do_link_up_work(struct usbnet *usbdev)
        }
 
        if (priv->infra_mode == NDIS_80211_INFRA_INFRA) {
-               if (!roamed)
+               if (!roamed) {
                        cfg80211_connect_result(usbdev->net, bssid, req_ie,
                                                req_ie_len, resp_ie,
                                                resp_ie_len, 0, GFP_KERNEL);
-               else
-                       cfg80211_roamed(usbdev->net,
-                                       get_current_channel(usbdev, NULL),
-                                       bssid, req_ie, req_ie_len,
-                                       resp_ie, resp_ie_len, GFP_KERNEL);
+               } else {
+                       struct cfg80211_roam_info roam_info = {
+                               .channel = get_current_channel(usbdev, NULL),
+                               .bssid = bssid,
+                               .req_ie = req_ie,
+                               .req_ie_len = req_ie_len,
+                               .resp_ie = resp_ie,
+                               .resp_ie_len = resp_ie_len,
+                       };
+
+                       cfg80211_roamed(usbdev->net, &roam_info, GFP_KERNEL);
+               }
        } else if (priv->infra_mode == NDIS_80211_INFRA_ADHOC)
                cfg80211_ibss_joined(usbdev->net, bssid,
                                     get_current_channel(usbdev, NULL),
@@ -3392,6 +3399,7 @@ static const struct net_device_ops rndis_wlan_netdev_ops = {
        .ndo_stop               = usbnet_stop,
        .ndo_start_xmit         = usbnet_start_xmit,
        .ndo_tx_timeout         = usbnet_tx_timeout,
+       .ndo_get_stats64        = usbnet_get_stats64,
        .ndo_set_mac_address    = eth_mac_addr,
        .ndo_validate_addr      = eth_validate_addr,
        .ndo_set_rx_mode        = rndis_wlan_set_multicast_list,