if_sbni.c (271849) | if_sbni.c (276750) |
---|---|
1/*- 2 * Copyright (c) 1997-2001 Granch, Ltd. All rights reserved. 3 * Author: Denis I.Timofeev <timofeev@granch.ru> 4 * 5 * Redistributon and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997-2001 Granch, Ltd. All rights reserved. 3 * Author: Denis I.Timofeev <timofeev@granch.ru> 4 * 5 * Redistributon and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/sbni/if_sbni.c 271849 2014-09-19 03:51:26Z glebius $"); | 30__FBSDID("$FreeBSD: head/sys/dev/sbni/if_sbni.c 276750 2015-01-06 12:59:37Z rwatson $"); |
31 32/* 33 * Device driver for Granch SBNI12 leased line adapters 34 * 35 * Revision 2.0.0 1997/08/06 36 * Initial revision by Alexey Zverev 37 * 38 * Revision 2.0.1 1997/08/11 --- 834 unchanged lines hidden (view full) --- 873 /* 874 * We always put the received packet in a single buffer - 875 * either with just an mbuf header or in a cluster attached 876 * to the header. The +2 is to compensate for the alignment 877 * fixup below. 878 */ 879 if (ETHER_MAX_LEN + 2 > MHLEN) { 880 /* Attach an mbuf cluster */ | 31 32/* 33 * Device driver for Granch SBNI12 leased line adapters 34 * 35 * Revision 2.0.0 1997/08/06 36 * Initial revision by Alexey Zverev 37 * 38 * Revision 2.0.1 1997/08/11 --- 834 unchanged lines hidden (view full) --- 873 /* 874 * We always put the received packet in a single buffer - 875 * either with just an mbuf header or in a cluster attached 876 * to the header. The +2 is to compensate for the alignment 877 * fixup below. 878 */ 879 if (ETHER_MAX_LEN + 2 > MHLEN) { 880 /* Attach an mbuf cluster */ |
881 MCLGET(m, M_NOWAIT); 882 if ((m->m_flags & M_EXT) == 0) { | 881 if (!(MCLGET(m, M_NOWAIT))) { |
883 m_freem(m); 884 return (0); 885 } 886 } 887 m->m_pkthdr.len = m->m_len = ETHER_MAX_LEN + 2; 888 889 /* 890 * The +2 is to longword align the start of the real packet. --- 388 unchanged lines hidden --- | 882 m_freem(m); 883 return (0); 884 } 885 } 886 m->m_pkthdr.len = m->m_len = ETHER_MAX_LEN + 2; 887 888 /* 889 * The +2 is to longword align the start of the real packet. --- 388 unchanged lines hidden --- |