* mac80211 patches for 2.6.23
[not found] <20070610.181704.73383002.davem@davemloft.net>
@ 2007-06-12 1:22 ` John W. Linville
2007-06-12 1:23 ` [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information John W. Linville
0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2007-06-12 1:22 UTC (permalink / raw)
To: David Miller; +Cc: linux-wireless, netdev
Dave,
Here are a few mac80211 patches appropriate for 2.6.23.
Individual patches to follow, or you can pull at your leisure...
John
---
The following changes since commit 5ecd3100e695228ac5e0ce0e325e252c0f11806f:
Linus Torvalds (1):
Linux 2.6.22-rc4
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git mac80211-upstream
Larry Finger (2):
mac80211: Add support for SIOCGIWRATE ioctl to provide rate information
mac80211: Set low initial rate in rc80211_simple
net/mac80211/ieee80211_ioctl.c | 25 ++++++++++++++++++++++++-
net/mac80211/rc80211_simple.c | 12 +++++++-----
2 files changed, 31 insertions(+), 6 deletions(-)
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information
2007-06-12 1:22 ` mac80211 patches for 2.6.23 John W. Linville
@ 2007-06-12 1:23 ` John W. Linville
2007-06-12 1:24 ` [PATCH] mac80211: Set low initial rate in rc80211_simple John W. Linville
2007-07-03 5:38 ` [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information David Miller
0 siblings, 2 replies; 5+ messages in thread
From: John W. Linville @ 2007-06-12 1:23 UTC (permalink / raw)
To: David Miller; +Cc: linux-wireless, netdev
From: Larry Finger <Larry.Finger@lwfinger.net>
At present, transmission rate information for mac80211 is available only
if verbose debugging is turned on, and then only in the logs. This patch
implements the SIOCGIWRATE ioctl, which adds the current transmission rate to
the output of iwconfig.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
net/mac80211/ieee80211_ioctl.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index 352f03b..66e8a97 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -838,6 +838,29 @@ static int ieee80211_ioctl_giwscan(struct net_device *dev,
}
+static int ieee80211_ioctl_giwrate(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_param *rate, char *extra)
+{
+ struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct sta_info *sta;
+ struct ieee80211_sub_if_data *sdata;
+
+ sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ if (sdata->type == IEEE80211_IF_TYPE_STA)
+ sta = sta_info_get(local, sdata->u.sta.bssid);
+ else
+ return -EOPNOTSUPP;
+ if (!sta)
+ return -ENODEV;
+ if (sta->txrate < local->oper_hw_mode->num_rates)
+ rate->value = local->oper_hw_mode->rates[sta->txrate].rate * 100000;
+ else
+ rate->value = 0;
+ sta_info_put(sta);
+ return 0;
+}
+
static int ieee80211_ioctl_siwrts(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *rts, char *extra)
@@ -1779,7 +1802,7 @@ static const iw_handler ieee80211_handler[] =
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* SIOCSIWRATE */
- (iw_handler) NULL, /* SIOCGIWRATE */
+ (iw_handler) ieee80211_ioctl_giwrate, /* SIOCGIWRATE */
(iw_handler) ieee80211_ioctl_siwrts, /* SIOCSIWRTS */
(iw_handler) ieee80211_ioctl_giwrts, /* SIOCGIWRTS */
(iw_handler) ieee80211_ioctl_siwfrag, /* SIOCSIWFRAG */
--
1.5.0.6
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] mac80211: Set low initial rate in rc80211_simple
2007-06-12 1:23 ` [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information John W. Linville
@ 2007-06-12 1:24 ` John W. Linville
2007-07-03 5:38 ` David Miller
2007-07-03 5:38 ` [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information David Miller
1 sibling, 1 reply; 5+ messages in thread
From: John W. Linville @ 2007-06-12 1:24 UTC (permalink / raw)
To: David Miller; +Cc: linux-wireless, netdev
From: Larry Finger <Larry.Finger@lwfinger.net>
The initial rate for STA's using rc80211_simple is set to the last
rate in the rate table. For situations for which the signal is weak,
the rate may be too high for authentication and association. Although
the rc80211_simple module will adjust the speed, the response may not
be fast enough for a successful connection. This modification sets the
initial rate to the lowest supported value.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
net/mac80211/rc80211_simple.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/mac80211/rc80211_simple.c b/net/mac80211/rc80211_simple.c
index 2048cfd..5ae7fc4 100644
--- a/net/mac80211/rc80211_simple.c
+++ b/net/mac80211/rc80211_simple.c
@@ -283,14 +283,16 @@ static void rate_control_simple_rate_init(void *priv, void *priv_sta,
int i;
sta->txrate = 0;
mode = local->oper_hw_mode;
- /* TODO: what is a good starting rate for STA? About middle? Maybe not
- * the lowest or the highest rate.. Could consider using RSSI from
- * previous packets? Need to have IEEE 802.1X auth succeed immediately
- * after assoc.. */
+ /* TODO: This routine should consider using RSSI from previous packets
+ * as we need to have IEEE 802.1X auth succeed immediately after assoc..
+ * Until that method is implemented, we will use the lowest supported rate
+ * as a workaround, */
for (i = 0; i < mode->num_rates; i++) {
if ((sta->supp_rates & BIT(i)) &&
- (mode->rates[i].flags & IEEE80211_RATE_SUPPORTED))
+ (mode->rates[i].flags & IEEE80211_RATE_SUPPORTED)) {
sta->txrate = i;
+ break;
+ }
}
}
--
1.5.0.6
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: Set low initial rate in rc80211_simple
2007-06-12 1:24 ` [PATCH] mac80211: Set low initial rate in rc80211_simple John W. Linville
@ 2007-07-03 5:38 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2007-07-03 5:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
From: "John W. Linville" <linville@tuxdriver.com>
Date: Mon, 11 Jun 2007 21:24:11 -0400
> From: Larry Finger <Larry.Finger@lwfinger.net>
>
> The initial rate for STA's using rc80211_simple is set to the last
> rate in the rate table. For situations for which the signal is weak,
> the rate may be too high for authentication and association. Although
> the rc80211_simple module will adjust the speed, the response may not
> be fast enough for a successful connection. This modification sets the
> initial rate to the lowest supported value.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Applied to net-2.6.23
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information
2007-06-12 1:23 ` [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information John W. Linville
2007-06-12 1:24 ` [PATCH] mac80211: Set low initial rate in rc80211_simple John W. Linville
@ 2007-07-03 5:38 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2007-07-03 5:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
From: "John W. Linville" <linville@tuxdriver.com>
Date: Mon, 11 Jun 2007 21:23:19 -0400
> From: Larry Finger <Larry.Finger@lwfinger.net>
>
> At present, transmission rate information for mac80211 is available only
> if verbose debugging is turned on, and then only in the logs. This patch
> implements the SIOCGIWRATE ioctl, which adds the current transmission rate to
> the output of iwconfig.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This change appears to already be in the tree.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-03 5:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20070610.181704.73383002.davem@davemloft.net>
2007-06-12 1:22 ` mac80211 patches for 2.6.23 John W. Linville
2007-06-12 1:23 ` [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information John W. Linville
2007-06-12 1:24 ` [PATCH] mac80211: Set low initial rate in rc80211_simple John W. Linville
2007-07-03 5:38 ` David Miller
2007-07-03 5:38 ` [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information David Miller
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).