netdev_interface_imp.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _NETDEV_INTERFACE_IMP_H_
  13. #define _NETDEV_INTERFACE_IMP_H_
  14. #include <stdint.h>
  15. #include <stdbool.h>
  16. #include <stddef.h>
  17. #include "osi_compiler.h"
  18. OSI_EXTERN_C_BEGIN
  19. #include "drv_ether.h"
  20. #include "drv_ps_path.h"
  21. #include "hal_chip.h"
  22. #ifndef GPRS_MTU
  23. #define GPRS_MTU 1500
  24. #endif
  25. typedef struct
  26. {
  27. drvPsIntfDataArriveCB_t old_psintf_cb;
  28. struct netif *dev_netif;
  29. int is_created;
  30. } netSession_t;
  31. typedef struct
  32. {
  33. drvEther_t *ether;
  34. netSession_t *session;
  35. osiTimer_t *connect_timer;
  36. bool netdevIsConnected;
  37. bool netdevIsSuspend;
  38. osiClockConstrainRegistry_t clk_registry;
  39. osiMutex_t *mutex;
  40. } netdevIntf_t;
  41. OSI_EXTERN_C_END
  42. #endif