Changeset 27071
- Timestamp:
- 2011-06-01T01:07:29+02:00 (7 years ago)
- Location:
- trunk/package/mac80211
- Files:
-
- 9 deleted
- 13 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/package/mac80211/Makefile
r27046 r27071 11 11 PKG_NAME:=mac80211 12 12 13 PKG_VERSION:=2011-05- 1313 PKG_VERSION:=2011-05-27 14 14 PKG_RELEASE:=1 15 15 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources 16 PKG_MD5SUM:= 8670d18633dbd28b19168abe3ecd035716 PKG_MD5SUM:=3a382b03333aff304dbe8ee94fce6b5a 17 17 18 18 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2 -
trunk/package/mac80211/patches/002-disable_rfkill.patch
r26912 r27071 10 10 ifeq ($(CONFIG_MAC80211),y) 11 11 $(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular") 12 @@ -6 17,10 +617,10 @@ endif #CONFIG_COMPAT_KERNEL_2712 @@ -622,10 +622,10 @@ endif #CONFIG_COMPAT_KERNEL_27 13 13 # We need the backported rfkill module on kernel < 2.6.31. 14 14 # In more recent kernel versions use the in kernel rfkill module. -
trunk/package/mac80211/patches/005-disable_ssb_build.patch
r26912 r27071 52 52 CONFIG_P54_PCI=m 53 53 54 @@ -5 07,7 +505,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv54 @@ -511,7 +509,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv 55 55 56 56 ifdef CONFIG_MMC -
trunk/package/mac80211/patches/007-remove_misc_drivers.patch
r26912 r27071 5 5 6 6 ifdef CONFIG_STAGING 7 -CONFIG_COMPAT_STAGING= y8 +# CONFIG_COMPAT_STAGING= y7 -CONFIG_COMPAT_STAGING=m 8 +# CONFIG_COMPAT_STAGING=m 9 9 endif #CONFIG_STAGING 10 10 … … 29 29 30 30 ifdef CONFIG_WIRELESS_EXT 31 @@ -40 2,21 +402,21 @@ endif #CONFIG_COMPAT_KERNEL_2931 @@ -406,21 +406,21 @@ endif #CONFIG_COMPAT_KERNEL_29 32 32 # Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER 33 33 # it also requires new RNDIS_HOST and CDC_ETHER modules which we add -
trunk/package/mac80211/patches/011-no_sdio.patch
r26912 r27071 1 1 --- a/config.mk 2 2 +++ b/config.mk 3 @@ -4 88,7 +488,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv3 @@ -492,7 +492,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv 4 4 5 5 ifdef CONFIG_MMC -
trunk/package/mac80211/patches/015-remove-rt2x00-options.patch
r26912 r27071 10 10 CONFIG_RT2500PCI=m 11 11 ifdef CONFIG_CRC_CCITT 12 @@ -4 37,7 +437,7 @@ CONFIG_RT2800USB_RT33XX=y12 @@ -441,7 +441,7 @@ CONFIG_RT2800USB_RT33XX=y 13 13 # CONFIG_RT2800USB_RT53XX=y 14 14 CONFIG_RT2800USB_UNKNOWN=y -
trunk/package/mac80211/patches/110-disable_usb_compat.patch
r26912 r27071 34 34 --- a/config.mk 35 35 +++ b/config.mk 36 @@ -42 3,7 +423,7 @@ endif #CONFIG_COMPAT_KERNEL_2936 @@ -427,7 +427,7 @@ endif #CONFIG_COMPAT_KERNEL_29 37 37 # This activates a threading fix for usb urb. 38 38 # this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351 -
trunk/package/mac80211/patches/300-pending_work.patch
r27025 r27071 1 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c2 +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c3 @@ -829,7 +829,7 @@ static bool ar9002_hw_init_cal(struct at4 if (AR_SREV_9271(ah)) {5 if (!ar9285_hw_cl_cal(ah, chan))6 return false;7 - } else if (AR_SREV_9285_12_OR_LATER(ah)) {8 + } else if (AR_SREV_9285(ah) && AR_SREV_9285_12_OR_LATER(ah)) {9 if (!ar9285_hw_clc(ah, chan))10 return false;11 } else {12 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c13 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c14 @@ -1381,3 +1381,25 @@ void ar9003_hw_bb_watchdog_dbg_info(stru15 "==== BB update: done ====\n\n");16 }17 EXPORT_SYMBOL(ar9003_hw_bb_watchdog_dbg_info);18 +19 +void ar9003_hw_disable_phy_restart(struct ath_hw *ah)20 +{21 + u32 val;22 +23 + /* While receiving unsupported rate frame rx state machine24 + * gets into a state 0xb and if phy_restart happens in that25 + * state, BB would go hang. If RXSM is in 0xb state after26 + * first bb panic, ensure to disable the phy_restart.27 + */28 + if (!((MS(ah->bb_watchdog_last_status,29 + AR_PHY_WATCHDOG_RX_OFDM_SM) == 0xb) ||30 + ah->bb_hang_rx_ofdm))31 + return;32 +33 + ah->bb_hang_rx_ofdm = true;34 + val = REG_READ(ah, AR_PHY_RESTART);35 + val &= ~AR_PHY_RESTART_ENA;36 +37 + REG_WRITE(ah, AR_PHY_RESTART, val);38 +}39 +EXPORT_SYMBOL(ar9003_hw_disable_phy_restart);40 --- a/drivers/net/wireless/ath/ath9k/hw.c41 +++ b/drivers/net/wireless/ath/ath9k/hw.c42 @@ -1555,9 +1555,12 @@ int ath9k_hw_reset(struct ath_hw *ah, st43 if (ah->btcoex_hw.enabled)44 ath9k_hw_btcoex_enable(ah);45 46 - if (AR_SREV_9300_20_OR_LATER(ah))47 + if (AR_SREV_9300_20_OR_LATER(ah)) {48 ar9003_hw_bb_watchdog_config(ah);49 50 + ar9003_hw_disable_phy_restart(ah);51 + }52 +53 ath9k_hw_apply_gpio_override(ah);54 55 return 0;56 1 --- a/drivers/net/wireless/ath/ath9k/hw.h 57 2 +++ b/drivers/net/wireless/ath/ath9k/hw.h 58 @@ -842,6 +842,7 @@ struct ath_hw { 59 60 u32 bb_watchdog_last_status; 61 u32 bb_watchdog_timeout_ms; /* in ms, 0 to disable */ 62 + u8 bb_hang_rx_ofdm; /* true if bb hang due to rx_ofdm */ 63 64 unsigned int paprd_target_power; 65 unsigned int paprd_training_power; 66 @@ -990,6 +991,7 @@ void ar9002_hw_enable_wep_aggregation(st 67 void ar9003_hw_bb_watchdog_config(struct ath_hw *ah); 68 void ar9003_hw_bb_watchdog_read(struct ath_hw *ah); 69 void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah); 70 +void ar9003_hw_disable_phy_restart(struct ath_hw *ah); 71 void ar9003_paprd_enable(struct ath_hw *ah, bool val); 72 void ar9003_paprd_populate_single_table(struct ath_hw *ah, 73 struct ath9k_hw_cal_data *caldata, 3 @@ -603,7 +603,6 @@ struct ath_hw_ops { 4 int power_off); 5 void (*rx_enable)(struct ath_hw *ah); 6 void (*set_desc_link)(void *ds, u32 link); 7 - void (*get_desc_link)(void *ds, u32 **link); 8 bool (*calibrate)(struct ath_hw *ah, 9 struct ath9k_channel *chan, 10 u8 rxchainmask, 74 11 --- a/drivers/net/wireless/ath/ath9k/main.c 75 12 +++ b/drivers/net/wireless/ath/ath9k/main.c 76 @@ -670,7 +670,8 @@ void ath9k_tasklet(unsigned long data) 77 u32 status = sc->intrstatus; 78 u32 rxmask; 79 80 - if (status & ATH9K_INT_FATAL) { 81 + if ((status & ATH9K_INT_FATAL) || 82 + (status & ATH9K_INT_BB_WATCHDOG)) { 83 ath_reset(sc, true); 13 @@ -62,8 +62,6 @@ static bool ath9k_has_pending_frames(str 14 15 if (txq->axq_depth || !list_empty(&txq->axq_acq)) 16 pending = true; 17 - else if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) 18 - pending = !list_empty(&txq->txq_fifo_pending); 19 20 spin_unlock_bh(&txq->axq_lock); 21 return pending; 22 --- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c 23 +++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c 24 @@ -28,11 +28,6 @@ static void ar9002_hw_set_desc_link(void 25 ((struct ath_desc*) ds)->ds_link = ds_link; 26 } 27 28 -static void ar9002_hw_get_desc_link(void *ds, u32 **ds_link) 29 -{ 30 - *ds_link = &((struct ath_desc *)ds)->ds_link; 31 -} 32 - 33 static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) 34 { 35 u32 isr = 0; 36 @@ -437,7 +432,6 @@ void ar9002_hw_attach_mac_ops(struct ath 37 38 ops->rx_enable = ar9002_hw_rx_enable; 39 ops->set_desc_link = ar9002_hw_set_desc_link; 40 - ops->get_desc_link = ar9002_hw_get_desc_link; 41 ops->get_isr = ar9002_hw_get_isr; 42 ops->fill_txdesc = ar9002_hw_fill_txdesc; 43 ops->proc_txdesc = ar9002_hw_proc_txdesc; 44 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c 45 +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c 46 @@ -43,13 +43,6 @@ static void ar9003_hw_set_desc_link(void 47 ads->ctl10 |= ar9003_calc_ptr_chksum(ads); 48 } 49 50 -static void ar9003_hw_get_desc_link(void *ds, u32 **ds_link) 51 -{ 52 - struct ar9003_txc *ads = ds; 53 - 54 - *ds_link = &ads->link; 55 -} 56 - 57 static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) 58 { 59 u32 isr = 0; 60 @@ -498,7 +491,6 @@ void ar9003_hw_attach_mac_ops(struct ath 61 62 ops->rx_enable = ar9003_hw_rx_enable; 63 ops->set_desc_link = ar9003_hw_set_desc_link; 64 - ops->get_desc_link = ar9003_hw_get_desc_link; 65 ops->get_isr = ar9003_hw_get_isr; 66 ops->fill_txdesc = ar9003_hw_fill_txdesc; 67 ops->proc_txdesc = ar9003_hw_proc_txdesc; 68 --- a/drivers/net/wireless/ath/ath9k/ath9k.h 69 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h 70 @@ -179,7 +179,7 @@ enum ATH_AGGR_STATUS { 71 struct ath_txq { 72 int mac80211_qnum; /* mac80211 queue number, -1 means not mac80211 Q */ 73 u32 axq_qnum; /* ath9k hardware queue number */ 74 - u32 *axq_link; 75 + void *axq_link; 76 struct list_head axq_q; 77 spinlock_t axq_lock; 78 u32 axq_depth; 79 @@ -188,7 +188,6 @@ struct ath_txq { 80 bool axq_tx_inprogress; 81 struct list_head axq_acq; 82 struct list_head txq_fifo[ATH_TXFIFO_DEPTH]; 83 - struct list_head txq_fifo_pending; 84 u8 txq_headidx; 85 u8 txq_tailidx; 86 int pending_frames; 87 --- a/drivers/net/wireless/ath/ath9k/debug.c 88 +++ b/drivers/net/wireless/ath/ath9k/debug.c 89 @@ -550,6 +550,7 @@ static ssize_t read_file_xmit(struct fil 90 91 PR("MPDUs Queued: ", queued); 92 PR("MPDUs Completed: ", completed); 93 + PR("MPDUs XRetried: ", xretries); 94 PR("Aggregates: ", a_aggr); 95 PR("AMPDUs Queued HW:", a_queued_hw); 96 PR("AMPDUs Queued SW:", a_queued_sw); 97 @@ -587,7 +588,6 @@ static ssize_t read_file_xmit(struct fil 98 99 PRQLE("axq_q empty: ", axq_q); 100 PRQLE("axq_acq empty: ", axq_acq); 101 - PRQLE("txq_fifo_pending: ", txq_fifo_pending); 102 for (i = 0; i < ATH_TXFIFO_DEPTH; i++) { 103 snprintf(tmp, sizeof(tmp) - 1, "txq_fifo[%i] empty: ", i); 104 PRQLE(tmp, txq_fifo[i]); 105 @@ -807,7 +807,10 @@ void ath_debug_stat_tx(struct ath_softc 106 else 107 TX_STAT_INC(qnum, a_completed); 108 } else { 109 - TX_STAT_INC(qnum, completed); 110 + if (bf_isxretried(bf)) 111 + TX_STAT_INC(qnum, xretries); 112 + else 113 + TX_STAT_INC(qnum, completed); 114 } 115 116 if (ts->ts_status & ATH9K_TXERR_FIFO) 117 --- a/drivers/net/wireless/ath/ath9k/hw-ops.h 118 +++ b/drivers/net/wireless/ath/ath9k/hw-ops.h 119 @@ -39,11 +39,6 @@ static inline void ath9k_hw_set_desc_lin 120 ath9k_hw_ops(ah)->set_desc_link(ds, link); 121 } 122 123 -static inline void ath9k_hw_get_desc_link(struct ath_hw *ah, void *ds, 124 - u32 **link) 125 -{ 126 - ath9k_hw_ops(ah)->get_desc_link(ds, link); 127 -} 128 static inline bool ath9k_hw_calibrate(struct ath_hw *ah, 129 struct ath9k_channel *chan, 130 u8 rxchainmask, 131 --- a/drivers/net/wireless/ath/ath9k/xmit.c 132 +++ b/drivers/net/wireless/ath/ath9k/xmit.c 133 @@ -53,7 +53,7 @@ static void ath_tx_complete_buf(struct a 134 struct ath_txq *txq, struct list_head *bf_q, 135 struct ath_tx_status *ts, int txok, int sendbar); 136 static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, 137 - struct list_head *head); 138 + struct list_head *head, bool internal); 139 static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, int len); 140 static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf, 141 struct ath_tx_status *ts, int nframes, int nbad, 142 @@ -377,8 +377,7 @@ static void ath_tx_complete_aggr(struct 143 bf_next = bf->bf_next; 144 145 bf->bf_state.bf_type |= BUF_XRETRY; 146 - if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) || 147 - !bf->bf_stale || bf_next != NULL) 148 + if (!bf->bf_stale || bf_next != NULL) 149 list_move_tail(&bf->list, &bf_head); 150 151 ath_tx_rc_status(sc, bf, ts, 1, 1, 0, false); 152 @@ -463,20 +462,14 @@ static void ath_tx_complete_aggr(struct 153 } 154 } 155 156 - if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) && 157 - bf_next == NULL) { 158 - /* 159 - * Make sure the last desc is reclaimed if it 160 - * not a holding desc. 161 - */ 162 - if (!bf_last->bf_stale) 163 - list_move_tail(&bf->list, &bf_head); 164 - else 165 - INIT_LIST_HEAD(&bf_head); 166 - } else { 167 - BUG_ON(list_empty(bf_q)); 168 + /* 169 + * Make sure the last desc is reclaimed if it 170 + * not a holding desc. 171 + */ 172 + if (!bf_last->bf_stale || bf_next != NULL) 173 list_move_tail(&bf->list, &bf_head); 174 - } 175 + else 176 + INIT_LIST_HEAD(&bf_head); 177 178 if (!txpending || (tid->state & AGGR_CLEANUP)) { 179 /* 180 @@ -837,7 +830,7 @@ static void ath_tx_sched_aggr(struct ath 181 bf->bf_state.bf_type &= ~BUF_AGGR; 182 ath9k_hw_clr11n_aggr(sc->sc_ah, bf->bf_desc); 183 ath_buf_set_rate(sc, bf, fi->framelen); 184 - ath_tx_txqaddbuf(sc, txq, &bf_q); 185 + ath_tx_txqaddbuf(sc, txq, &bf_q, false); 186 continue; 187 } 188 189 @@ -849,7 +842,7 @@ static void ath_tx_sched_aggr(struct ath 190 /* anchor last desc of aggregate */ 191 ath9k_hw_set11n_aggr_last(sc->sc_ah, bf->bf_lastbf->bf_desc); 192 193 - ath_tx_txqaddbuf(sc, txq, &bf_q); 194 + ath_tx_txqaddbuf(sc, txq, &bf_q, false); 195 TX_STAT_INC(txq->axq_qnum, a_aggr); 196 197 } while (txq->axq_ampdu_depth < ATH_AGGR_MIN_QDEPTH && 198 @@ -1085,7 +1078,6 @@ struct ath_txq *ath_txq_setup(struct ath 199 txq->txq_headidx = txq->txq_tailidx = 0; 200 for (i = 0; i < ATH_TXFIFO_DEPTH; i++) 201 INIT_LIST_HEAD(&txq->txq_fifo[i]); 202 - INIT_LIST_HEAD(&txq->txq_fifo_pending); 203 } 204 return &sc->tx.txq[axq_qnum]; 205 } 206 @@ -1155,13 +1147,8 @@ static bool bf_is_ampdu_not_probing(stru 207 return bf_isampdu(bf) && !(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE); 208 } 209 210 -/* 211 - * Drain a given TX queue (could be Beacon or Data) 212 - * 213 - * This assumes output has been stopped and 214 - * we do not need to block ath_tx_tasklet. 215 - */ 216 -void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx) 217 +static void ath_drain_txq_list(struct ath_softc *sc, struct ath_txq *txq, 218 + struct list_head *list, bool retry_tx) 219 { 220 struct ath_buf *bf, *lastbf; 221 struct list_head bf_head; 222 @@ -1170,93 +1157,63 @@ void ath_draintxq(struct ath_softc *sc, 223 memset(&ts, 0, sizeof(ts)); 224 INIT_LIST_HEAD(&bf_head); 225 226 - for (;;) { 227 - spin_lock_bh(&txq->axq_lock); 228 + while (!list_empty(list)) { 229 + bf = list_first_entry(list, struct ath_buf, list); 230 231 - if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { 232 - if (list_empty(&txq->txq_fifo[txq->txq_tailidx])) { 233 - txq->txq_headidx = txq->txq_tailidx = 0; 234 - spin_unlock_bh(&txq->axq_lock); 235 - break; 236 - } else { 237 - bf = list_first_entry(&txq->txq_fifo[txq->txq_tailidx], 238 - struct ath_buf, list); 239 - } 240 - } else { 241 - if (list_empty(&txq->axq_q)) { 242 - txq->axq_link = NULL; 243 - spin_unlock_bh(&txq->axq_lock); 244 - break; 245 - } 246 - bf = list_first_entry(&txq->axq_q, struct ath_buf, 247 - list); 248 - 249 - if (bf->bf_stale) { 250 - list_del(&bf->list); 251 - spin_unlock_bh(&txq->axq_lock); 252 + if (bf->bf_stale) { 253 + list_del(&bf->list); 254 255 - ath_tx_return_buffer(sc, bf); 256 - continue; 257 - } 258 + ath_tx_return_buffer(sc, bf); 259 + continue; 260 } 261 262 lastbf = bf->bf_lastbf; 263 - 264 - if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { 265 - list_cut_position(&bf_head, 266 - &txq->txq_fifo[txq->txq_tailidx], 267 - &lastbf->list); 268 - INCR(txq->txq_tailidx, ATH_TXFIFO_DEPTH); 269 - } else { 270 - /* remove ath_buf's of the same mpdu from txq */ 271 - list_cut_position(&bf_head, &txq->axq_q, &lastbf->list); 272 - } 273 + list_cut_position(&bf_head, list, &lastbf->list); 274 275 txq->axq_depth--; 276 if (bf_is_ampdu_not_probing(bf)) 277 txq->axq_ampdu_depth--; 278 - spin_unlock_bh(&txq->axq_lock); 279 280 + spin_unlock_bh(&txq->axq_lock); 281 if (bf_isampdu(bf)) 282 ath_tx_complete_aggr(sc, txq, bf, &bf_head, &ts, 0, 283 retry_tx); 284 else 285 ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 0); 286 + spin_lock_bh(&txq->axq_lock); 287 } 288 +} 289 290 +/* 291 + * Drain a given TX queue (could be Beacon or Data) 292 + * 293 + * This assumes output has been stopped and 294 + * we do not need to block ath_tx_tasklet. 295 + */ 296 +void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx) 297 +{ 298 spin_lock_bh(&txq->axq_lock); 299 - txq->axq_tx_inprogress = false; 300 - spin_unlock_bh(&txq->axq_lock); 301 - 302 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { 303 - spin_lock_bh(&txq->axq_lock); 304 - while (!list_empty(&txq->txq_fifo_pending)) { 305 - bf = list_first_entry(&txq->txq_fifo_pending, 306 - struct ath_buf, list); 307 - list_cut_position(&bf_head, 308 - &txq->txq_fifo_pending, 309 - &bf->bf_lastbf->list); 310 - spin_unlock_bh(&txq->axq_lock); 311 + int idx = txq->txq_tailidx; 312 313 - if (bf_isampdu(bf)) 314 - ath_tx_complete_aggr(sc, txq, bf, &bf_head, 315 - &ts, 0, retry_tx); 316 - else 317 - ath_tx_complete_buf(sc, bf, txq, &bf_head, 318 - &ts, 0, 0); 319 - spin_lock_bh(&txq->axq_lock); 320 + while (!list_empty(&txq->txq_fifo[idx])) { 321 + ath_drain_txq_list(sc, txq, &txq->txq_fifo[idx], 322 + retry_tx); 323 + 324 + INCR(idx, ATH_TXFIFO_DEPTH); 325 } 326 - spin_unlock_bh(&txq->axq_lock); 327 + txq->txq_tailidx = idx; 328 } 329 330 + txq->axq_link = NULL; 331 + txq->axq_tx_inprogress = false; 332 + ath_drain_txq_list(sc, txq, &txq->axq_q, retry_tx); 333 + 334 /* flush any pending frames if aggregation is enabled */ 335 - if (sc->sc_flags & SC_OP_TXAGGR) { 336 - if (!retry_tx) { 337 - spin_lock_bh(&txq->axq_lock); 338 - ath_txq_drain_pending_buffers(sc, txq); 339 - spin_unlock_bh(&txq->axq_lock); 340 - } 341 - } 342 + if ((sc->sc_flags & SC_OP_TXAGGR) && !retry_tx) 343 + ath_txq_drain_pending_buffers(sc, txq); 344 + 345 + spin_unlock_bh(&txq->axq_lock); 346 } 347 348 bool ath_drain_all_txq(struct ath_softc *sc, bool retry_tx) 349 @@ -1370,11 +1327,13 @@ void ath_txq_schedule(struct ath_softc * 350 * assume the descriptors are already chained together by caller. 351 */ 352 static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, 353 - struct list_head *head) 354 + struct list_head *head, bool internal) 355 { 356 struct ath_hw *ah = sc->sc_ah; 357 struct ath_common *common = ath9k_hw_common(ah); 358 - struct ath_buf *bf; 359 + struct ath_buf *bf, *bf_last; 360 + bool puttxbuf = false; 361 + bool edma; 362 363 /* 364 * Insert the frame on the outbound list and 365 @@ -1384,51 +1343,49 @@ static void ath_tx_txqaddbuf(struct ath_ 366 if (list_empty(head)) 84 367 return; 368 369 + edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA); 370 bf = list_first_entry(head, struct ath_buf, list); 371 + bf_last = list_entry(head->prev, struct ath_buf, list); 372 373 ath_dbg(common, ATH_DBG_QUEUE, 374 "qnum: %d, txq depth: %d\n", txq->axq_qnum, txq->axq_depth); 375 376 - if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { 377 - if (txq->axq_depth >= ATH_TXFIFO_DEPTH) { 378 - list_splice_tail_init(head, &txq->txq_fifo_pending); 379 - return; 380 - } 381 - if (!list_empty(&txq->txq_fifo[txq->txq_headidx])) 382 - ath_dbg(common, ATH_DBG_XMIT, 383 - "Initializing tx fifo %d which is non-empty\n", 384 - txq->txq_headidx); 385 - INIT_LIST_HEAD(&txq->txq_fifo[txq->txq_headidx]); 386 - list_splice_init(head, &txq->txq_fifo[txq->txq_headidx]); 387 + if (edma && list_empty(&txq->txq_fifo[txq->txq_headidx])) { 388 + list_splice_tail_init(head, &txq->txq_fifo[txq->txq_headidx]); 389 INCR(txq->txq_headidx, ATH_TXFIFO_DEPTH); 390 - TX_STAT_INC(txq->axq_qnum, puttxbuf); 391 - ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); 392 - ath_dbg(common, ATH_DBG_XMIT, "TXDP[%u] = %llx (%p)\n", 393 - txq->axq_qnum, ito64(bf->bf_daddr), bf->bf_desc); 394 + puttxbuf = true; 395 } else { 396 list_splice_tail_init(head, &txq->axq_q); 397 398 - if (txq->axq_link == NULL) { 399 - TX_STAT_INC(txq->axq_qnum, puttxbuf); 400 - ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); 401 - ath_dbg(common, ATH_DBG_XMIT, "TXDP[%u] = %llx (%p)\n", 402 - txq->axq_qnum, ito64(bf->bf_daddr), 403 - bf->bf_desc); 404 - } else { 405 - *txq->axq_link = bf->bf_daddr; 406 + if (txq->axq_link) { 407 + ath9k_hw_set_desc_link(ah, txq->axq_link, bf->bf_daddr); 408 ath_dbg(common, ATH_DBG_XMIT, 409 "link[%u] (%p)=%llx (%p)\n", 410 txq->axq_qnum, txq->axq_link, 411 ito64(bf->bf_daddr), bf->bf_desc); 412 - } 413 - ath9k_hw_get_desc_link(ah, bf->bf_lastbf->bf_desc, 414 - &txq->axq_link); 415 + } else if (!edma) 416 + puttxbuf = true; 417 + 418 + txq->axq_link = bf_last->bf_desc; 419 + } 420 + 421 + if (puttxbuf) { 422 + TX_STAT_INC(txq->axq_qnum, puttxbuf); 423 + ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); 424 + ath_dbg(common, ATH_DBG_XMIT, "TXDP[%u] = %llx (%p)\n", 425 + txq->axq_qnum, ito64(bf->bf_daddr), bf->bf_desc); 426 + } 427 + 428 + if (!edma) { 429 TX_STAT_INC(txq->axq_qnum, txstart); 430 ath9k_hw_txstart(ah, txq->axq_qnum); 85 431 } 86 @@ -737,6 +738,7 @@ irqreturn_t ath_isr(int irq, void *dev) 432 - txq->axq_depth++; 433 - if (bf_is_ampdu_not_probing(bf)) 434 - txq->axq_ampdu_depth++; 435 + 436 + if (!internal) { 437 + txq->axq_depth++; 438 + if (bf_is_ampdu_not_probing(bf)) 439 + txq->axq_ampdu_depth++; 440 + } 441 } 442 443 static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_atx_tid *tid, 444 @@ -1470,7 +1427,7 @@ static void ath_tx_send_ampdu(struct ath 445 TX_STAT_INC(txctl->txq->axq_qnum, a_queued_hw); 446 bf->bf_lastbf = bf; 447 ath_buf_set_rate(sc, bf, fi->framelen); 448 - ath_tx_txqaddbuf(sc, txctl->txq, &bf_head); 449 + ath_tx_txqaddbuf(sc, txctl->txq, &bf_head, false); 450 } 451 452 static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq, 453 @@ -1490,7 +1447,7 @@ static void ath_tx_send_normal(struct at 454 bf->bf_lastbf = bf; 455 fi = get_frame_info(bf->bf_mpdu); 456 ath_buf_set_rate(sc, bf, fi->framelen); 457 - ath_tx_txqaddbuf(sc, txq, bf_head); 458 + ath_tx_txqaddbuf(sc, txq, bf_head, false); 459 TX_STAT_INC(txq->axq_qnum, queued); 460 } 461 462 @@ -2077,6 +2034,38 @@ static void ath_tx_rc_status(struct ath_ 463 tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1; 464 } 465 466 +static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq, 467 + struct ath_tx_status *ts, struct ath_buf *bf, 468 + struct list_head *bf_head) 469 +{ 470 + int txok; 471 + 472 + txq->axq_depth--; 473 + txok = !(ts->ts_status & ATH9K_TXERR_MASK); 474 + txq->axq_tx_inprogress = false; 475 + if (bf_is_ampdu_not_probing(bf)) 476 + txq->axq_ampdu_depth--; 477 + 478 + spin_unlock_bh(&txq->axq_lock); 479 + 480 + if (!bf_isampdu(bf)) { 481 + /* 482 + * This frame is sent out as a single frame. 483 + * Use hardware retry status for this frame. 484 + */ 485 + if (ts->ts_status & ATH9K_TXERR_XRETRY) 486 + bf->bf_state.bf_type |= BUF_XRETRY; 487 + ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok, true); 488 + ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok, 0); 489 + } else 490 + ath_tx_complete_aggr(sc, txq, bf, bf_head, ts, txok, true); 491 + 492 + spin_lock_bh(&txq->axq_lock); 493 + 494 + if (sc->sc_flags & SC_OP_TXAGGR) 495 + ath_txq_schedule(sc, txq); 496 +} 497 + 498 static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) 87 499 { 88 #define SCHED_INTR ( \ 89 ATH9K_INT_FATAL | \ 90 + ATH9K_INT_BB_WATCHDOG | \ 91 ATH9K_INT_RXORN | \ 92 ATH9K_INT_RXEOL | \ 93 ATH9K_INT_RX | \ 500 struct ath_hw *ah = sc->sc_ah; 501 @@ -2085,20 +2074,18 @@ static void ath_tx_processq(struct ath_s 502 struct list_head bf_head; 503 struct ath_desc *ds; 504 struct ath_tx_status ts; 505 - int txok; 506 int status; 507 508 ath_dbg(common, ATH_DBG_QUEUE, "tx queue %d (%x), link %p\n", 509 txq->axq_qnum, ath9k_hw_gettxbuf(sc->sc_ah, txq->axq_qnum), 510 txq->axq_link); 511 512 + spin_lock_bh(&txq->axq_lock); 513 for (;;) { 514 - spin_lock_bh(&txq->axq_lock); 515 if (list_empty(&txq->axq_q)) { 516 txq->axq_link = NULL; 517 if (sc->sc_flags & SC_OP_TXAGGR) 518 ath_txq_schedule(sc, txq); 519 - spin_unlock_bh(&txq->axq_lock); 520 break; 521 } 522 bf = list_first_entry(&txq->axq_q, struct ath_buf, list); 523 @@ -2114,13 +2101,11 @@ static void ath_tx_processq(struct ath_s 524 bf_held = NULL; 525 if (bf->bf_stale) { 526 bf_held = bf; 527 - if (list_is_last(&bf_held->list, &txq->axq_q)) { 528 - spin_unlock_bh(&txq->axq_lock); 529 + if (list_is_last(&bf_held->list, &txq->axq_q)) 530 break; 531 - } else { 532 - bf = list_entry(bf_held->list.next, 533 - struct ath_buf, list); 534 - } 535 + 536 + bf = list_entry(bf_held->list.next, struct ath_buf, 537 + list); 538 } 539 540 lastbf = bf->bf_lastbf; 541 @@ -2128,10 +2113,9 @@ static void ath_tx_processq(struct ath_s 542 543 memset(&ts, 0, sizeof(ts)); 544 status = ath9k_hw_txprocdesc(ah, ds, &ts); 545 - if (status == -EINPROGRESS) { 546 - spin_unlock_bh(&txq->axq_lock); 547 + if (status == -EINPROGRESS) 548 break; 549 - } 550 + 551 TX_STAT_INC(txq->axq_qnum, txprocdesc); 552 553 /* 554 @@ -2145,42 +2129,14 @@ static void ath_tx_processq(struct ath_s 555 list_cut_position(&bf_head, 556 &txq->axq_q, lastbf->list.prev); 557 558 - txq->axq_depth--; 559 - txok = !(ts.ts_status & ATH9K_TXERR_MASK); 560 - txq->axq_tx_inprogress = false; 561 - if (bf_held) 562 + if (bf_held) { 563 list_del(&bf_held->list); 564 - 565 - if (bf_is_ampdu_not_probing(bf)) 566 - txq->axq_ampdu_depth--; 567 - 568 - spin_unlock_bh(&txq->axq_lock); 569 - 570 - if (bf_held) 571 ath_tx_return_buffer(sc, bf_held); 572 - 573 - if (!bf_isampdu(bf)) { 574 - /* 575 - * This frame is sent out as a single frame. 576 - * Use hardware retry status for this frame. 577 - */ 578 - if (ts.ts_status & ATH9K_TXERR_XRETRY) 579 - bf->bf_state.bf_type |= BUF_XRETRY; 580 - ath_tx_rc_status(sc, bf, &ts, 1, txok ? 0 : 1, txok, true); 581 } 582 583 - if (bf_isampdu(bf)) 584 - ath_tx_complete_aggr(sc, txq, bf, &bf_head, &ts, txok, 585 - true); 586 - else 587 - ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, txok, 0); 588 - 589 - spin_lock_bh(&txq->axq_lock); 590 - 591 - if (sc->sc_flags & SC_OP_TXAGGR) 592 - ath_txq_schedule(sc, txq); 593 - spin_unlock_bh(&txq->axq_lock); 594 + ath_tx_process_buffer(sc, txq, &ts, bf, &bf_head); 595 } 596 + spin_unlock_bh(&txq->axq_lock); 597 } 598 599 static void ath_tx_complete_poll_work(struct work_struct *work) 600 @@ -2237,17 +2193,16 @@ void ath_tx_tasklet(struct ath_softc *sc 601 602 void ath_tx_edma_tasklet(struct ath_softc *sc) 603 { 604 - struct ath_tx_status txs; 605 + struct ath_tx_status ts; 606 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 607 struct ath_hw *ah = sc->sc_ah; 608 struct ath_txq *txq; 609 struct ath_buf *bf, *lastbf; 610 struct list_head bf_head; 611 int status; 612 - int txok; 613 614 for (;;) { 615 - status = ath9k_hw_txprocdesc(ah, NULL, (void *)&txs); 616 + status = ath9k_hw_txprocdesc(ah, NULL, (void *)&ts); 617 if (status == -EINPROGRESS) 618 break; 619 if (status == -EIO) { 620 @@ -2257,12 +2212,13 @@ void ath_tx_edma_tasklet(struct ath_soft 621 } 622 623 /* Skip beacon completions */ 624 - if (txs.qid == sc->beacon.beaconq) 625 + if (ts.qid == sc->beacon.beaconq) 626 continue; 627 628 - txq = &sc->tx.txq[txs.qid]; 629 + txq = &sc->tx.txq[ts.qid]; 630 631 spin_lock_bh(&txq->axq_lock); 632 + 633 if (list_empty(&txq->txq_fifo[txq->txq_tailidx])) { 634 spin_unlock_bh(&txq->axq_lock); 635 return; 636 @@ -2275,41 +2231,21 @@ void ath_tx_edma_tasklet(struct ath_soft 637 INIT_LIST_HEAD(&bf_head); 638 list_cut_position(&bf_head, &txq->txq_fifo[txq->txq_tailidx], 639 &lastbf->list); 640 - INCR(txq->txq_tailidx, ATH_TXFIFO_DEPTH); 641 - txq->axq_depth--; 642 - txq->axq_tx_inprogress = false; 643 - if (bf_is_ampdu_not_probing(bf)) 644 - txq->axq_ampdu_depth--; 645 - spin_unlock_bh(&txq->axq_lock); 646 647 - txok = !(txs.ts_status & ATH9K_TXERR_MASK); 648 - 649 - if (!bf_isampdu(bf)) { 650 - if (txs.ts_status & ATH9K_TXERR_XRETRY) 651 - bf->bf_state.bf_type |= BUF_XRETRY; 652 - ath_tx_rc_status(sc, bf, &txs, 1, txok ? 0 : 1, txok, true); 653 - } 654 - 655 - if (bf_isampdu(bf)) 656 - ath_tx_complete_aggr(sc, txq, bf, &bf_head, &txs, 657 - txok, true); 658 - else 659 - ath_tx_complete_buf(sc, bf, txq, &bf_head, 660 - &txs, txok, 0); 661 + if (list_empty(&txq->txq_fifo[txq->txq_tailidx])) { 662 + INCR(txq->txq_tailidx, ATH_TXFIFO_DEPTH); 663 664 - spin_lock_bh(&txq->axq_lock); 665 + if (!list_empty(&txq->axq_q)) { 666 + struct list_head bf_q; 667 668 - if (!list_empty(&txq->txq_fifo_pending)) { 669 - INIT_LIST_HEAD(&bf_head); 670 - bf = list_first_entry(&txq->txq_fifo_pending, 671 - struct ath_buf, list); 672 - list_cut_position(&bf_head, 673 - &txq->txq_fifo_pending, 674 - &bf->bf_lastbf->list); 675 - ath_tx_txqaddbuf(sc, txq, &bf_head); 676 - } else if (sc->sc_flags & SC_OP_TXAGGR) 677 - ath_txq_schedule(sc, txq); 678 + INIT_LIST_HEAD(&bf_q); 679 + txq->axq_link = NULL; 680 + list_splice_tail_init(&txq->axq_q, &bf_q); 681 + ath_tx_txqaddbuf(sc, txq, &bf_q, true); 682 + } 683 + } 684 685 + ath_tx_process_buffer(sc, txq, &ts, bf, &bf_head); 686 spin_unlock_bh(&txq->axq_lock); 687 } 688 } 689 --- a/net/mac80211/agg-rx.c 690 +++ b/net/mac80211/agg-rx.c 691 @@ -161,6 +161,8 @@ static void ieee80211_send_addba_resp(st 692 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); 693 else if (sdata->vif.type == NL80211_IFTYPE_STATION) 694 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); 695 + else if (sdata->vif.type == NL80211_IFTYPE_WDS) 696 + memcpy(mgmt->bssid, da, ETH_ALEN); 697 698 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | 699 IEEE80211_STYPE_ACTION); 700 --- a/net/mac80211/agg-tx.c 701 +++ b/net/mac80211/agg-tx.c 702 @@ -79,7 +79,8 @@ static void ieee80211_send_addba_request 703 memcpy(mgmt->da, da, ETH_ALEN); 704 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); 705 if (sdata->vif.type == NL80211_IFTYPE_AP || 706 - sdata->vif.type == NL80211_IFTYPE_AP_VLAN) 707 + sdata->vif.type == NL80211_IFTYPE_AP_VLAN || 708 + sdata->vif.type == NL80211_IFTYPE_WDS) 709 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); 710 else if (sdata->vif.type == NL80211_IFTYPE_STATION) 711 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); 712 @@ -388,7 +389,8 @@ int ieee80211_start_tx_ba_session(struct 713 */ 714 if (sdata->vif.type != NL80211_IFTYPE_STATION && 715 sdata->vif.type != NL80211_IFTYPE_AP_VLAN && 716 - sdata->vif.type != NL80211_IFTYPE_AP) 717 + sdata->vif.type != NL80211_IFTYPE_AP && 718 + sdata->vif.type != NL80211_IFTYPE_WDS) 719 return -EINVAL; 720 721 if (test_sta_flags(sta, WLAN_STA_BLOCK_BA)) { 722 --- a/net/mac80211/debugfs_sta.c 723 +++ b/net/mac80211/debugfs_sta.c 724 @@ -59,7 +59,7 @@ static ssize_t sta_flags_read(struct fil 725 char buf[100]; 726 struct sta_info *sta = file->private_data; 727 u32 staflags = get_sta_flags(sta); 728 - int res = scnprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s", 729 + int res = scnprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s", 730 staflags & WLAN_STA_AUTH ? "AUTH\n" : "", 731 staflags & WLAN_STA_ASSOC ? "ASSOC\n" : "", 732 staflags & WLAN_STA_PS_STA ? "PS (sta)\n" : "", 733 @@ -67,7 +67,6 @@ static ssize_t sta_flags_read(struct fil 734 staflags & WLAN_STA_AUTHORIZED ? "AUTHORIZED\n" : "", 735 staflags & WLAN_STA_SHORT_PREAMBLE ? "SHORT PREAMBLE\n" : "", 736 staflags & WLAN_STA_WME ? "WME\n" : "", 737 - staflags & WLAN_STA_WDS ? "WDS\n" : "", 738 staflags & WLAN_STA_MFP ? "MFP\n" : ""); 739 return simple_read_from_buffer(userbuf, count, ppos, buf, res); 740 } 741 --- a/net/mac80211/iface.c 742 +++ b/net/mac80211/iface.c 743 @@ -178,7 +178,6 @@ static int ieee80211_do_open(struct net_ 744 { 745 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 746 struct ieee80211_local *local = sdata->local; 747 - struct sta_info *sta; 748 u32 changed = 0; 749 int res; 750 u32 hw_reconf_flags = 0; 751 @@ -290,27 +289,6 @@ static int ieee80211_do_open(struct net_ 752 753 set_bit(SDATA_STATE_RUNNING, &sdata->state); 754 755 - if (sdata->vif.type == NL80211_IFTYPE_WDS) { 756 - /* Create STA entry for the WDS peer */ 757 - sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr, 758 - GFP_KERNEL); 759 - if (!sta) { 760 - res = -ENOMEM; 761 - goto err_del_interface; 762 - } 763 - 764 - /* no locking required since STA is not live yet */ 765 - sta->flags |= WLAN_STA_AUTHORIZED; 766 - 767 - res = sta_info_insert(sta); 768 - if (res) { 769 - /* STA has been freed */ 770 - goto err_del_interface; 771 - } 772 - 773 - rate_control_rate_init(sta); 774 - } 775 - 776 /* 777 * set_multicast_list will be invoked by the networking core 778 * which will check whether any increments here were done in 779 @@ -344,8 +322,7 @@ static int ieee80211_do_open(struct net_ 780 netif_tx_start_all_queues(dev); 781 782 return 0; 783 - err_del_interface: 784 - drv_remove_interface(local, &sdata->vif); 785 + 786 err_stop: 787 if (!local->open_count) 788 drv_stop(local); 789 @@ -718,6 +695,70 @@ static void ieee80211_if_setup(struct ne 790 dev->destructor = free_netdev; 791 } 792 793 +static void ieee80211_wds_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, 794 + struct sk_buff *skb) 795 +{ 796 + struct ieee80211_local *local = sdata->local; 797 + struct ieee80211_rx_status *rx_status; 798 + struct ieee802_11_elems elems; 799 + struct ieee80211_mgmt *mgmt; 800 + struct sta_info *sta; 801 + size_t baselen; 802 + u32 rates = 0; 803 + u16 stype; 804 + bool new = false; 805 + enum ieee80211_band band = local->hw.conf.channel->band; 806 + struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band]; 807 + 808 + rx_status = IEEE80211_SKB_RXCB(skb); 809 + mgmt = (struct ieee80211_mgmt *) skb->data; 810 + stype = le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE; 811 + 812 + if (stype != IEEE80211_STYPE_BEACON) 813 + return; 814 + 815 + baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; 816 + if (baselen > skb->len) 817 + return; 818 + 819 + ieee802_11_parse_elems(mgmt->u.probe_resp.variable, 820 + skb->len - baselen, &elems); 821 + 822 + rates = ieee80211_sta_get_rates(local, &elems, band); 823 + 824 + rcu_read_lock(); 825 + 826 + sta = sta_info_get(sdata, sdata->u.wds.remote_addr); 827 + 828 + if (!sta) { 829 + rcu_read_unlock(); 830 + sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr, 831 + GFP_KERNEL); 832 + if (!sta) 833 + return; 834 + 835 + new = true; 836 + } 837 + 838 + sta->last_rx = jiffies; 839 + sta->sta.supp_rates[local->hw.conf.channel->band] = rates; 840 + 841 + if (elems.ht_cap_elem) 842 + ieee80211_ht_cap_ie_to_sta_ht_cap(sband, 843 + elems.ht_cap_elem, &sta->sta.ht_cap); 844 + 845 + if (elems.wmm_param) 846 + set_sta_flags(sta, WLAN_STA_WME); 847 + 848 + if (new) { 849 + sta->flags = WLAN_STA_AUTHORIZED; 850 + rate_control_rate_init(sta); 851 + sta_info_insert_rcu(sta); 852 + } 853 + 854 + rcu_read_unlock(); 855 +} 856 + 857 static void ieee80211_iface_work(struct work_struct *work) 858 { 859 struct ieee80211_sub_if_data *sdata = 860 @@ -822,6 +863,9 @@ static void ieee80211_iface_work(struct 861 break; 862 ieee80211_mesh_rx_queued_mgmt(sdata, skb); 863 break; 864 + case NL80211_IFTYPE_WDS: 865 + ieee80211_wds_rx_queued_mgmt(sdata, skb); 866 + break; 867 default: 868 WARN(1, "frame for unexpected interface type"); 869 break; 870 --- a/net/mac80211/rx.c 871 +++ b/net/mac80211/rx.c 872 @@ -2137,7 +2137,8 @@ ieee80211_rx_h_action(struct ieee80211_r 873 */ 874 if (sdata->vif.type != NL80211_IFTYPE_STATION && 875 sdata->vif.type != NL80211_IFTYPE_AP_VLAN && 876 - sdata->vif.type != NL80211_IFTYPE_AP) 877 + sdata->vif.type != NL80211_IFTYPE_AP && 878 + sdata->vif.type != NL80211_IFTYPE_WDS) 879 break; 880 881 /* verify action_code is present */ 882 @@ -2335,13 +2336,14 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_ 883 884 if (!ieee80211_vif_is_mesh(&sdata->vif) && 885 sdata->vif.type != NL80211_IFTYPE_ADHOC && 886 - sdata->vif.type != NL80211_IFTYPE_STATION) 887 + sdata->vif.type != NL80211_IFTYPE_STATION && 888 + sdata->vif.type != NL80211_IFTYPE_WDS) 889 return RX_DROP_MONITOR; 890 891 switch (stype) { 892 case cpu_to_le16(IEEE80211_STYPE_BEACON): 893 case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP): 894 - /* process for all: mesh, mlme, ibss */ 895 + /* process for all: mesh, mlme, ibss, wds */ 896 break; 897 case cpu_to_le16(IEEE80211_STYPE_DEAUTH): 898 case cpu_to_le16(IEEE80211_STYPE_DISASSOC): 899 @@ -2680,10 +2682,16 @@ static int prepare_for_handlers(struct i 900 } 901 break; 902 case NL80211_IFTYPE_WDS: 903 - if (bssid || !ieee80211_is_data(hdr->frame_control)) 904 - return 0; 905 if (compare_ether_addr(sdata->u.wds.remote_addr, hdr->addr2)) 906 return 0; 907 + 908 + if (ieee80211_is_data(hdr->frame_control) || 909 + ieee80211_is_action(hdr->frame_control)) { 910 + if (compare_ether_addr(sdata->vif.addr, hdr->addr1)) 911 + return 0; 912 + } else if (!ieee80211_is_beacon(hdr->frame_control)) 913 + return 0; 914 + 915 break; 916 default: 917 /* should never get here */ 918 --- a/net/mac80211/sta_info.h 919 +++ b/net/mac80211/sta_info.h 920 @@ -31,7 +31,6 @@ 921 * frames. 922 * @WLAN_STA_ASSOC_AP: We're associated to that station, it is an AP. 923 * @WLAN_STA_WME: Station is a QoS-STA. 924 - * @WLAN_STA_WDS: Station is one of our WDS peers. 925 * @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the 926 * IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next 927 * frame to this station is transmitted. 928 @@ -54,7 +53,6 @@ enum ieee80211_sta_info_flags { 929 WLAN_STA_SHORT_PREAMBLE = 1<<4, 930 WLAN_STA_ASSOC_AP = 1<<5, 931 WLAN_STA_WME = 1<<6, 932 - WLAN_STA_WDS = 1<<7, 933 WLAN_STA_CLEAR_PS_FILT = 1<<9, 934 WLAN_STA_MFP = 1<<10, 935 WLAN_STA_BLOCK_BA = 1<<11, 936 --- a/drivers/net/wireless/ath/ath9k/debug.h 937 +++ b/drivers/net/wireless/ath/ath9k/debug.h 938 @@ -116,6 +116,7 @@ struct ath_tx_stats { 939 u32 tx_bytes_all; 940 u32 queued; 941 u32 completed; 942 + u32 xretries; 943 u32 a_aggr; 944 u32 a_queued_hw; 945 u32 a_queued_sw; 946 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 947 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 948 @@ -4645,10 +4645,16 @@ static void ar9003_hw_set_power_per_rate 949 case 1: 950 break; 951 case 2: 952 - scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; 953 + if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN) 954 + scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; 955 + else 956 + scaledPower = 0; 957 break; 958 case 3: 959 - scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; 960 + if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN) 961 + scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; 962 + else 963 + scaledPower = 0; 964 break; 965 } 966 967 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c 968 +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c 969 @@ -524,10 +524,16 @@ static void ath9k_hw_set_ar9287_power_pe 970 case 1: 971 break; 972 case 2: 973 - scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; 974 + if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN) 975 + scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; 976 + else 977 + scaledPower = 0; 978 break; 979 case 3: 980 - scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; 981 + if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN) 982 + scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; 983 + else 984 + scaledPower = 0; 985 break; 986 } 987 scaledPower = max((u16)0, scaledPower); -
trunk/package/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
r27025 r27071 1 1 --- a/drivers/net/wireless/ath/ath9k/main.c 2 2 +++ b/drivers/net/wireless/ath/ath9k/main.c 3 @@ -148 2,15 +1482,6 @@ static int ath9k_add_interface(struct ie3 @@ -1480,15 +1480,6 @@ static int ath9k_add_interface(struct ie 4 4 } 5 5 } … … 17 17 "Attach a VIF of type: %d\n", vif->type); 18 18 19 @@ -151 6,15 +1507,6 @@ static int ath9k_change_interface(struct19 @@ -1514,15 +1505,6 @@ static int ath9k_change_interface(struct 20 20 mutex_lock(&sc->mutex); 21 21 ath9k_ps_wakeup(sc); -
trunk/package/mac80211/patches/500-ath9k_eeprom_debugfs.patch
r26912 r27071 1 1 --- a/drivers/net/wireless/ath/ath9k/debug.c 2 2 +++ b/drivers/net/wireless/ath/ath9k/debug.c 3 @@ -11 20,6 +1120,53 @@ static const struct file_operations fops3 @@ -1131,6 +1131,53 @@ static const struct file_operations fops 4 4 .llseek = default_llseek,/* read accesses f_pos */ 5 5 }; … … 55 55 { 56 56 struct ath_common *common = ath9k_hw_common(ah); 57 @@ -11 68,6 +1215,9 @@ int ath9k_init_debug(struct ath_hw *ah)57 @@ -1179,6 +1226,9 @@ int ath9k_init_debug(struct ath_hw *ah) 58 58 debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR, 59 59 sc->debug.debugfs_phy, &sc->sc_ah->gpio_val); -
trunk/package/mac80211/patches/511-ath9k_increase_bcbuf.patch
r26912 r27071 1 1 --- a/drivers/net/wireless/ath/ath9k/ath9k.h 2 2 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h 3 @@ -36 6,7 +366,7 @@ struct ath_vif {3 @@ -365,7 +365,7 @@ struct ath_vif { 4 4 * number of beacon intervals, the game's up. 5 5 */ -
trunk/package/mac80211/patches/530-ath9k_noise_dbm_fixup.patch
r27070 r27071 49 49 --- a/drivers/net/wireless/ath/ath9k/hw.h 50 50 +++ b/drivers/net/wireless/ath/ath9k/hw.h 51 @@ -68 8,6 +688,7 @@ struct ath_hw {51 @@ -687,6 +687,7 @@ struct ath_hw { 52 52 enum nl80211_iftype opmode; 53 53 enum ath9k_power_mode power_mode; … … 59 59 --- a/drivers/net/wireless/ath/ath9k/main.c 60 60 +++ b/drivers/net/wireless/ath/ath9k/main.c 61 @@ -16 5,7 +165,7 @@ static void ath_update_survey_nf(struct61 @@ -163,7 +163,7 @@ static void ath_update_survey_nf(struct 62 62 63 63 if (chan->noisefloor) { -
trunk/package/mac80211/patches/800-b43-gpio-mask-module-option.patch
r26912 r27071 1 1 --- a/drivers/net/wireless/b43/b43.h 2 2 +++ b/drivers/net/wireless/b43/b43.h 3 @@ -7 18,6 +718,7 @@ struct b43_wldev {3 @@ -720,6 +720,7 @@ struct b43_wldev { 4 4 bool qos_enabled; /* TRUE, if QoS is used. */ 5 5 bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */ … … 23 23 module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444); 24 24 MODULE_PARM_DESC(bad_frames_preempt, 25 @@ -25 43,10 +2548,10 @@ static int b43_gpio_init(struct b43_wlde25 @@ -2560,10 +2565,10 @@ static int b43_gpio_init(struct b43_wlde 26 26 & ~B43_MACCTL_GPOUTSMSK); 27 27 … … 33 33 - set = 0x0000000F; 34 34 + set = modparam_gpiomask; 35 if (dev-> dev->bus->chip_id == 0x4301) {35 if (dev->sdev->bus->chip_id == 0x4301) { 36 36 mask |= 0x0060; 37 37 set |= 0x0060; 38 @@ -50 78,10 +5083,10 @@ static void b43_print_driverinfo(void)38 @@ -5084,10 +5089,10 @@ static void b43_print_driverinfo(void) 39 39 feat_sdio = "S"; 40 40 #endif -
trunk/package/mac80211/patches/810-b43_no_pio.patch
r26912 r27071 12 12 --- a/drivers/net/wireless/b43/main.c 13 13 +++ b/drivers/net/wireless/b43/main.c 14 @@ -181 3,9 +1813,11 @@ static void b43_do_interrupt_thread(stru14 @@ -1819,9 +1819,11 @@ static void b43_do_interrupt_thread(stru 15 15 dma_reason[4], dma_reason[5]); 16 16 b43err(dev->wl, "This device does not support DMA "
Note: See TracChangeset
for help on using the changeset viewer.