scan.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Scan interface for ST-Ericsson CW1200 mac80211 drivers
  3. *
  4. * Copyright (c) 2010, ST-Ericsson
  5. * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef SCAN_H_INCLUDED
  12. #define SCAN_H_INCLUDED
  13. #include <linux/semaphore.h>
  14. #include "wsm.h"
  15. /* external */ struct sk_buff;
  16. /* external */ struct cfg80211_scan_request;
  17. /* external */ struct ieee80211_channel;
  18. /* external */ struct ieee80211_hw;
  19. /* external */ struct work_struct;
  20. struct cw1200_scan {
  21. struct semaphore lock;
  22. struct work_struct work;
  23. struct delayed_work timeout;
  24. struct cfg80211_scan_request *req;
  25. struct ieee80211_channel **begin;
  26. struct ieee80211_channel **curr;
  27. struct ieee80211_channel **end;
  28. struct wsm_ssid ssids[WSM_SCAN_MAX_NUM_OF_SSIDS];
  29. int output_power;
  30. int n_ssids;
  31. int status;
  32. atomic_t in_progress;
  33. /* Direct probe requests workaround */
  34. struct delayed_work probe_work;
  35. int direct_probe;
  36. };
  37. int cw1200_hw_scan(struct ieee80211_hw *hw,
  38. struct ieee80211_vif *vif,
  39. struct ieee80211_scan_request *hw_req);
  40. void cw1200_scan_work(struct work_struct *work);
  41. void cw1200_scan_timeout(struct work_struct *work);
  42. void cw1200_clear_recent_scan_work(struct work_struct *work);
  43. void cw1200_scan_complete_cb(struct cw1200_common *priv,
  44. struct wsm_scan_complete *arg);
  45. void cw1200_scan_failed_cb(struct cw1200_common *priv);
  46. /* ******************************************************************** */
  47. /* Raw probe requests TX workaround */
  48. void cw1200_probe_work(struct work_struct *work);
  49. #endif