| 110 | | const char *name, int unit, int opmode, int flags, struct net_device *mdev); |
|---|
| 111 | | static void ath_vap_delete(struct ieee80211vap *); |
|---|
| 112 | | static int ath_init(struct net_device *); |
|---|
| 113 | | static int ath_reset(struct net_device *); |
|---|
| 114 | | static void ath_fatal_tasklet(TQUEUE_ARG); |
|---|
| 115 | | static void ath_rxorn_tasklet(TQUEUE_ARG); |
|---|
| 116 | | static void ath_bmiss_tasklet(TQUEUE_ARG); |
|---|
| 117 | | static void ath_bstuck_tasklet(TQUEUE_ARG); |
|---|
| 118 | | static void ath_radar_task(TQUEUE_ARG data); |
|---|
| 119 | | static void ath_dfs_test_return(unsigned long); |
|---|
| 120 | | |
|---|
| 121 | | static int ath_stop_locked(struct net_device *); |
|---|
| 122 | | static int ath_stop(struct net_device *); |
|---|
| | 110 | const char *, int, int, int, struct net_device *); |
|---|
| | 111 | static void ath_vap_delete(struct ieee80211vap *); |
|---|
| | 112 | static int ath_init(struct net_device *); |
|---|
| | 113 | static int ath_reset(struct net_device *); |
|---|
| | 114 | static void ath_fatal_tasklet(TQUEUE_ARG); |
|---|
| | 115 | static void ath_rxorn_tasklet(TQUEUE_ARG); |
|---|
| | 116 | static void ath_bmiss_tasklet(TQUEUE_ARG); |
|---|
| | 117 | static void ath_bstuck_tasklet(TQUEUE_ARG); |
|---|
| | 118 | static void ath_radar_task(TQUEUE_ARG); |
|---|
| | 119 | static void ath_dfs_test_return(unsigned long); |
|---|
| | 120 | |
|---|
| | 121 | static int ath_stop_locked(struct net_device *); |
|---|
| | 122 | static int ath_stop(struct net_device *); |
|---|
| 124 | | static void ath_initkeytable(struct ath_softc *); |
|---|
| 125 | | #endif |
|---|
| 126 | | static int ath_key_alloc(struct ieee80211vap *, |
|---|
| 127 | | const struct ieee80211_key *); |
|---|
| 128 | | static int ath_key_delete(struct ieee80211vap *, |
|---|
| 129 | | const struct ieee80211_key *, |
|---|
| 130 | | struct ieee80211_node *); |
|---|
| 131 | | static int ath_key_set(struct ieee80211vap *, const struct ieee80211_key *, |
|---|
| 132 | | const u_int8_t mac[IEEE80211_ADDR_LEN]); |
|---|
| 133 | | static void ath_key_update_begin(struct ieee80211vap *); |
|---|
| 134 | | static void ath_key_update_end(struct ieee80211vap *); |
|---|
| 135 | | static void ath_mode_init(struct net_device *); |
|---|
| 136 | | static void ath_setslottime(struct ath_softc *); |
|---|
| 137 | | static void ath_updateslot(struct net_device *); |
|---|
| 138 | | static int ath_beaconq_setup(struct ath_hal *); |
|---|
| 139 | | static int ath_beacon_alloc(struct ath_softc *, struct ieee80211_node *); |
|---|
| | 124 | static void ath_initkeytable(struct ath_softc *); |
|---|
| | 125 | #endif |
|---|
| | 126 | static int ath_key_alloc(struct ieee80211vap *, const struct ieee80211_key *); |
|---|
| | 127 | static int ath_key_delete(struct ieee80211vap *, const struct ieee80211_key *, |
|---|
| | 128 | struct ieee80211_node *); |
|---|
| | 129 | static int ath_key_set(struct ieee80211vap *, const struct ieee80211_key *, |
|---|
| | 130 | const u_int8_t mac[IEEE80211_ADDR_LEN]); |
|---|
| | 131 | static void ath_key_update_begin(struct ieee80211vap *); |
|---|
| | 132 | static void ath_key_update_end(struct ieee80211vap *); |
|---|
| | 133 | static void ath_mode_init(struct net_device *); |
|---|
| | 134 | static void ath_setslottime(struct ath_softc *); |
|---|
| | 135 | static void ath_updateslot(struct net_device *); |
|---|
| | 136 | static int ath_beaconq_setup(struct ath_hal *); |
|---|
| | 137 | static int ath_beacon_alloc(struct ath_softc *, struct ieee80211_node *); |
|---|
| 141 | | static void ath_beacon_dturbo_update(struct ieee80211vap *vap, int *, u_int8_t); |
|---|
| 142 | | static void ath_beacon_dturbo_config(struct ieee80211vap *, u_int32_t); |
|---|
| 143 | | static void ath_turbo_switch_mode(unsigned long); |
|---|
| 144 | | static int ath_check_beacon_done(struct ath_softc *sc); |
|---|
| 145 | | #endif |
|---|
| 146 | | static void ath_beacon_send(struct ath_softc *, int *needmark); |
|---|
| 147 | | static void ath_beacon_start_adhoc(struct ath_softc *, |
|---|
| 148 | | struct ieee80211vap *); |
|---|
| 149 | | static void ath_beacon_return(struct ath_softc *, struct ath_buf *); |
|---|
| 150 | | static void ath_beacon_free(struct ath_softc *); |
|---|
| 151 | | static void ath_beacon_config(struct ath_softc *, struct ieee80211vap *); |
|---|
| 152 | | static int ath_desc_alloc(struct ath_softc *); |
|---|
| 153 | | static void ath_desc_free(struct ath_softc *); |
|---|
| 154 | | static void ath_desc_swap(struct ath_desc *); |
|---|
| 155 | | static struct ieee80211_node *ath_node_alloc(struct ieee80211_node_table *, struct ieee80211vap *vap); |
|---|
| 156 | | static void ath_node_cleanup(struct ieee80211_node *); |
|---|
| 157 | | static void ath_node_free(struct ieee80211_node *); |
|---|
| 158 | | static u_int8_t ath_node_getrssi(const struct ieee80211_node *); |
|---|
| 159 | | static int ath_rxbuf_init(struct ath_softc *, struct ath_buf *); |
|---|
| 160 | | static void ath_recv_mgmt(struct ieee80211_node *, struct sk_buff *, |
|---|
| 161 | | int subtype, int rssi, u_int32_t rstamp); |
|---|
| 162 | | static void ath_setdefantenna(struct ath_softc *sc, u_int antenna); |
|---|
| 163 | | static struct ath_txq *ath_txq_setup(struct ath_softc*, int qtype, int subtype); |
|---|
| 164 | | static void ath_rx_tasklet(TQUEUE_ARG data); |
|---|
| 165 | | static int ath_hardstart(struct sk_buff *, struct net_device *); |
|---|
| 166 | | static int ath_mgtstart(struct ieee80211com *ic, struct sk_buff *skb); |
|---|
| | 139 | static void ath_beacon_dturbo_update(struct ieee80211vap *, int *, u_int8_t); |
|---|
| | 140 | static void ath_beacon_dturbo_config(struct ieee80211vap *, u_int32_t); |
|---|
| | 141 | static void ath_turbo_switch_mode(unsigned long); |
|---|
| | 142 | static int ath_check_beacon_done(struct ath_softc *); |
|---|
| | 143 | #endif |
|---|
| | 144 | static void ath_beacon_send(struct ath_softc *, int *); |
|---|
| | 145 | static void ath_beacon_start_adhoc(struct ath_softc *, struct ieee80211vap *); |
|---|
| | 146 | static void ath_beacon_return(struct ath_softc *, struct ath_buf *); |
|---|
| | 147 | static void ath_beacon_free(struct ath_softc *); |
|---|
| | 148 | static void ath_beacon_config(struct ath_softc *, struct ieee80211vap *); |
|---|
| | 149 | static int ath_desc_alloc(struct ath_softc *); |
|---|
| | 150 | static void ath_desc_free(struct ath_softc *); |
|---|
| | 151 | static void ath_desc_swap(struct ath_desc *); |
|---|
| | 152 | static struct ieee80211_node *ath_node_alloc(struct ieee80211_node_table *, |
|---|
| | 153 | struct ieee80211vap *); |
|---|
| | 154 | static void ath_node_cleanup(struct ieee80211_node *); |
|---|
| | 155 | static void ath_node_free(struct ieee80211_node *); |
|---|
| | 156 | static u_int8_t ath_node_getrssi(const struct ieee80211_node *); |
|---|
| | 157 | static int ath_rxbuf_init(struct ath_softc *, struct ath_buf *); |
|---|
| | 158 | static void ath_recv_mgmt(struct ieee80211_node *, struct sk_buff *, int, |
|---|
| | 159 | int, u_int32_t); |
|---|
| | 160 | static void ath_setdefantenna(struct ath_softc *, u_int); |
|---|
| | 161 | static struct ath_txq *ath_txq_setup(struct ath_softc *, int, int); |
|---|
| | 162 | static void ath_rx_tasklet(TQUEUE_ARG); |
|---|
| | 163 | static int ath_hardstart(struct sk_buff *, struct net_device *); |
|---|
| | 164 | static int ath_mgtstart(struct ieee80211com *, struct sk_buff *); |
|---|
| 168 | | static u_int32_t ath_get_icvlen(struct ieee80211_key *k); |
|---|
| 169 | | static u_int32_t ath_get_ivlen(struct ieee80211_key *k); |
|---|
| 170 | | static void ath_setup_comp(struct ieee80211_node *, int); |
|---|
| 171 | | static void ath_comp_set(struct ieee80211vap *, struct ieee80211_node *ni, |
|---|
| 172 | | int en); |
|---|
| 173 | | #endif |
|---|
| 174 | | static int ath_tx_setup(struct ath_softc *, int ac, int haltype); |
|---|
| 175 | | static int ath_wme_update(struct ieee80211com *); |
|---|
| 176 | | static void ath_uapsd_flush(struct ieee80211_node *); |
|---|
| 177 | | static void ath_tx_cleanupq(struct ath_softc *, struct ath_txq *); |
|---|
| 178 | | static void ath_tx_cleanup(struct ath_softc *); |
|---|
| 179 | | static void ath_tx_uapsdqueue(struct ath_softc *, struct ath_node *, struct ath_buf *); |
|---|
| 180 | | |
|---|
| 181 | | static int ath_tx_start(struct net_device *, struct ieee80211_node *, |
|---|
| 182 | | struct ath_buf *, struct sk_buff *, int); |
|---|
| 183 | | static void ath_tx_tasklet_q0(TQUEUE_ARG data); |
|---|
| 184 | | static void ath_tx_tasklet_q0123(TQUEUE_ARG data); |
|---|
| 185 | | static void ath_tx_tasklet(TQUEUE_ARG data); |
|---|
| 186 | | static void ath_tx_timeout(struct net_device *); |
|---|
| 187 | | static void ath_tx_draintxq(struct ath_softc *, struct ath_txq *); |
|---|
| 188 | | static int ath_chan_set(struct ath_softc *, struct ieee80211_channel *); |
|---|
| 189 | | static void ath_draintxq(struct ath_softc *); |
|---|
| 190 | | static __inline void ath_tx_txqaddbuf(struct ath_softc *sc, struct ieee80211_node *ni, |
|---|
| 191 | | struct ath_txq *txq, struct ath_buf *bf, |
|---|
| 192 | | struct ath_desc *lastds, int framelen); |
|---|
| 193 | | static void ath_stoprecv(struct ath_softc *); |
|---|
| 194 | | static int ath_startrecv(struct ath_softc *); |
|---|
| 195 | | static void ath_flushrecv(struct ath_softc *); |
|---|
| 196 | | static void ath_chan_change(struct ath_softc *, struct ieee80211_channel *); |
|---|
| 197 | | static void ath_calibrate(unsigned long); |
|---|
| 198 | | static int ath_newstate(struct ieee80211vap *, enum ieee80211_state, int); |
|---|
| 199 | | |
|---|
| 200 | | static void ath_scan_start(struct ieee80211com *); |
|---|
| 201 | | static void ath_scan_end(struct ieee80211com *); |
|---|
| 202 | | static void ath_set_channel(struct ieee80211com *); |
|---|
| 203 | | static void ath_set_coverageclass(struct ieee80211com *); |
|---|
| 204 | | static u_int ath_mhz2ieee(struct ieee80211com *, u_int freq, u_int flags); |
|---|
| | 166 | static u_int32_t ath_get_icvlen(struct ieee80211_key *); |
|---|
| | 167 | static u_int32_t ath_get_ivlen(struct ieee80211_key *); |
|---|
| | 168 | static void ath_setup_comp(struct ieee80211_node *, int); |
|---|
| | 169 | static void ath_comp_set(struct ieee80211vap *, struct ieee80211_node *, int); |
|---|
| | 170 | #endif |
|---|
| | 171 | static int ath_tx_setup(struct ath_softc *, int, int); |
|---|
| | 172 | static int ath_wme_update(struct ieee80211com *); |
|---|
| | 173 | static void ath_uapsd_flush(struct ieee80211_node *); |
|---|
| | 174 | static void ath_tx_cleanupq(struct ath_softc *, struct ath_txq *); |
|---|
| | 175 | static void ath_tx_cleanup(struct ath_softc *); |
|---|
| | 176 | static void ath_tx_uapsdqueue(struct ath_softc *, struct ath_node *, |
|---|
| | 177 | struct ath_buf *); |
|---|
| | 178 | |
|---|
| | 179 | static int ath_tx_start(struct net_device *, struct ieee80211_node *, |
|---|
| | 180 | struct ath_buf *, struct sk_buff *, int); |
|---|
| | 181 | static void ath_tx_tasklet_q0(TQUEUE_ARG); |
|---|
| | 182 | static void ath_tx_tasklet_q0123(TQUEUE_ARG); |
|---|
| | 183 | static void ath_tx_tasklet(TQUEUE_ARG); |
|---|
| | 184 | static void ath_tx_timeout(struct net_device *); |
|---|
| | 185 | static void ath_tx_draintxq(struct ath_softc *, struct ath_txq *); |
|---|
| | 186 | static int ath_chan_set(struct ath_softc *, struct ieee80211_channel *); |
|---|
| | 187 | static void ath_draintxq(struct ath_softc *); |
|---|
| | 188 | static __inline void ath_tx_txqaddbuf(struct ath_softc *, struct ieee80211_node *, |
|---|
| | 189 | struct ath_txq *, struct ath_buf *, struct ath_desc *, int); |
|---|
| | 190 | static void ath_stoprecv(struct ath_softc *); |
|---|
| | 191 | static int ath_startrecv(struct ath_softc *); |
|---|
| | 192 | static void ath_flushrecv(struct ath_softc *); |
|---|
| | 193 | static void ath_chan_change(struct ath_softc *, struct ieee80211_channel *); |
|---|
| | 194 | static void ath_calibrate(unsigned long); |
|---|
| | 195 | static int ath_newstate(struct ieee80211vap *, enum ieee80211_state, int); |
|---|
| | 196 | |
|---|
| | 197 | static void ath_scan_start(struct ieee80211com *); |
|---|
| | 198 | static void ath_scan_end(struct ieee80211com *); |
|---|
| | 199 | static void ath_set_channel(struct ieee80211com *); |
|---|
| | 200 | static void ath_set_coverageclass(struct ieee80211com *); |
|---|
| | 201 | static u_int ath_mhz2ieee(struct ieee80211com *, u_int, u_int); |
|---|
| 210 | | static void ath_setup_stationkey(struct ieee80211_node *); |
|---|
| 211 | | static void ath_setup_stationwepkey(struct ieee80211_node *); |
|---|
| 212 | | static void ath_setup_keycacheslot(struct ath_softc *, |
|---|
| 213 | | struct ieee80211_node *); |
|---|
| 214 | | static void ath_newassoc(struct ieee80211_node *, int); |
|---|
| 215 | | static int ath_getchannels(struct net_device *, u_int cc, |
|---|
| 216 | | HAL_BOOL outdoor, HAL_BOOL xchanmode); |
|---|
| 217 | | static void ath_led_event(struct ath_softc *, int); |
|---|
| 218 | | static void ath_update_txpow(struct ath_softc *); |
|---|
| 219 | | |
|---|
| 220 | | static int ath_set_mac_address(struct net_device *, void *); |
|---|
| 221 | | static int ath_change_mtu(struct net_device *, int); |
|---|
| 222 | | static int ath_ioctl(struct net_device *, struct ifreq *, int); |
|---|
| 223 | | |
|---|
| 224 | | static int ath_rate_setup(struct net_device *, u_int mode); |
|---|
| 225 | | static void ath_setup_subrates(struct net_device *dev); |
|---|
| | 207 | static void ath_setup_stationkey(struct ieee80211_node *); |
|---|
| | 208 | static void ath_setup_stationwepkey(struct ieee80211_node *); |
|---|
| | 209 | static void ath_setup_keycacheslot(struct ath_softc *, struct ieee80211_node *); |
|---|
| | 210 | static void ath_newassoc(struct ieee80211_node *, int); |
|---|
| | 211 | static int ath_getchannels(struct net_device *, u_int, HAL_BOOL, HAL_BOOL); |
|---|
| | 212 | static void ath_led_event(struct ath_softc *, int); |
|---|
| | 213 | static void ath_update_txpow(struct ath_softc *); |
|---|
| | 214 | |
|---|
| | 215 | static int ath_set_mac_address(struct net_device *, void *); |
|---|
| | 216 | static int ath_change_mtu(struct net_device *, int); |
|---|
| | 217 | static int ath_ioctl(struct net_device *, struct ifreq *, int); |
|---|
| | 218 | |
|---|
| | 219 | static int ath_rate_setup(struct net_device *, u_int); |
|---|
| | 220 | static void ath_setup_subrates(struct net_device *); |
|---|
| 227 | | static int ath_xr_rate_setup(struct net_device *); |
|---|
| 228 | | static void ath_grppoll_txq_setup(struct ath_softc *sc, int qtype, int period); |
|---|
| 229 | | static void ath_grppoll_start(struct ieee80211vap *vap, int pollcount); |
|---|
| 230 | | static void ath_grppoll_stop(struct ieee80211vap *vap); |
|---|
| 231 | | static u_int8_t ath_node_move_data(const struct ieee80211_node *); |
|---|
| 232 | | static void ath_grppoll_txq_update(struct ath_softc *sc, int period); |
|---|
| 233 | | static void ath_grppoll_period_update(struct ath_softc *sc); |
|---|
| 234 | | #endif |
|---|
| 235 | | static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode); |
|---|
| | 222 | static int ath_xr_rate_setup(struct net_device *); |
|---|
| | 223 | static void ath_grppoll_txq_setup(struct ath_softc *, int, int); |
|---|
| | 224 | static void ath_grppoll_start(struct ieee80211vap *, int); |
|---|
| | 225 | static void ath_grppoll_stop(struct ieee80211vap *); |
|---|
| | 226 | static u_int8_t ath_node_move_data(const struct ieee80211_node *); |
|---|
| | 227 | static void ath_grppoll_txq_update(struct ath_softc *, int); |
|---|
| | 228 | static void ath_grppoll_period_update(struct ath_softc *); |
|---|
| | 229 | #endif |
|---|
| | 230 | static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode); |
|---|
| 241 | | static void ath_announce(struct net_device *); |
|---|
| 242 | | static int ath_descdma_setup(struct ath_softc *sc, |
|---|
| 243 | | struct ath_descdma *dd, ath_bufhead *head, |
|---|
| 244 | | const char *name, int nbuf, int ndesc); |
|---|
| 245 | | static void ath_descdma_cleanup(struct ath_softc *sc, |
|---|
| 246 | | struct ath_descdma *dd, ath_bufhead *head, int dir); |
|---|
| 247 | | static void ath_check_dfs_clear(unsigned long ); |
|---|
| 248 | | static const char* ath_get_hal_status_desc(HAL_STATUS status); |
|---|
| | 236 | static void ath_announce(struct net_device *); |
|---|
| | 237 | static int ath_descdma_setup(struct ath_softc *, struct ath_descdma *, |
|---|
| | 238 | ath_bufhead *, const char *, int, int); |
|---|
| | 239 | static void ath_descdma_cleanup(struct ath_softc *, struct ath_descdma *, |
|---|
| | 240 | ath_bufhead *, int); |
|---|
| | 241 | static void ath_check_dfs_clear(unsigned long); |
|---|
| | 242 | static const char *ath_get_hal_status_desc(HAL_STATUS status); |
|---|