FreeBSD Bugzilla – Attachment 156185 Details for
Bug 197143
[wpi] [patch]: sync with iwn / OpenBSD wpi
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Try to fix passive scanning hang on beacon miss
patch-wpi94.diff (text/plain), 2.49 KB, created by
Andriy Voskoboinyk
on 2015-04-30 21:37:45 UTC
(
hide
)
Description:
Try to fix passive scanning hang on beacon miss
Filename:
MIME Type:
Creator:
Andriy Voskoboinyk
Created:
2015-04-30 21:37:45 UTC
Size:
2.49 KB
patch
obsolete
>Index: sys/dev/wpi/if_wpi.c >=================================================================== >--- sys/dev/wpi/if_wpi.c (revision 281839) >+++ sys/dev/wpi/if_wpi.c (working copy) >@@ -2135,11 +2135,18 @@ > __func__, misses, le32toh(miss->total), received, > expected); > >- if (vap->iv_state == IEEE80211_S_RUN && >- (ic->ic_flags & IEEE80211_F_SCAN) == 0 && >- (misses >= threshold || >- (received == 0 && expected >= threshold))) >- ieee80211_beacon_miss(ic); >+ if (misses >= threshold || >+ (received == 0 && expected >= threshold)) { >+ WPI_RXON_LOCK(sc); >+ if (callout_pending(&sc->scan_timeout)) { >+ wpi_cmd(sc, WPI_CMD_SCAN_ABORT, NULL, >+ 0, 1); >+ } >+ WPI_RXON_UNLOCK(sc); >+ if (vap->iv_state == IEEE80211_S_RUN && >+ (ic->ic_flags & IEEE80211_F_SCAN) == 0) >+ ieee80211_beacon_miss(ic); >+ } > > break; > } >@@ -2202,17 +2209,21 @@ > { > bus_dmamap_sync(sc->rxq.data_dmat, data->map, > BUS_DMASYNC_POSTREAD); >-#ifdef WPI_DEBUG >+ > struct wpi_stop_scan *scan = > (struct wpi_stop_scan *)(desc + 1); >+ > DPRINTF(sc, WPI_DEBUG_SCAN, > "scan finished nchan=%d status=%d chan=%d\n", > scan->nchan, scan->status, scan->chan); >-#endif >+ > WPI_RXON_LOCK(sc); > callout_stop(&sc->scan_timeout); > WPI_RXON_UNLOCK(sc); >- ieee80211_scan_next(vap); >+ if (scan->status == WPI_SCAN_ABORTED) >+ ieee80211_cancel_scan(vap); >+ else >+ ieee80211_scan_next(vap); > break; > } > } >Index: sys/dev/wpi/if_wpi_debug.h >=================================================================== >--- sys/dev/wpi/if_wpi_debug.h (revision 281839) >+++ sys/dev/wpi/if_wpi_debug.h (working copy) >@@ -86,6 +86,7 @@ > WPI_DESC(WPI_CMD_SET_LED); > WPI_DESC(WPI_CMD_SET_POWER_MODE); > WPI_DESC(WPI_CMD_SCAN); >+ WPI_DESC(WPI_CMD_SCAN_ABORT); > WPI_DESC(WPI_CMD_SET_BEACON); > WPI_DESC(WPI_CMD_TXPOWER); > WPI_DESC(WPI_CMD_BT_COEX); >Index: sys/dev/wpi/if_wpireg.h >=================================================================== >--- sys/dev/wpi/if_wpireg.h (revision 281839) >+++ sys/dev/wpi/if_wpireg.h (working copy) >@@ -352,6 +352,7 @@ > #define WPI_CMD_SET_LED 72 > #define WPI_CMD_SET_POWER_MODE 119 > #define WPI_CMD_SCAN 128 >+#define WPI_CMD_SCAN_ABORT 129 > #define WPI_CMD_SET_BEACON 145 > #define WPI_CMD_TXPOWER 151 > #define WPI_CMD_BT_COEX 155 >@@ -725,6 +726,9 @@ > struct wpi_stop_scan { > uint8_t nchan; > uint8_t status; >+#define WPI_SCAN_COMPLETED 1 >+#define WPI_SCAN_ABORTED 2 >+ > uint8_t reserved; > uint8_t chan; > uint64_t tsf;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197143
:
152282
|
152662
|
152977
|
153911
|
153977
|
153983
|
153985
|
153999
|
154000
|
154002
|
154006
|
154007
|
154009
|
154010
|
154011
|
154013
|
154015
|
154016
|
154017
|
154019
|
154020
|
154021
|
154022
|
154024
|
154026
|
154030
|
154032
|
154033
|
154328
|
154329
|
154330
|
154332
|
154334
|
154335
|
154336
|
154337
|
154338
|
154340
|
154341
|
154343
|
154346
|
154347
|
154348
|
154349
|
154350
|
154351
|
154352
|
154353
|
154354
|
154355
|
154356
|
154357
|
154358
|
154359
|
154360
|
154361
|
154362
|
154363
|
154364
|
154365
|
154366
|
154368
|
154369
|
154370
|
154371
|
154372
|
154373
|
154374
|
154375
|
154378
|
154379
|
154380
|
154381
|
154382
|
154383
|
154384
|
155332
|
155333
|
156164
|
156165
|
156166
|
156167
|
156168
|
156169
|
156170
|
156171
|
156172
|
156173
|
156174
|
156175
|
156176
|
156177
|
156178
|
156179
|
156180
|
156181
|
156182
|
156183
|
156184
| 156185 |
156186
|
156187
|
156188
|
156189
|
156190
|
156191
|
156192
|
156193
|
156194
|
156195