Deleted Added
full compact
ieee80211_output.c (178354) ieee80211_output.c (179394)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_output.c 178354 2008-04-20 20:35:46Z sam $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_output.c 179394 2008-05-28 23:25:36Z sam $");
29
30#include "opt_inet.h"
31#include "opt_wlan.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/mbuf.h>
36#include <sys/kernel.h>

--- 675 unchanged lines hidden (view full) ---

712 needed_space += key->wk_cipher->ic_header;
713 /* XXX frags */
714 /*
715 * When crypto is being done in the host we must insure
716 * the data are writable for the cipher routines; clone
717 * a writable mbuf chain.
718 * XXX handle SWMIC specially
719 */
29
30#include "opt_inet.h"
31#include "opt_wlan.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/mbuf.h>
36#include <sys/kernel.h>

--- 675 unchanged lines hidden (view full) ---

712 needed_space += key->wk_cipher->ic_header;
713 /* XXX frags */
714 /*
715 * When crypto is being done in the host we must insure
716 * the data are writable for the cipher routines; clone
717 * a writable mbuf chain.
718 * XXX handle SWMIC specially
719 */
720 if (key->wk_flags & (IEEE80211_KEY_SWCRYPT|IEEE80211_KEY_SWMIC)) {
720 if (key->wk_flags & (IEEE80211_KEY_SWENCRYPT|IEEE80211_KEY_SWENMIC)) {
721 m = m_unshare(m, M_NOWAIT);
722 if (m == NULL) {
723 IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
724 "%s: cannot get writable mbuf\n", __func__);
725 vap->iv_stats.is_tx_nobuf++; /* XXX new stat */
726 return NULL;
727 }
728 }

--- 2115 unchanged lines hidden ---
721 m = m_unshare(m, M_NOWAIT);
722 if (m == NULL) {
723 IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
724 "%s: cannot get writable mbuf\n", __func__);
725 vap->iv_stats.is_tx_nobuf++; /* XXX new stat */
726 return NULL;
727 }
728 }

--- 2115 unchanged lines hidden ---