netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Kimdon <david.kimdon@devicescape.com>
To: netdev@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>,
	Jiri Benc <jbenc@suse.cz>,
	David Kimdon <david.kimdon@devicescape.com>
Subject: [patch 5/5] d80211: add ioctl to stop data frame tx
Date: Tue, 22 Aug 2006 10:34:19 -0700	[thread overview]
Message-ID: <20060822173419.GF12500@devicescape.com> (raw)
In-Reply-To: 20060822173241.313859000@devicescape.com

[-- Attachment #1: stop_data_frame_tx.patch --]
[-- Type: text/plain, Size: 2889 bytes --]

This ioctl is used when radar is delected on a channel.  Data frames must stop
but management frames must be allowed to continue for some time to communicate
the channel switch to stations.

Signed-off-by: David Kimdon <david.kimdon@devicescape.com>

Index: linux-2.6.16/net/d80211/hostapd_ioctl.h
===================================================================
--- linux-2.6.16.orig/net/d80211/hostapd_ioctl.h
+++ linux-2.6.16/net/d80211/hostapd_ioctl.h
@@ -93,6 +93,7 @@ enum {
 	PRISM2_PARAM_SPECTRUM_MGMT = 1044,
 	PRISM2_PARAM_USER_SPACE_MLME = 1045,
 	PRISM2_PARAM_MGMT_IF = 1046,
+	PRISM2_PARAM_STOP_DATA_FRAME_TX = 1047,
 	/* NOTE: Please try to coordinate with other active development
 	 * branches before allocating new param numbers so that each new param
 	 * will be unique within all branches and the allocated number will not
Index: linux-2.6.16/net/d80211/ieee80211.c
===================================================================
--- linux-2.6.16.orig/net/d80211/ieee80211.c
+++ linux-2.6.16/net/d80211/ieee80211.c
@@ -1240,6 +1240,15 @@ static int ieee80211_tx(struct net_devic
 		return 0;
 	}
 
+	if (unlikely(local->stop_data_frame_tx)) {
+		struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
+		u16 fc = le16_to_cpu(hdr->frame_control);
+		if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) {
+			dev_kfree_skb(skb);
+			return 0;
+		}
+	}
+
 	__ieee80211_tx_prepare(&tx, skb, dev, control);
 	sta = tx.sta;
 	tx.u.tx.mgmt_interface = mgmt;
Index: linux-2.6.16/net/d80211/ieee80211_i.h
===================================================================
--- linux-2.6.16.orig/net/d80211/ieee80211_i.h
+++ linux-2.6.16/net/d80211/ieee80211_i.h
@@ -532,6 +532,8 @@ struct ieee80211_local {
 				* (1 << MODE_*) */
 
 	int user_space_mlme;
+	int stop_data_frame_tx; /* Set to 1 to stop transmission
+				 * of data frames. */
 };
 
 enum ieee80211_link_state_t {
Index: linux-2.6.16/net/d80211/ieee80211_ioctl.c
===================================================================
--- linux-2.6.16.orig/net/d80211/ieee80211_ioctl.c
+++ linux-2.6.16/net/d80211/ieee80211_ioctl.c
@@ -1300,6 +1300,14 @@ static int ieee80211_ioctl_set_radio_ena
         return ieee80211_hw_config(dev);
 }
 
+static int ieee80211_ioctl_set_stop_data_frame_tx(struct net_device *dev,
+					  	  int val)
+{
+	struct ieee80211_local *local = dev->ieee80211_ptr;
+        local->stop_data_frame_tx = val;
+        return 0;
+}
+
 static int
 ieee80211_ioctl_set_tx_queue_params(struct net_device *dev,
 				    struct prism2_hostapd_param *param)
@@ -2612,6 +2620,9 @@ static int ieee80211_ioctl_prism2_param(
 	case PRISM2_PARAM_USER_SPACE_MLME:
 		local->user_space_mlme = value;
 		break;
+	case PRISM2_PARAM_STOP_DATA_FRAME_TX:
+                ret = ieee80211_ioctl_set_stop_data_frame_tx(dev, value);
+		break;
 	default:
 		ret = -EOPNOTSUPP;
 		break;

--

  parent reply	other threads:[~2006-08-22 17:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060822173241.313859000@devicescape.com>
2006-08-22 17:33 ` [patch 1/5] d80211: allow for large scan results David Kimdon
2006-08-22 17:33 ` [patch 2/5] d80211: fix multiple device support David Kimdon
2006-08-22 17:33 ` [patch 3/5] d80211: fix interface removal David Kimdon
2006-08-23  7:20   ` Johannes Berg
2006-08-23 16:05     ` Jiri Benc
2006-08-22 17:34 ` [patch 4/5] d80211/bcm43xx: fix build for ARM David Kimdon
2006-08-22 18:58   ` Michael Buesch
2006-08-22 17:34 ` David Kimdon [this message]
2006-08-23  7:25   ` [patch 5/5] d80211: add ioctl to stop data frame tx Johannes Berg
2006-08-23 16:09     ` Jiri Benc
2006-08-28 18:34       ` Elliot Schwartz
2006-08-23 19:20     ` Simon Barber
2006-08-28 18:29     ` Elliot Schwartz
2006-08-29  7:30       ` Johannes Berg
2006-08-29 11:45         ` John W. Linville
2006-08-29 18:39           ` Jouni Malinen
2006-08-30  7:26             ` Johannes Berg
2006-08-30 16:01               ` Jouni Malinen
2006-08-31  7:23                 ` Johannes Berg
2006-09-22 12:13   ` Jiri Benc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060822173419.GF12500@devicescape.com \
    --to=david.kimdon@devicescape.com \
    --cc=jbenc@suse.cz \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).