FreeBSD Bugzilla – Attachment 154015 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]
(Non-functional) Fix indentation.
patch-wpi11.diff (text/plain), 7.75 KB, created by
Andriy Voskoboinyk
on 2015-03-08 14:39:01 UTC
(
hide
)
Description:
(Non-functional) Fix indentation.
Filename:
MIME Type:
Creator:
Andriy Voskoboinyk
Created:
2015-03-08 14:39:01 UTC
Size:
7.75 KB
patch
obsolete
>Index: sys/dev/wpi/if_wpi.c >=================================================================== >--- sys/dev/wpi/if_wpi.c (revision 279775) >+++ sys/dev/wpi/if_wpi.c (working copy) >@@ -313,7 +313,7 @@ > > sc->sc_dev = dev; > >-#ifdef WPI_DEBUG >+#ifdef WPI_DEBUG > error = resource_int_value(device_get_name(sc->sc_dev), > device_get_unit(sc->sc_dev), "debug", &(sc->sc_debug)); > if (error != 0) >@@ -455,20 +455,21 @@ > device_printf(dev, "could not read EEPROM, error %d\n", > error); > goto fail; >- } >+ } > >-#ifdef WPI_DEBUG >+#ifdef WPI_DEBUG > if (bootverbose) { >- device_printf(sc->sc_dev, "Regulatory Domain: %.4s\n", sc->domain); >- device_printf(sc->sc_dev, "Hardware Type: %c\n", >- sc->type > 1 ? 'B': '?'); >- device_printf(sc->sc_dev, "Hardware Revision: %c\n", >- ((le16toh(sc->rev) & 0xf0) == 0xd0) ? 'D': '?'); >- device_printf(sc->sc_dev, "SKU %s support 802.11a\n", >- supportsa ? "does" : "does not"); >+ device_printf(sc->sc_dev, "Regulatory Domain: %.4s\n", >+ sc->domain); >+ device_printf(sc->sc_dev, "Hardware Type: %c\n", >+ sc->type > 1 ? 'B': '?'); >+ device_printf(sc->sc_dev, "Hardware Revision: %c\n", >+ ((le16toh(sc->rev) & 0xf0) == 0xd0) ? 'D': '?'); >+ device_printf(sc->sc_dev, "SKU %s support 802.11a\n", >+ supportsa ? "does" : "does not"); > >- /* XXX hw_config uses the PCIDEV for the Hardware rev. Must check >- what sc->rev really represents - benjsc 20070615 */ >+ /* XXX hw_config uses the PCIDEV for the Hardware rev. Must >+ check what sc->rev really represents - benjsc 20070615 */ > } > #endif > >@@ -558,7 +559,7 @@ > static void > wpi_sysctlattach(struct wpi_softc *sc) > { >-#ifdef WPI_DEBUG >+#ifdef WPI_DEBUG > struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); > struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); > >@@ -725,7 +726,7 @@ > /* Spin until we actually get the lock. */ > for (ntries = 0; ntries < 1000; ntries++) { > if ((WPI_READ(sc, WPI_GP_CNTRL) & >- (WPI_GP_CNTRL_MAC_ACCESS_ENA | WPI_GP_CNTRL_SLEEP)) == >+ (WPI_GP_CNTRL_MAC_ACCESS_ENA | WPI_GP_CNTRL_SLEEP)) == > WPI_GP_CNTRL_MAC_ACCESS_ENA) > return 0; > DELAY(10); >@@ -957,16 +958,16 @@ > } > > /* Create RX buffer DMA tag. */ >- error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, >+ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, > BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, > MJUMPAGESIZE, 1, MJUMPAGESIZE, BUS_DMA_NOWAIT, NULL, NULL, > &ring->data_dmat); >- if (error != 0) { >- device_printf(sc->sc_dev, >+ if (error != 0) { >+ device_printf(sc->sc_dev, > "%s: could not create RX buf DMA tag, error %d\n", > __func__, error); >- goto fail; >- } >+ goto fail; >+ } > > /* > * Allocate and map RX buffers. >@@ -2028,8 +2029,8 @@ > } > case WPI_STATE_CHANGED: > { >- bus_dmamap_sync(sc->rxq.data_dmat, data->map, >- BUS_DMASYNC_POSTREAD); >+ bus_dmamap_sync(sc->rxq.data_dmat, data->map, >+ BUS_DMASYNC_POSTREAD); > > uint32_t *status = (uint32_t *)(desc + 1); > >@@ -2083,7 +2084,7 @@ > * Process an INT_WAKEUP interrupt raised when the microcontroller wakes up > * from power-down sleep mode. > */ >-static void >+static void > wpi_wakeup_intr(struct wpi_softc *sc) > { > int qid; >@@ -2127,12 +2128,12 @@ > WPI_FW_DATA_BASE + WPI_FW_DATA_MAXSZ) { > printf("%s: bad firmware error log address 0x%08x\n", __func__, > sc->errptr); >- return; >- } >+ return; >+ } > if (wpi_nic_lock(sc) != 0) { > printf("%s: could not read firmware error log\n", __func__); >- return; >- } >+ return; >+ } > /* Read number of entries in the log. */ > count = wpi_mem_read(sc, sc->errptr); > if (count == 0 || count * sizeof (dump) > WPI_FW_DATA_MAXSZ) { >@@ -2381,7 +2382,7 @@ > } else { > qos = 0; > tid = 0; >- } >+ } > ac = M_WME_GETAC(m); > > chan = (ni->ni_chan != IEEE80211_CHAN_ANYC) ? >@@ -3233,11 +3234,11 @@ > struct ieee80211_channel *c, int ridx) > { > /* Fixed-point arithmetic division using a n-bit fractional part. */ >-#define fdivround(a, b, n) \ >+#define fdivround(a, b, n) \ > ((((1 << n) * (a)) / (b) + (1 << n) / 2) / (1 << n)) > > /* Linear interpolation. */ >-#define interpolate(x, x1, y1, x2, y2, n) \ >+#define interpolate(x, x1, y1, x2, y2, n) \ > ((y1) + fdivround(((x) - (x1)) * ((y2) - (y1)), (x2) - (x1), n)) > > struct ifnet *ifp = sc->sc_ifp; >@@ -3354,18 +3355,18 @@ > return wpi_cmd(sc, WPI_CMD_SET_POWER_MODE, &cmd, sizeof cmd, async); > } > >-static int >+static int > wpi_send_btcoex(struct wpi_softc *sc) > { > struct wpi_bluetooth cmd; > >- memset(&cmd, 0, sizeof cmd); >- cmd.flags = WPI_BT_COEX_MODE_4WIRE; >- cmd.lead_time = WPI_BT_LEAD_TIME_DEF; >- cmd.max_kill = WPI_BT_MAX_KILL_DEF; >+ memset(&cmd, 0, sizeof cmd); >+ cmd.flags = WPI_BT_COEX_MODE_4WIRE; >+ cmd.lead_time = WPI_BT_LEAD_TIME_DEF; >+ cmd.max_kill = WPI_BT_MAX_KILL_DEF; > DPRINTF(sc, WPI_DEBUG_RESET, "%s: configuring bluetooth coexistence\n", > __func__); >- return wpi_cmd(sc, WPI_CMD_BT_COEX, &cmd, sizeof(cmd), 0); >+ return wpi_cmd(sc, WPI_CMD_BT_COEX, &cmd, sizeof(cmd), 0); > } > > static int >@@ -3719,7 +3720,7 @@ > chan->rf_gain = 0x28; > > DPRINTF(sc, WPI_DEBUG_SCAN, "Scanning %u Passive: %d\n", >- chan->chan, IEEE80211_IS_CHAN_PASSIVE(c)); >+ chan->chan, IEEE80211_IS_CHAN_PASSIVE(c)); > > hdr->nchan++; > chan++; >@@ -4112,11 +4113,11 @@ > if (ntries == 1000) { > device_printf(sc->sc_dev, > "timeout waiting for thermal sensor calibration\n"); >- return ETIMEDOUT; >- } >+ return ETIMEDOUT; >+ } > >- DPRINTF(sc, WPI_DEBUG_TEMP, "temperature %d\n", sc->temp); >- return 0; >+ DPRINTF(sc, WPI_DEBUG_TEMP, "temperature %d\n", sc->temp); >+ return 0; > } > > /* >Index: sys/dev/wpi/if_wpireg.h >=================================================================== >--- sys/dev/wpi/if_wpireg.h (revision 279775) >+++ sys/dev/wpi/if_wpireg.h (working copy) >@@ -28,7 +28,7 @@ > #define WPI_NDMACHNLS 6 > > /* Maximum scatter/gather. */ >-#define WPI_MAX_SCATTER 4 >+#define WPI_MAX_SCATTER 4 > > /* > * Rings must be aligned on a 16K boundary. >@@ -466,7 +466,7 @@ > uint16_t lnext; > uint32_t flags; > #define WPI_TX_NEED_RTS (1 << 1) >-#define WPI_TX_NEED_CTS (1 << 2) >+#define WPI_TX_NEED_CTS (1 << 2) > #define WPI_TX_NEED_ACK (1 << 3) > #define WPI_TX_FULL_TXOP (1 << 7) > #define WPI_TX_BT_DISABLE (1 << 12) /* bluetooth coexistence */ >@@ -516,10 +516,10 @@ > > /* Structure for notification WPI_BEACON_MISSED. */ > struct wpi_beacon_missed { >- uint32_t consecutive; >- uint32_t total; >- uint32_t expected; >- uint32_t received; >+ uint32_t consecutive; >+ uint32_t total; >+ uint32_t expected; >+ uint32_t received; > } __packed; > > >Index: sys/dev/wpi/if_wpivar.h >=================================================================== >--- sys/dev/wpi/if_wpivar.h (revision 279775) >+++ sys/dev/wpi/if_wpivar.h (working copy) >@@ -52,7 +52,7 @@ > > struct wpi_dma_info { > bus_dma_tag_t tag; >- bus_dmamap_t map; >+ bus_dmamap_t map; > bus_addr_t paddr; > caddr_t vaddr; > bus_size_t size; >@@ -183,7 +183,7 @@ > bus_space_handle_t sc_sh; > void *sc_ih; > bus_size_t sc_sz; >- int sc_cap_off; /* PCIe Capabilities. */ >+ int sc_cap_off; /* PCIe Capabilities. */ > > struct wpi_rxon rxon; > int temp; >@@ -223,8 +223,8 @@ > > #define WPI_LOCK_INIT(_sc) \ > mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ >- MTX_NETWORK_LOCK, MTX_DEF) >+ MTX_NETWORK_LOCK, MTX_DEF) > #define WPI_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) > #define WPI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) >-#define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) >+#define WPI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) > #define WPI_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx)
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