linux/drivers/staging/rt3090/rtmp_os.h
<<
>>
Prefs
   1/*
   2 *************************************************************************
   3 * Ralink Tech Inc.
   4 * 5F., No.36, Taiyuan St., Jhubei City,
   5 * Hsinchu County 302,
   6 * Taiwan, R.O.C.
   7 *
   8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
   9 *
  10 * This program is free software; you can redistribute it and/or modify  *
  11 * it under the terms of the GNU General Public License as published by  *
  12 * the Free Software Foundation; either version 2 of the License, or     *
  13 * (at your option) any later version.                                   *
  14 *                                                                       *
  15 * This program is distributed in the hope that it will be useful,       *
  16 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
  17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
  18 * GNU General Public License for more details.                          *
  19 *                                                                       *
  20 * You should have received a copy of the GNU General Public License     *
  21 * along with this program; if not, write to the                         *
  22 * Free Software Foundation, Inc.,                                       *
  23 * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  24 *                                                                       *
  25 *************************************************************************
  26
  27    Module Name:
  28        rtmp_os.h
  29
  30    Abstract:
  31
  32    Revision History:
  33    Who          When          What
  34    ---------    ----------    ----------------------------------------------
  35 */
  36
  37
  38#ifndef __RTMP_OS_H__
  39#define __RTMP_OS_H__
  40
  41#ifdef LINUX
  42#include "rt_linux.h"
  43#endif // LINUX //
  44
  45
  46/*
  47        This data structure mainly strip some callback function defined in
  48        "struct net_device" in kernel source "include/linux/netdevice.h".
  49
  50        The definition of this data structure may various depends on different
  51        OS. Use it carefully.
  52*/
  53typedef struct _RTMP_OS_NETDEV_OP_HOOK_
  54{
  55        const struct net_device_ops *netdev_ops;
  56        void                    *priv;
  57        int                     priv_flags;
  58        unsigned char devAddr[6];
  59        unsigned char   devName[16];
  60        unsigned char   needProtcted;
  61}RTMP_OS_NETDEV_OP_HOOK, *PRTMP_OS_NETDEV_OP_HOOK;
  62
  63
  64typedef enum _RTMP_TASK_STATUS_
  65{
  66        RTMP_TASK_STAT_UNKNOWN = 0,
  67        RTMP_TASK_STAT_INITED = 1,
  68        RTMP_TASK_STAT_RUNNING = 2,
  69        RTMP_TASK_STAT_STOPED = 4,
  70}RTMP_TASK_STATUS;
  71#define RTMP_TASK_CAN_DO_INSERT         (RTMP_TASK_STAT_INITED |RTMP_TASK_STAT_RUNNING)
  72
  73#define RTMP_OS_TASK_NAME_LEN   16
  74typedef struct _RTMP_OS_TASK_
  75{
  76        char                                    taskName[RTMP_OS_TASK_NAME_LEN];
  77        void                                    *priv;
  78        //unsigned long         taskFlags;
  79        RTMP_TASK_STATUS        taskStatus;
  80#ifndef KTHREAD_SUPPORT
  81        RTMP_OS_SEM                     taskSema;
  82        RTMP_OS_PID                     taskPID;
  83        struct completion               taskComplete;
  84#endif
  85        unsigned char                   task_killed;
  86#ifdef KTHREAD_SUPPORT
  87        struct task_struct      *kthread_task;
  88        wait_queue_head_t               kthread_q;
  89        BOOLEAN                                 kthread_running;
  90#endif
  91}RTMP_OS_TASK;
  92
  93#endif // __RMTP_OS_H__ //
  94