linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: [PATCH 22/24] rt2x00: Configure type during add_interface
Date: Tue, 31 Jul 2007 20:37:40 +0200	[thread overview]
Message-ID: <200707312037.40306.IvDoorn@gmail.com> (raw)

>From b10059fd3e2bbaef1f82ac60a177902bd19071dc Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Tue, 31 Jul 2007 17:09:15 +0200
Subject: [PATCH 22/24] rt2x00: Configure type during add_interface

When there was only 1 interface present which was configured
as monitor interface the interface would fail to configure
the device correctly. This resulted in too many frames to be dropped.

This patch will add the configure_type and configure_packet_filter
to the add_interface handler instead of the config_interface handler.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00mac.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/rt2x00mac.c b/drivers/net/wireless/rt2x00mac.c
index 9c6d043..205f10f 100644
--- a/drivers/net/wireless/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00mac.c
@@ -173,6 +173,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 	struct interface *intf = &rt2x00dev->interface;
+	int retval;
 
 	/*
 	 * We only support 1 non-monitor interface.
@@ -195,7 +196,17 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
 		intf->filter = 0;
 	}
 
-	return rt2x00lib_init_interface(rt2x00dev);
+	retval = rt2x00lib_init_interface(rt2x00dev);
+	if (retval)
+		return retval;
+
+	/*
+	 * Configure interface.
+	 */
+	rt2x00lib_config_type(rt2x00dev, conf->type);
+	rt2x00lib_config_packet_filter(rt2x00dev, intf->filter);
+
+	return 0;
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_add_interface);
 
@@ -290,12 +301,6 @@ int rt2x00mac_config_interface(struct ieee80211_hw *hw, int if_id,
 	 */
 	if (conf->type != IEEE80211_IF_TYPE_AP)
 		memcpy(&intf->bssid, conf->bssid, ETH_ALEN);
-
-	/*
-	 * Enable configuration.
-	 */
-	rt2x00lib_config_type(rt2x00dev, conf->type);
-	rt2x00lib_config_packet_filter(rt2x00dev, intf->filter);
 	rt2x00lib_config_bssid(rt2x00dev, intf->bssid);
 
 	/*
-- 
1.5.2.4


                 reply	other threads:[~2007-07-31 18:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200707312037.40306.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rt2400-devel@lists.sourceforge.net \
    /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).