Changeset ab365c4 in mainline for uspace/drv/bus/usb/ar9271/ar9271.h


Ignore:
Timestamp:
2015-02-13T12:15:00Z (9 years ago)
Author:
Jan Kolarik <kolarik@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
56c0930
Parents:
462054a
Message:

Created library for IEEE802.11 related stuff. Mostly done device startup initialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ar9271/ar9271.h

    r462054a rab365c4  
    4040#include "htc.h"
    4141
     42/** Max supported channel frequency. */
     43#define AR9271_MAX_CHANNEL 2472
     44
     45/** Number of transmisson queues */
     46#define AR9271_QUEUES_COUNT 10
     47
    4248/** Number of GPIO pin used for handling led light */
    4349#define AR9271_LED_PIN 15
     
    4551/** AR9271 Registers */
    4652typedef enum {
     53        /* ATH command register */
     54        AR9271_COMMAND = 0x0008,
     55        AR9271_COMMAND_RX_ENABLE = 0x00000004,
     56       
     57        /* ATH config register */
     58        AR9271_CONFIG = 0x0014,
     59        AR9271_CONFIG_ADHOC = 0x00000020,
     60       
     61        AR9271_QUEUE_BASE_MASK = 0x1000,
     62       
    4763        /* EEPROM Addresses */
    4864        AR9271_EEPROM_BASE = 0x2100,
     
    6480        /* Wakeup related registers */
    6581        AR9271_RTC_RC = 0x7000,
     82        AR9271_RTC_RC_MAC_WARM = 0x00000001,
     83        AR9271_RTC_RC_MAC_COLD = 0x00000002,
    6684        AR9271_RTC_RC_MASK = 0x00000003,
    6785        AR9271_RTC_RESET = 0x7040,
    6886        AR9271_RTC_STATUS = 0x7044,
    6987        AR9271_RTC_STATUS_MASK = 0x0000000F,
     88        AR9271_RTC_STATUS_SHUTDOWN = 0x00000001,
    7089        AR9271_RTC_STATUS_ON = 0x00000002,
    7190        AR9271_RTC_FORCE_WAKE = 0x704C,
    7291        AR9271_RTC_FORCE_WAKE_ENABLE = 0x00000001,
    7392        AR9271_RTC_FORCE_WAKE_ON_INT = 0x00000002,
     93               
     94        AR9271_RX_FILTER = 0x803C,
     95        AR9271_RX_FILTER_UNI = 0x00000001,
     96        AR9271_RX_FILTER_MULTI = 0x00000002,
     97        AR9271_RX_FILTER_BROAD = 0x00000004,
     98        AR9271_RX_FILTER_CONTROL = 0x00000008,
     99        AR9271_RX_FILTER_BEACON = 0x00000010,
     100        AR9271_RX_FILTER_PROMISCUOUS = 0x00000020,
     101        AR9271_RX_FILTER_PROBEREQ = 0x00000080,
     102               
     103        AR9271_PHY_BASE = 0x9800,
     104        AR9271_PHY_ACTIVE = 0x981C,     
     105        AR9271_PHY_MODE = 0xA200,
     106        AR9271_PHY_MODE_2G = 0x02,
     107        AR9271_PHY_MODE_DYNAMIC = 0x04,
     108        AR9271_PHY_CCK_TX_CTRL = 0xA204,
     109        AR9271_PHY_CCK_TX_CTRL_JAPAN = 0x00000010,
     110               
     111        AR9271_OPMODE_STATION_AP_MASK = 0x00010000,
     112        AR9271_OPMODE_ADHOC_MASK = 0x00020000,
     113               
     114        AR9271_RESET_POWER_DOWN_CONTROL = 0x50044,
     115        AR9271_RADIO_RF_RESET = 0x20,
     116        AR9271_GATE_MAC_CONTROL = 0x4000,
    74117   
    75118        /* FW Addresses */
     
    78121       
    79122        /* MAC Registers */
    80         AR9271_MAC_PCU_STA_ADDR_L32 = 0x8000, /**< STA Address Lower 32 Bits */
    81         AR9271_MAC_PCU_STA_ADDR_U16 = 0x8004, /**< STA Address Upper 16 Bits */
    82         AR9271_MAC_PCU_BSSID_L32 = 0x8008, /**< BSSID Lower 32 Bits */
    83         AR9271_MAC_PCU_BSSID_U16 = 0x800C, /**< BSSID Upper 16 Bits */
     123        AR9271_STATION_ID0 = 0x8000, /**< STA Address Lower 32 Bits */
     124        AR9271_STATION_ID1 = 0x8004, /**< STA Address Upper 16 Bits */
     125        AR9271_STATION_BSSID0 = 0x8008, /**< BSSID Lower 32 Bits */
     126        AR9271_STATION_BSSID1 = 0x800C, /**< BSSID Upper 16 Bits */
    84127} ar9271_registers_t;
    85128
     
    92135/** AR9271 device data */
    93136typedef struct {
    94         /** DDF device pointer */
    95         ddf_dev_t *ddf_device;
     137        /** Backing DDF device */
     138        ddf_dev_t *ddf_dev;
    96139       
    97140        /** USB device data */
    98141        usb_device_t *usb_device;
     142       
     143        /** IEEE 802.11 device data */
     144        ieee80211_dev_t *ieee80211_dev;
     145       
     146        /** ATH device data */
     147        ath_t *ath_device;
    99148       
    100149        /** HTC device data */
Note: See TracChangeset for help on using the changeset viewer.