blob: 1407244a647ea7d8071adb85aca5aebec208cc0b [file] [log] [blame]
Jouni Malinen6039f6d2009-03-19 13:39:21 +02001/*
2 * cfg80211 MLME SAP interface
3 *
4 * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
5 */
6
7#include <linux/kernel.h>
8#include <linux/module.h>
9#include <linux/netdevice.h>
10#include <linux/nl80211.h>
11#include <net/cfg80211.h>
12#include "core.h"
13#include "nl80211.h"
14
15void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len)
16{
17 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
18 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
19 nl80211_send_rx_auth(rdev, dev, buf, len);
20}
21EXPORT_SYMBOL(cfg80211_send_rx_auth);
22
23void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len)
24{
25 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
26 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
27 nl80211_send_rx_assoc(rdev, dev, buf, len);
28}
29EXPORT_SYMBOL(cfg80211_send_rx_assoc);
30
Jouni Malinen53b46b82009-03-27 20:53:56 +020031void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len)
Jouni Malinen6039f6d2009-03-19 13:39:21 +020032{
33 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
34 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
Jouni Malinen53b46b82009-03-27 20:53:56 +020035 nl80211_send_deauth(rdev, dev, buf, len);
Jouni Malinen6039f6d2009-03-19 13:39:21 +020036}
Jouni Malinen53b46b82009-03-27 20:53:56 +020037EXPORT_SYMBOL(cfg80211_send_deauth);
Jouni Malinen6039f6d2009-03-19 13:39:21 +020038
Jouni Malinen53b46b82009-03-27 20:53:56 +020039void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len)
Jouni Malinen6039f6d2009-03-19 13:39:21 +020040{
41 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
42 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
Jouni Malinen53b46b82009-03-27 20:53:56 +020043 nl80211_send_disassoc(rdev, dev, buf, len);
Jouni Malinen6039f6d2009-03-19 13:39:21 +020044}
Jouni Malinen53b46b82009-03-27 20:53:56 +020045EXPORT_SYMBOL(cfg80211_send_disassoc);
Jouni Malinena3b8b052009-03-27 21:59:49 +020046
47void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
48 enum nl80211_key_type key_type, int key_id,
49 const u8 *tsc)
50{
51 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
52 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
53 nl80211_michael_mic_failure(rdev, dev, addr, key_type, key_id, tsc);
54}
55EXPORT_SYMBOL(cfg80211_michael_mic_failure);