Try to use spls more correctly
This commit is contained in:
parent
3222c45089
commit
d87fc9ac63
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96172
@ -294,7 +294,7 @@ wihap_shutdown(struct wi_softc *sc)
|
|||||||
* a single broadcast. Maybe try that someday.
|
* a single broadcast. Maybe try that someday.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
s = splimp();
|
s = splclock();
|
||||||
sta = LIST_FIRST(&whi->sta_list);
|
sta = LIST_FIRST(&whi->sta_list);
|
||||||
while (sta) {
|
while (sta) {
|
||||||
untimeout(wihap_sta_timeout, sta, sta->tmo);
|
untimeout(wihap_sta_timeout, sta, sta->tmo);
|
||||||
@ -938,7 +938,7 @@ wihap_mgmt_input(struct wi_softc *sc, struct wi_frame *rxfrm, struct mbuf *m)
|
|||||||
htole16(WI_FTYPE_MGMT)) {
|
htole16(WI_FTYPE_MGMT)) {
|
||||||
|
|
||||||
/* any of the following will mess w/ the station list */
|
/* any of the following will mess w/ the station list */
|
||||||
s = splsoftclock();
|
s = splclock(); /* XXX */
|
||||||
switch (le16toh(rxfrm->wi_frame_ctl) & WI_FCTL_STYPE) {
|
switch (le16toh(rxfrm->wi_frame_ctl) & WI_FCTL_STYPE) {
|
||||||
case WI_STYPE_MGMT_ASREQ:
|
case WI_STYPE_MGMT_ASREQ:
|
||||||
wihap_assoc_req(sc, rxfrm, pkt, len);
|
wihap_assoc_req(sc, rxfrm, pkt, len);
|
||||||
@ -983,17 +983,20 @@ static int
|
|||||||
wihap_sta_is_assoc(struct wihap_info *whi, u_int8_t addr[])
|
wihap_sta_is_assoc(struct wihap_info *whi, u_int8_t addr[])
|
||||||
{
|
{
|
||||||
struct wihap_sta_info *sta;
|
struct wihap_sta_info *sta;
|
||||||
|
int retval, s;
|
||||||
|
|
||||||
|
s = splclock();
|
||||||
|
retval = 0;
|
||||||
sta = wihap_sta_find(whi, addr);
|
sta = wihap_sta_find(whi, addr);
|
||||||
if (sta != NULL && (sta->flags & WI_SIFLAGS_ASSOC)) {
|
if (sta != NULL && (sta->flags & WI_SIFLAGS_ASSOC)) {
|
||||||
/* Keep it active. */
|
/* Keep it active. */
|
||||||
untimeout(wihap_sta_timeout, sta, sta->tmo);
|
untimeout(wihap_sta_timeout, sta, sta->tmo);
|
||||||
sta->tmo = timeout(wihap_sta_timeout, sta,
|
sta->tmo = timeout(wihap_sta_timeout, sta,
|
||||||
hz * whi->inactivity_time);
|
hz * whi->inactivity_time);
|
||||||
return(1);
|
retval = 1;
|
||||||
}
|
}
|
||||||
else
|
splx(s);
|
||||||
return(0);
|
return (retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wihap_check_tx()
|
/* wihap_check_tx()
|
||||||
@ -1008,11 +1011,11 @@ wihap_check_tx(struct wihap_info *whi, u_int8_t addr[], u_int8_t *txrate)
|
|||||||
static u_int8_t txratetable[] = { 10, 20, 55, 110 };
|
static u_int8_t txratetable[] = { 10, 20, 55, 110 };
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
s = splclock();
|
|
||||||
if (addr[0] & 0x01) {
|
if (addr[0] & 0x01) {
|
||||||
*txrate = 0; /* XXX: multicast rate? */
|
*txrate = 0; /* XXX: multicast rate? */
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
s = splclock();
|
||||||
sta = wihap_sta_find(whi, addr);
|
sta = wihap_sta_find(whi, addr);
|
||||||
if (sta != NULL && (sta->flags & WI_SIFLAGS_ASSOC)) {
|
if (sta != NULL && (sta->flags & WI_SIFLAGS_ASSOC)) {
|
||||||
/* Keep it active. */
|
/* Keep it active. */
|
||||||
@ -1064,7 +1067,7 @@ wihap_data_input(struct wi_softc *sc, struct wi_frame *rxfrm, struct mbuf *m)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
s = splsoftclock();
|
s = splclock();
|
||||||
|
|
||||||
/* Find source station. */
|
/* Find source station. */
|
||||||
sta = wihap_sta_find(whi, rxfrm->wi_addr2);
|
sta = wihap_sta_find(whi, rxfrm->wi_addr2);
|
||||||
|
Loading…
Reference in New Issue
Block a user