drv_conf.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef __DRV_CONF_H__
  21. #define __DRV_CONF_H__
  22. #include "autoconf.h"
  23. #if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
  24. #error "Shall be Linux or Windows, but not both!\n"
  25. #endif
  26. //Older Android kernel doesn't has CONFIG_ANDROID defined,
  27. //add this to force CONFIG_ANDROID defined
  28. #ifdef CONFIG_PLATFORM_ANDROID
  29. #define CONFIG_ANDROID
  30. #endif
  31. #ifdef CONFIG_ANDROID
  32. //Some Android build will restart the UI while non-printable ascii is passed
  33. //between java and c/c++ layer (JNI). We force CONFIG_VALIDATE_SSID
  34. //for Android here. If you are sure there is no risk on your system about this,
  35. //mask this macro define to support non-printable ascii ssid.
  36. //#define CONFIG_VALIDATE_SSID
  37. #ifdef CONFIG_PLATFORM_ARM_SUNxI
  38. #ifdef CONFIG_VALIDATE_SSID
  39. #undef CONFIG_VALIDATE_SSID
  40. #endif
  41. #endif
  42. //Android expect dbm as the rx signal strength unit
  43. #define CONFIG_SIGNAL_DISPLAY_DBM
  44. #endif
  45. #if defined(CONFIG_HAS_EARLYSUSPEND) && defined (CONFIG_RESUME_IN_WORKQUEUE)
  46. #warning "You have CONFIG_HAS_EARLYSUSPEND enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically"
  47. #undef CONFIG_RESUME_IN_WORKQUEUE
  48. #endif
  49. #if defined(CONFIG_ANDROID_POWER) && defined (CONFIG_RESUME_IN_WORKQUEUE)
  50. #warning "You have CONFIG_ANDROID_POWER enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically"
  51. #undef CONFIG_RESUME_IN_WORKQUEUE
  52. #endif
  53. #ifdef CONFIG_RESUME_IN_WORKQUEUE //this can be removed, because there is no case for this...
  54. #if !defined( CONFIG_WAKELOCK) && !defined(CONFIG_ANDROID_POWER)
  55. #error "enable CONFIG_RESUME_IN_WORKQUEUE without CONFIG_WAKELOCK or CONFIG_ANDROID_POWER will suffer from the danger of wifi's unfunctionality..."
  56. #error "If you still want to enable CONFIG_RESUME_IN_WORKQUEUE in this case, mask this preprossor checking and GOOD LUCK..."
  57. #endif
  58. #endif
  59. //About USB VENDOR REQ
  60. #if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX)
  61. #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC automatically"
  62. #define CONFIG_USB_VENDOR_REQ_MUTEX
  63. #endif
  64. #if defined(CONFIG_VENDOR_REQ_RETRY) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX)
  65. #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_VENDOR_REQ_RETRY automatically"
  66. #define CONFIG_USB_VENDOR_REQ_MUTEX
  67. #endif
  68. //#include <rtl871x_byteorder.h>
  69. #endif // __DRV_CONF_H__