summaryrefslogtreecommitdiff
path: root/misc/dahdi-kmod/files/patch-mbuf
blob: a991b7b9577ab748af252c5c9323df630abeac0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- freebsd/drivers/dahdi/dahdi_dynamic_eth.c.orig	2014-02-09 12:58:15.000000000 +0700
+++ freebsd/drivers/dahdi/dahdi_dynamic_eth.c	2014-02-09 12:58:57.000000000 +0700
@@ -27,6 +27,7 @@
 #include <sys/param.h>
 #include <sys/conf.h>
 #include <sys/module.h>
+#include <sys/mbuf.h>
 
 #include "ng_dahdi_netdev.h"
 #else /* !__FreeBSD__ */
@@ -204,10 +205,10 @@
 		dev = z->dev;
 		spin_unlock_irqrestore(&zlock, flags);
 #if defined(__FreeBSD__)
-		MGETHDR(m, M_DONTWAIT, MT_DATA);
+		MGETHDR(m, M_NOWAIT, MT_DATA);
 		if (m != NULL) {
 			if (sizeof(eh) + sizeof(zh) + msglen >= MINCLSIZE) {
-				MCLGET(m, M_DONTWAIT);
+				MCLGET(m, M_NOWAIT);
 			}
 
 			/* copy ethernet header */
--- freebsd/drivers/dahdi/dahdi_dynamic_ethmf.c.orig	2014-02-09 12:59:17.000000000 +0700
+++ freebsd/drivers/dahdi/dahdi_dynamic_ethmf.c	2014-02-09 12:59:47.000000000 +0700
@@ -28,6 +28,7 @@
 #include <sys/param.h>
 #include <sys/conf.h>
 #include <sys/module.h>
+#include <sys/mbuf.h>
 
 #include "ng_dahdi_netdev.h"
 #else /* !__FreeBSD__ */
@@ -522,13 +523,13 @@
 		}
 
 #if defined(__FreeBSD__)
-		MGETHDR(m, M_DONTWAIT, MT_DATA);
+		MGETHDR(m, M_NOWAIT, MT_DATA);
 		if (m == NULL) {
 			rcu_read_unlock();
 			ethmf_errors_inc();
 			return 0;
 		}
-		MCLGET(m, M_DONTWAIT);
+		MCLGET(m, M_NOWAIT);
 
 		/* copy ethernet header and reserve space for ztdeth header */
 		bcopy(dev->dev_addr, &eh.ether_shost, sizeof(eh.ether_shost));