mlme.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * cfg80211 MLME SAP interface
  3. *
  4. * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
  5. */
  6. #include <linux/kernel.h>
  7. #include <linux/module.h>
  8. #include <linux/netdevice.h>
  9. #include <linux/nl80211.h>
  10. #include <net/cfg80211.h>
  11. #include "core.h"
  12. #include "nl80211.h"
  13. void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len)
  14. {
  15. struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
  16. struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
  17. nl80211_send_rx_auth(rdev, dev, buf, len);
  18. }
  19. EXPORT_SYMBOL(cfg80211_send_rx_auth);
  20. void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len)
  21. {
  22. struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
  23. struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
  24. nl80211_send_rx_assoc(rdev, dev, buf, len);
  25. }
  26. EXPORT_SYMBOL(cfg80211_send_rx_assoc);
  27. void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len)
  28. {
  29. struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
  30. struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
  31. nl80211_send_deauth(rdev, dev, buf, len);
  32. }
  33. EXPORT_SYMBOL(cfg80211_send_deauth);
  34. void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len)
  35. {
  36. struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
  37. struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
  38. nl80211_send_disassoc(rdev, dev, buf, len);
  39. }
  40. EXPORT_SYMBOL(cfg80211_send_disassoc);
  41. void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
  42. enum nl80211_key_type key_type, int key_id,
  43. const u8 *tsc)
  44. {
  45. struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
  46. struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
  47. nl80211_michael_mic_failure(rdev, dev, addr, key_type, key_id, tsc);
  48. }
  49. EXPORT_SYMBOL(cfg80211_michael_mic_failure);