diff options
author | Ayala Beker <ayala.beker@intel.com> | 2016-09-20 17:31:15 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-09-30 13:21:23 +0200 |
commit | a442b761b24b6886f9a4e2ff5f8cb4824c96526b (patch) | |
tree | 85886140e3f340c7716e8bb58caf9ed9ec5be8db /net/wireless/util.c | |
parent | 708d50edb149fe488c7c96f59ba9a89a64985cf2 (diff) | |
download | linux-a442b761b24b6886f9a4e2ff5f8cb4824c96526b.tar.gz linux-a442b761b24b6886f9a4e2ff5f8cb4824c96526b.tar.bz2 linux-a442b761b24b6886f9a4e2ff5f8cb4824c96526b.zip |
cfg80211: add add_nan_func / del_nan_func
A NAN function can be either publish, subscribe or follow
up. Make all the necessary verifications and just pass the
request to the driver.
Allow the user space application that starts NAN to
forbid any other socket to add or remove functions.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 7a2d46b0058a..8edce22d1b93 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1762,6 +1762,28 @@ int cfg80211_get_station(struct net_device *dev, const u8 *mac_addr, } EXPORT_SYMBOL(cfg80211_get_station); +void cfg80211_free_nan_func(struct cfg80211_nan_func *f) +{ + int i; + + if (!f) + return; + + kfree(f->serv_spec_info); + kfree(f->srf_bf); + kfree(f->srf_macs); + for (i = 0; i < f->num_rx_filters; i++) + kfree(f->rx_filters[i].filter); + + for (i = 0; i < f->num_tx_filters; i++) + kfree(f->tx_filters[i].filter); + + kfree(f->rx_filters); + kfree(f->tx_filters); + kfree(f); +} +EXPORT_SYMBOL(cfg80211_free_nan_func); + /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ const unsigned char rfc1042_header[] __aligned(2) = |