FreeBSD Bugzilla – Attachment 156166 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]
Add a few local variables to improve readability
patch-wpi75.diff (text/plain), 3.31 KB, created by
Andriy Voskoboinyk
on 2015-04-30 20:42:09 UTC
(
hide
)
Description:
Add a few local variables to improve readability
Filename:
MIME Type:
Creator:
Andriy Voskoboinyk
Created:
2015-04-30 20:42:09 UTC
Size:
3.31 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) >@@ -3710,6 +3710,7 @@ > struct ifnet *ifp = sc->sc_ifp; > struct ieee80211com *ic = ifp->if_l2com; > struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); >+ struct ieee80211_channel *c = ic->ic_curchan; > uint32_t flags; > int error; > >@@ -3734,9 +3735,9 @@ > IEEE80211_ADDR_COPY(sc->rxon.myaddr, vap->iv_myaddr); > > /* Set default channel. */ >- sc->rxon.chan = ieee80211_chan2ieee(ic, ic->ic_curchan); >+ sc->rxon.chan = ieee80211_chan2ieee(ic, c); > sc->rxon.flags = htole32(WPI_RXON_TSF | WPI_RXON_CTS_TO_SELF); >- if (IEEE80211_IS_CHAN_2GHZ(ic->ic_curchan)) >+ if (IEEE80211_IS_CHAN_2GHZ(c)) > sc->rxon.flags |= htole32(WPI_RXON_AUTO | WPI_RXON_24GHZ); > > sc->rxon.filter = WPI_FILTER_MULTICAST; >@@ -4044,6 +4045,7 @@ > { > struct ieee80211com *ic = vap->iv_ic; > struct ieee80211_node *ni = vap->iv_bss; >+ struct ieee80211_channel *c = ni->ni_chan; > int error; > > WPI_RXON_LOCK(sc); >@@ -4054,18 +4056,18 @@ > sc->rxon.associd = 0; > sc->rxon.filter &= ~htole32(WPI_FILTER_BSS); > IEEE80211_ADDR_COPY(sc->rxon.bssid, ni->ni_bssid); >- sc->rxon.chan = ieee80211_chan2ieee(ic, ni->ni_chan); >+ sc->rxon.chan = ieee80211_chan2ieee(ic, c); > sc->rxon.flags = htole32(WPI_RXON_TSF | WPI_RXON_CTS_TO_SELF); >- if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) >+ if (IEEE80211_IS_CHAN_2GHZ(c)) > sc->rxon.flags |= htole32(WPI_RXON_AUTO | WPI_RXON_24GHZ); > if (ic->ic_flags & IEEE80211_F_SHSLOT) > sc->rxon.flags |= htole32(WPI_RXON_SHSLOT); > if (ic->ic_flags & IEEE80211_F_SHPREAMBLE) > sc->rxon.flags |= htole32(WPI_RXON_SHPREAMBLE); >- if (IEEE80211_IS_CHAN_A(ni->ni_chan)) { >+ if (IEEE80211_IS_CHAN_A(c)) { > sc->rxon.cck_mask = 0; > sc->rxon.ofdm_mask = 0x15; >- } else if (IEEE80211_IS_CHAN_B(ni->ni_chan)) { >+ } else if (IEEE80211_IS_CHAN_B(c)) { > sc->rxon.cck_mask = 0x03; > sc->rxon.ofdm_mask = 0; > } else { >@@ -4243,6 +4245,7 @@ > { > struct ieee80211com *ic = vap->iv_ic; > struct ieee80211_node *ni = vap->iv_bss; >+ struct ieee80211_channel *c = ni->ni_chan; > int error; > > DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); >@@ -4254,7 +4257,7 @@ > } > > /* XXX kernel panic workaround */ >- if (ni->ni_chan == IEEE80211_CHAN_ANYC) { >+ if (c == IEEE80211_CHAN_ANYC) { > device_printf(sc->sc_dev, "%s: incomplete configuration\n", > __func__); > return EINVAL; >@@ -4270,18 +4273,18 @@ > WPI_RXON_LOCK(sc); > IEEE80211_ADDR_COPY(sc->rxon.bssid, ni->ni_bssid); > sc->rxon.associd = htole16(IEEE80211_NODE_AID(ni)); >- sc->rxon.chan = ieee80211_chan2ieee(ic, ni->ni_chan); >+ sc->rxon.chan = ieee80211_chan2ieee(ic, c); > sc->rxon.flags = htole32(WPI_RXON_TSF | WPI_RXON_CTS_TO_SELF); >- if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) >+ if (IEEE80211_IS_CHAN_2GHZ(c)) > sc->rxon.flags |= htole32(WPI_RXON_AUTO | WPI_RXON_24GHZ); > if (ic->ic_flags & IEEE80211_F_SHSLOT) > sc->rxon.flags |= htole32(WPI_RXON_SHSLOT); > if (ic->ic_flags & IEEE80211_F_SHPREAMBLE) > sc->rxon.flags |= htole32(WPI_RXON_SHPREAMBLE); >- if (IEEE80211_IS_CHAN_A(ni->ni_chan)) { >+ if (IEEE80211_IS_CHAN_A(c)) { > sc->rxon.cck_mask = 0; > sc->rxon.ofdm_mask = 0x15; >- } else if (IEEE80211_IS_CHAN_B(ni->ni_chan)) { >+ } else if (IEEE80211_IS_CHAN_B(c)) { > sc->rxon.cck_mask = 0x03; > sc->rxon.ofdm_mask = 0; > } else {
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
Working