rsi: Adding remaining header files
PATCH v2 2/10 rsi: Adding remaining header files
From: Fariya Fatima
This patch adds the remaining header files.
Signed-off-by Fariya Fatima <[email protected]>
---
rsi_device_ops.h | 56 +++++++++++rsi_mgmt.h | 257 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 313 insertions(+)
drivers/net/wireless/rsi/rsi_device_ops.h +56 -0
@@ -0,0 +1,56 @@ +/** +* Copyright (c) 2014 Redpine Signals Inc. +* +* Permission to use, copy, modify, and/or distribute this software for any +* purpose with or without fee is hereby granted, provided that the above +* copyright notice and this permission notice appear in all copies. +* +* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ + +#ifndef __RSI_DEVICE_OPS_H__ +#define __RSI_DEVICE_OPS_H__ + +#define EVENT_WAIT_FOREVER 0 +#define TA_LOAD_ADDRESS 0x00 +#define FIRMWARE_RSI9113 "rsi_91x.fw" + +static inline u32 rsi_get_queueno (u8 *addr,u16 offset) +{ +return (le16_to_cpu (*(u16 *)&addr[offset]) &0x7000 ) >>12 ; +} + +static inline u32 rsi_get_length (u8 *addr,u16 offset) +{ +return (le16_to_cpu (*(u16 *)&addr[offset])) &0x0fff ; +} + +static inline u8 rsi_get_extended_desc (u8 *addr,u16 offset) +{ +return (le16_to_cpu (*(u8 *)&addr[offset +4 ])) &0x00ff ; +} + +static inline u8 rsi_get_rssi (u8 *addr) +{ +return *(u8 *)(addr +FRAME_DESC_SZ ); +} + +static inline u8 rsi_get_channel (u8 *addr) +{ +return *(char *)(addr +15 ); +} + +void rsi_mac80211_detach (struct rsi_hw *hw); +u16 rsi_get_connected_channel (struct rsi_hw *adapter); +void rsi_set_event (struct rsi_event *event); +struct rsi_hw *rsi_init_os_intf_ops (enum rsi_91x_intf intf); +int rsi_init_thread_ops (struct rsi_common *common,enum rsi_91x_intf intf); +void rsi_deinit_os_intf_ops (struct rsi_hw *adapter); +int rsi_read_pkt (struct rsi_common *common,u32 rcv_pkt_len); +#endif
drivers/net/wireless/rsi/rsi_mgmt.h +257 -0
257 lines not on this page · raw message