linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: linux-wireless@vger.kernel.org,
	John W Linville <linville@tuxdriver.com>, Jouni Malinen <j@w1.fi>
Subject: [PATCH 3/5] hostap: remove private "monitor" ioctl
Date: Thu, 22 May 2008 21:54:54 -0400	[thread overview]
Message-ID: <20080523015454.16636.44068.stgit@dv.roinet.com> (raw)
In-Reply-To: <20080523015442.16636.92254.stgit@dv.roinet.com>

This is an ioctl obsoleted by the monitor mode years ago.  Using it
would trigger a deprecation warning.  As the wireless drivers
standardize on the radiotap standard, the "monitor" ioctl cannot be
preserved to work as obsolete software expects.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---

 drivers/net/wireless/hostap/hostap_common.h |    2 +
 drivers/net/wireless/hostap/hostap_ioctl.c  |   53 ---------------------------
 2 files changed, 1 insertions(+), 54 deletions(-)

diff --git a/drivers/net/wireless/hostap/hostap_common.h b/drivers/net/wireless/hostap/hostap_common.h
index b470c74..2f92ecd 100644
--- a/drivers/net/wireless/hostap/hostap_common.h
+++ b/drivers/net/wireless/hostap/hostap_common.h
@@ -239,7 +239,7 @@ struct hfa384x_comms_quality {
 #define PRISM2_IOCTL_GET_PRISM2_PARAM (SIOCIWFIRSTPRIV + 1)
 #define PRISM2_IOCTL_WRITEMIF (SIOCIWFIRSTPRIV + 2)
 #define PRISM2_IOCTL_READMIF (SIOCIWFIRSTPRIV + 3)
-#define PRISM2_IOCTL_MONITOR (SIOCIWFIRSTPRIV + 4)
+/* #define PRISM2_IOCTL_MONITOR (SIOCIWFIRSTPRIV + 4) */
 #define PRISM2_IOCTL_RESET (SIOCIWFIRSTPRIV + 6)
 #define PRISM2_IOCTL_INQUIRE (SIOCIWFIRSTPRIV + 8)
 #define PRISM2_IOCTL_WDS_ADD (SIOCIWFIRSTPRIV + 10)
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 0ca0bfe..7dc8392 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -2124,8 +2124,6 @@ static int prism2_ioctl_giwscan(struct net_device *dev,
 
 
 static const struct iw_priv_args prism2_priv[] = {
-	{ PRISM2_IOCTL_MONITOR,
-	  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "monitor" },
 	{ PRISM2_IOCTL_READMIF,
 	  IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1,
 	  IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1, "readmif" },
@@ -2907,52 +2905,6 @@ static int prism2_ioctl_priv_writemif(struct net_device *dev,
 }
 
 
-static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i)
-{
-	struct hostap_interface *iface;
-	local_info_t *local;
-	int ret = 0;
-	u32 mode;
-
-	iface = netdev_priv(dev);
-	local = iface->local;
-
-	printk(KERN_DEBUG "%s: process %d (%s) used deprecated iwpriv monitor "
-	       "- update software to use iwconfig mode monitor\n",
-	       dev->name, task_pid_nr(current), current->comm);
-
-	/* Backward compatibility code - this can be removed at some point */
-
-	if (*i == 0) {
-		/* Disable monitor mode - old mode was not saved, so go to
-		 * Master mode */
-		mode = IW_MODE_MASTER;
-		ret = prism2_ioctl_siwmode(dev, NULL, &mode, NULL);
-	} else if (*i == 1) {
-		/* netlink socket mode is not supported anymore since it did
-		 * not separate different devices from each other and was not
-		 * best method for delivering large amount of packets to
-		 * user space */
-		ret = -EOPNOTSUPP;
-	} else if (*i == 2 || *i == 3) {
-		switch (*i) {
-		case 2:
-			local->monitor_type = PRISM2_MONITOR_80211;
-			break;
-		case 3:
-			local->monitor_type = PRISM2_MONITOR_PRISM;
-			break;
-		}
-		mode = IW_MODE_MONITOR;
-		ret = prism2_ioctl_siwmode(dev, NULL, &mode, NULL);
-		hostap_monitor_mode_enable(local);
-	} else
-		ret = -EINVAL;
-
-	return ret;
-}
-
-
 static int prism2_ioctl_priv_reset(struct net_device *dev, int *i)
 {
 	struct hostap_interface *iface;
@@ -4004,11 +3956,6 @@ int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 		else ret = prism2_ioctl_priv_inquire(dev, (int *) wrq->u.name);
 		break;
 
-	case PRISM2_IOCTL_MONITOR:
-		if (!capable(CAP_NET_ADMIN)) ret = -EPERM;
-		else ret = prism2_ioctl_priv_monitor(dev, (int *) wrq->u.name);
-		break;
-
 	case PRISM2_IOCTL_RESET:
 		if (!capable(CAP_NET_ADMIN)) ret = -EPERM;
 		else ret = prism2_ioctl_priv_reset(dev, (int *) wrq->u.name);

  parent reply	other threads:[~2008-05-23  1:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23  1:54 [PATCH 1/5] hostap: fix sparse warnings Pavel Roskin
2008-05-23  1:54 ` [PATCH 2/5] hostap: fix references to 8802.11 Pavel Roskin
2008-05-26  9:38   ` Jouni Malinen
2008-05-23  1:54 ` Pavel Roskin [this message]
2008-05-26  9:44   ` [PATCH 3/5] hostap: remove private "monitor" ioctl Jouni Malinen
2008-05-28 13:30     ` Pavel Roskin
2008-05-28 14:48       ` Jouni Malinen
2008-05-23  1:55 ` [PATCH 4/5] hostap: don't report useless WDS frames by default Pavel Roskin
2008-05-23  1:55 ` [PATCH 5/5] hostap: add radiotap support, always use it in monitor mode Pavel Roskin

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=20080523015454.16636.44068.stgit@dv.roinet.com \
    --to=proski@gnu.org \
    --cc=j@w1.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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).