~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/wireless/ap.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /net/wireless/ap.c (Version linux-6.12-rc7) and /net/wireless/ap.c (Version linux-5.4.285)


  1 // SPDX-License-Identifier: GPL-2.0                 1 // SPDX-License-Identifier: GPL-2.0
  2 /*                                             << 
  3  * Parts of this file are                      << 
  4  * Copyright (C) 2022-2023 Intel Corporation   << 
  5  */                                            << 
  6 #include <linux/ieee80211.h>                        2 #include <linux/ieee80211.h>
  7 #include <linux/export.h>                           3 #include <linux/export.h>
  8 #include <net/cfg80211.h>                           4 #include <net/cfg80211.h>
  9 #include "nl80211.h"                                5 #include "nl80211.h"
 10 #include "core.h"                                   6 #include "core.h"
 11 #include "rdev-ops.h"                               7 #include "rdev-ops.h"
 12                                                     8 
 13                                                     9 
 14 static int ___cfg80211_stop_ap(struct cfg80211 !!  10 int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev,
 15                                struct net_devi !!  11                        struct net_device *dev, bool notify)
 16                                bool notify)    << 
 17 {                                                  12 {
 18         struct wireless_dev *wdev = dev->ieee8     13         struct wireless_dev *wdev = dev->ieee80211_ptr;
 19         int err;                                   14         int err;
 20                                                    15 
 21         lockdep_assert_wiphy(wdev->wiphy);     !!  16         ASSERT_WDEV_LOCK(wdev);
 22                                                    17 
 23         if (!rdev->ops->stop_ap)                   18         if (!rdev->ops->stop_ap)
 24                 return -EOPNOTSUPP;                19                 return -EOPNOTSUPP;
 25                                                    20 
 26         if (dev->ieee80211_ptr->iftype != NL80     21         if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
 27             dev->ieee80211_ptr->iftype != NL80     22             dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
 28                 return -EOPNOTSUPP;                23                 return -EOPNOTSUPP;
 29                                                    24 
 30         if (!wdev->links[link_id].ap.beacon_in !!  25         if (!wdev->beacon_interval)
 31                 return -ENOENT;                    26                 return -ENOENT;
 32                                                    27 
 33         err = rdev_stop_ap(rdev, dev, link_id) !!  28         err = rdev_stop_ap(rdev, dev);
 34         if (!err) {                                29         if (!err) {
 35                 wdev->conn_owner_nlportid = 0;     30                 wdev->conn_owner_nlportid = 0;
 36                 wdev->links[link_id].ap.beacon !!  31                 wdev->beacon_interval = 0;
 37                 memset(&wdev->links[link_id].a !!  32                 memset(&wdev->chandef, 0, sizeof(wdev->chandef));
 38                        sizeof(wdev->links[link !!  33                 wdev->ssid_len = 0;
 39                 wdev->u.ap.ssid_len = 0;       << 
 40                 rdev_set_qos_map(rdev, dev, NU     34                 rdev_set_qos_map(rdev, dev, NULL);
 41                 if (notify)                        35                 if (notify)
 42                         nl80211_send_ap_stoppe !!  36                         nl80211_send_ap_stopped(wdev);
 43                                                    37 
 44                 /* Should we apply the grace p     38                 /* Should we apply the grace period during beaconing interface
 45                  * shutdown also?                  39                  * shutdown also?
 46                  */                                40                  */
 47                 cfg80211_sched_dfs_chan_update     41                 cfg80211_sched_dfs_chan_update(rdev);
 48         }                                          42         }
 49                                                    43 
 50         schedule_work(&cfg80211_disconnect_wor     44         schedule_work(&cfg80211_disconnect_work);
 51                                                    45 
 52         return err;                                46         return err;
 53 }                                                  47 }
 54                                                    48 
 55 int cfg80211_stop_ap(struct cfg80211_registere     49 int cfg80211_stop_ap(struct cfg80211_registered_device *rdev,
 56                      struct net_device *dev, i !!  50                      struct net_device *dev, bool notify)
 57                      bool notify)              << 
 58 {                                                  51 {
 59         unsigned int link;                     !!  52         struct wireless_dev *wdev = dev->ieee80211_ptr;
 60         int ret = 0;                           !!  53         int err;
 61                                                << 
 62         if (link_id >= 0)                      << 
 63                 return ___cfg80211_stop_ap(rde << 
 64                                                << 
 65         for_each_valid_link(dev->ieee80211_ptr << 
 66                 int ret1 = ___cfg80211_stop_ap << 
 67                                                    54 
 68                 if (ret1)                      !!  55         wdev_lock(wdev);
 69                         ret = ret1;            !!  56         err = __cfg80211_stop_ap(rdev, dev, notify);
 70                 /* try the next one also if on !!  57         wdev_unlock(wdev);
 71         }                                      << 
 72                                                    58 
 73         return ret;                            !!  59         return err;
 74 }                                                  60 }
 75                                                    61 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php