As reported by jsg@ the wifi stack should use if_start() just like the
rest of the kernel. One of the patterns can even be converted to
if_enqueue().
Tested with:
iwn0 at pci2 dev 0 function 0 "Intel Centrino Advanced-N 6205" rev 0x34
ok?
Index: net80211/ieee80211_input.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_input.c,v
retrieving revision 1.169
diff -u -p -r1.169 ieee80211_input.c
--- net80211/ieee80211_input.c 22 Mar 2016 11:37:35 -0000 1.169
+++ net80211/ieee80211_input.c 12 Apr 2016 06:21:50 -0000
@@ -360,7 +360,7 @@ ieee80211_input(struct ifnet *ifp, struc
/* dequeue buffered unicast frames */
while ((m = mq_dequeue(&ni->ni_savedq)) != NULL) {
mq_enqueue(&ic->ic_pwrsaveq, m);
- (*ifp->if_start)(ifp);
+ if_start(ifp);
}
}
}
@@ -2870,7 +2870,7 @@ ieee80211_recv_pspoll(struct ieee80211co
wh->i_fc[1] |= IEEE80211_FC1_MORE_DATA;
}
mq_enqueue(&ic->ic_pwrsaveq, m);
- (*ifp->if_start)(ifp);
+ if_start(ifp);
}
#endif /* IEEE80211_STA_ONLY */
Index: net80211/ieee80211_node.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_node.c,v
retrieving revision 1.100
diff -u -p -r1.100 ieee80211_node.c
--- net80211/ieee80211_node.c 3 Mar 2016 07:20:45 -0000 1.100
+++ net80211/ieee80211_node.c 12 Apr 2016 06:22:07 -0000
@@ -1847,7 +1847,7 @@ ieee80211_notify_dtim(struct ieee80211co
wh->i_fc[1] |= IEEE80211_FC1_MORE_DATA;
}
mq_enqueue(&ic->ic_pwrsaveq, m);
- (*ifp->if_start)(ifp);
+ if_start(ifp);
}
/* XXX assumes everything has been sent */
ic->ic_tim_mcast_pending = 0;
Index: net80211/ieee80211_output.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_output.c,v
retrieving revision 1.110
diff -u -p -r1.110 ieee80211_output.c
--- net80211/ieee80211_output.c 5 Feb 2016 19:11:31 -0000 1.110
+++ net80211/ieee80211_output.c 12 Apr 2016 06:22:14 -0000
@@ -241,7 +241,7 @@ ieee80211_mgmt_output(struct ifnet *ifp,
#endif
mq_enqueue(&ic->ic_mgtq, m);
ifp->if_timer = 1;
- (*ifp->if_start)(ifp);
+ if_start(ifp);
return 0;
}
Index: net80211/ieee80211_pae_output.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_pae_output.c,v
retrieving revision 1.26
diff -u -p -r1.26 ieee80211_pae_output.c
--- net80211/ieee80211_pae_output.c 25 Nov 2015 03:10:00 -0000 1.26
+++ net80211/ieee80211_pae_output.c 12 Apr 2016 06:25:59 -0000
@@ -66,7 +66,7 @@ ieee80211_send_eapol_key(struct ieee8021
struct ether_header *eh;
struct ieee80211_eapol_key *key;
u_int16_t info;
- int s, len, error;
+ int len;
M_PREPEND(m, sizeof(struct ether_header), M_DONTWAIT);
if (m == NULL)
@@ -118,22 +118,12 @@ ieee80211_send_eapol_key(struct ieee8021
if (info & EAPOL_KEY_KEYMIC)
ieee80211_eapol_key_mic(key, ptk->kck);
- len = m->m_pkthdr.len;
- s = splnet();
#ifndef IEEE80211_STA_ONLY
/* start a 100ms timeout if an answer is expected from supplicant */
if (info & EAPOL_KEY_KEYACK)
timeout_add_msec(&ni->ni_eapol_to, 100);
#endif
- IFQ_ENQUEUE(&ifp->if_snd, m, error);
- if (error == 0) {
- ifp->if_obytes += len;
- if (!ifq_is_oactive(&ifp->if_snd))
- (*ifp->if_start)(ifp);
- }
- splx(s);
-
- return error;
+ return if_enqueue(ifp, m);
}
#ifndef IEEE80211_STA_ONLY
Index: net80211/ieee80211_proto.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_proto.c,v
retrieving revision 1.64
diff -u -p -r1.64 ieee80211_proto.c
--- net80211/ieee80211_proto.c 8 Feb 2016 01:00:47 -0000 1.64
+++ net80211/ieee80211_proto.c 12 Apr 2016 06:22:35 -0000
@@ -1043,7 +1043,7 @@ justcleanup:
ieee80211_set_link_state(ic, LINK_STATE_UP);
}
ic->ic_mgt_timer = 0;
- (*ifp->if_start)(ifp);
+ if_start(ifp);
break;
}
break;