* [PATCH] mac80211: treat the WME sta flag as a bit
From: Arik Nemtsov @ 2011-09-26 6:36 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Arik Nemtsov
Correct flag usage - use it as a bit index instead of a bit value.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
net/wireless/nl80211.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index c26a1da..4bb1f48 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2613,7 +2613,7 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
/* parse WME attributes if sta is WME capable */
if ((rdev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) &&
- (params.sta_flags_set & NL80211_STA_FLAG_WME) &&
+ (params.sta_flags_set & BIT(NL80211_STA_FLAG_WME)) &&
info->attrs[NL80211_ATTR_STA_WME]) {
struct nlattr *tb[NL80211_STA_WME_MAX + 1];
struct nlattr *nla;
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH] wl12xx: Add support for HW channel switch
From: Luciano Coelho @ 2011-09-26 6:25 UTC (permalink / raw)
To: Levi, Shahar; +Cc: linux-wireless
In-Reply-To: <CAHiDVwkeMTYdVubk=YPp6XTfNtmr2+mTwuX-ED0TcmzmrvEfUw@mail.gmail.com>
On Sun, 2011-09-25 at 19:08 +0300, Levi, Shahar wrote:
> On Fri, Sep 23, 2011 at 1:59 PM, Luciano Coelho <coelho@ti.com> wrote:
> > On Thu, 2011-09-22 at 16:36 +0300, Luciano Coelho wrote:
> >> On Thu, 2011-09-08 at 13:01 +0300, Shahar Levi wrote:
> >> > +static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
> >> > + struct ieee80211_channel_switch *ch_switch)
> >> > +{
> >> > + struct wl1271 *wl = hw->priv;
> >> > + int ret;
> >> > +
> >> > + wl1271_debug(DEBUG_MAC80211, "mac80211 channel switch");
> >> > +
> >> > + mutex_lock(&wl->mutex);
> >> > +
> >> > + if (unlikely(wl->state == WL1271_STATE_OFF)) {
> >> > + mutex_unlock(&wl->mutex);
> >> > + ieee80211_chswitch_done(wl->vif, false);
> >> > + return;
> >> > + }
> >> > +
> >> > + ret = wl1271_ps_elp_wakeup(wl);
> >> > + if (ret < 0)
> >> > + goto out;
> >> > +
> >> > + /* send all pending packets */
> >> > + wl1271_tx_work_locked(wl);
> >>
> >> Is this really needed? Can anyone tell why?
> I have re- discussed with the FW guys and it seems that when using HW
> channel switch sending all TX packet isn't needed.
As I suspected. ;)
> > I checked this a bit further and I don't see the point in sending all
> > packets here. In fact, if block_tx is set, we can't even send any more
> > frames until the switch happens (or fails). So we should at least check
> > this here.
> The block_tx is taken into account in the mac layer.
This is a bit strange, though. I checked the code and nobody seems to
be using the block_tx element of ieee80211_channel_switch, so I wonder
why it's there at all.
In any case, wouldn't it be a good idea for us to use it and send it to
the firmware, since our firmware supports it? This way we would also
block TX packets that are queued in the firmware, wouldn't we?
> > I'm leaving this patch out for now until I understand this better.
> Do you prefer me to set v2 without that line or you could fix that in
> the apply stage?
No need to send v2. It seems that Victor will need this change for
something else he's working on, so I guess he can take it over once it
is needed. I don't want to include this unless we have a good reason to
do it.
--
Cheers,
Luca.
^ permalink raw reply
* Compat-wireless release for 2011-09-25 is baked
From: Compat-wireless cronjob account @ 2011-09-25 19:02 UTC (permalink / raw)
To: linux-wireless
compat-wireless code metrics
812386 - Total upstream lines of code being pulled
2397 - backport code changes
2086 - backport code additions
311 - backport code deletions
8559 - backport from compat module
10956 - total backport code
1.3486 - % of code consists of backport work
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(601) [sender=3.0.7]
^ permalink raw reply
* [PATCH 3/3] mac80211: pass vif param to conf_tx() callback
From: Eliad Peller @ 2011-09-25 17:06 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1316970415-23239-1-git-send-email-eliad@wizery.com>
tx params should be configured per interface.
Add ieee80211_vif param to the conf_tx callback,
and update all the drivers that use this callback.
The following spatch was used:
@rule1@
struct ieee80211_ops ops;
identifier conf_tx_op;
@@
ops.conf_tx = conf_tx_op;
@rule2@
identifier rule1.conf_tx_op;
identifier hw, queue, params;
@@
conf_tx_op (
- struct ieee80211_hw *hw,
+ struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u16 queue,
const struct ieee80211_tx_queue_params *params) {...}
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 ++-
drivers/net/wireless/ath/ath9k/main.c | 3 ++-
drivers/net/wireless/ath/carl9170/main.c | 3 ++-
drivers/net/wireless/b43/main.c | 3 ++-
drivers/net/wireless/b43legacy/main.c | 3 ++-
drivers/net/wireless/mac80211_hwsim.c | 3 ++-
drivers/net/wireless/mwl8k.c | 3 ++-
drivers/net/wireless/p54/main.c | 3 ++-
drivers/net/wireless/rt2x00/rt2400pci.c | 3 ++-
drivers/net/wireless/rt2x00/rt61pci.c | 3 ++-
drivers/net/wireless/rt2x00/rt73usb.c | 3 ++-
drivers/net/wireless/rtl818x/rtl8187/dev.c | 3 ++-
drivers/net/wireless/rtlwifi/core.c | 3 ++-
drivers/net/wireless/wl1251/main.c | 3 ++-
drivers/net/wireless/wl12xx/main.c | 3 ++-
drivers/staging/brcm80211/brcmsmac/mac80211_if.c | 7 ++++---
include/net/mac80211.h | 3 ++-
net/mac80211/driver-ops.h | 3 ++-
19 files changed, 39 insertions(+), 21 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 0560234..0fbfc72 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -563,7 +563,7 @@ ath5k_get_stats(struct ieee80211_hw *hw,
static int
-ath5k_conf_tx(struct ieee80211_hw *hw, u16 queue,
+ath5k_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct ath5k_hw *ah = hw->priv;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 495fdf6..d56a154 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1352,7 +1352,8 @@ static int ath9k_htc_sta_remove(struct ieee80211_hw *hw,
return ret;
}
-static int ath9k_htc_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int ath9k_htc_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct ath9k_htc_priv *priv = hw->priv;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index ee39702..0601579 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1843,7 +1843,8 @@ static void ath9k_sta_notify(struct ieee80211_hw *hw,
}
}
-static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int ath9k_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct ath_softc *sc = hw->priv;
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index af351ec..e390a8e 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -1304,7 +1304,8 @@ static int carl9170_op_sta_remove(struct ieee80211_hw *hw,
return 0;
}
-static int carl9170_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int carl9170_op_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *param)
{
struct ar9170 *ar = hw->priv;
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 56fa3a3..29b86d4 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3552,7 +3552,8 @@ static void b43_qos_init(struct b43_wldev *dev)
b43dbg(dev->wl, "QoS enabled\n");
}
-static int b43_op_conf_tx(struct ieee80211_hw *hw, u16 _queue,
+static int b43_op_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 _queue,
const struct ieee80211_tx_queue_params *params)
{
struct b43_wl *wl = hw_to_b43_wl(hw);
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 468d183..a3b72cd 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2466,7 +2466,8 @@ out:
}
}
-static int b43legacy_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int b43legacy_op_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
return 0;
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 34b79fc..68455a2 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -970,7 +970,8 @@ static int mac80211_hwsim_set_tim(struct ieee80211_hw *hw,
}
static int mac80211_hwsim_conf_tx(
- struct ieee80211_hw *hw, u16 queue,
+ struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
wiphy_debug(hw->wiphy,
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index ea1395a..2428895 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -4915,7 +4915,8 @@ static int mwl8k_sta_add(struct ieee80211_hw *hw,
return ret;
}
-static int mwl8k_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int mwl8k_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct mwl8k_priv *priv = hw->priv;
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 726a934..ad9ae04 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -404,7 +404,8 @@ static void p54_configure_filter(struct ieee80211_hw *dev,
p54_set_groupfilter(priv);
}
-static int p54_conf_tx(struct ieee80211_hw *dev, u16 queue,
+static int p54_conf_tx(struct ieee80211_hw *dev,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct p54_common *priv = dev->priv;
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index daa32fc..1946060 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1648,7 +1648,8 @@ static int rt2400pci_probe_hw(struct rt2x00_dev *rt2x00dev)
/*
* IEEE80211 stack callback functions.
*/
-static int rt2400pci_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int rt2400pci_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct rt2x00_dev *rt2x00dev = hw->priv;
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 058ef4b..5438bb4 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2883,7 +2883,8 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev)
/*
* IEEE80211 stack callback functions.
*/
-static int rt61pci_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
+static int rt61pci_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue_idx,
const struct ieee80211_tx_queue_params *params)
{
struct rt2x00_dev *rt2x00dev = hw->priv;
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 0baeb89..1a6b68b 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -2222,7 +2222,8 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
/*
* IEEE80211 stack callback functions.
*/
-static int rt73usb_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
+static int rt73usb_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue_idx,
const struct ieee80211_tx_queue_params *params)
{
struct rt2x00_dev *rt2x00dev = hw->priv;
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index 1e0be14..c106742 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -1241,7 +1241,8 @@ static void rtl8187_configure_filter(struct ieee80211_hw *dev,
rtl818x_iowrite32_async(priv, &priv->map->RX_CONF, priv->rx_conf);
}
-static int rtl8187_conf_tx(struct ieee80211_hw *dev, u16 queue,
+static int rtl8187_conf_tx(struct ieee80211_hw *dev,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct rtl8187_priv *priv = dev->priv;
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 04c4e9e..05c27c9 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -504,7 +504,8 @@ static int _rtl_get_hal_qnum(u16 queue)
*for mac80211 VO=0, VI=1, BE=2, BK=3
*for rtl819x BE=0, BK=1, VI=2, VO=3
*/
-static int rtl_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int rtl_op_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *param)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
index a14a48c..ba3268e 100644
--- a/drivers/net/wireless/wl1251/main.c
+++ b/drivers/net/wireless/wl1251/main.c
@@ -1158,7 +1158,8 @@ static struct ieee80211_channel wl1251_channels[] = {
{ .hw_value = 13, .center_freq = 2472},
};
-static int wl1251_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int wl1251_op_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
enum wl1251_acx_ps_scheme ps_scheme;
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index a51dd0e..60e2869 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -3744,7 +3744,8 @@ out:
mutex_unlock(&wl->mutex);
}
-static int wl1271_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
+static int wl1271_op_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct wl1271 *wl = hw->priv;
diff --git a/drivers/staging/brcm80211/brcmsmac/mac80211_if.c b/drivers/staging/brcm80211/brcmsmac/mac80211_if.c
index d6de44e..d03f0cf 100644
--- a/drivers/staging/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/staging/brcm80211/brcmsmac/mac80211_if.c
@@ -140,8 +140,9 @@ static void brcms_ops_sta_notify(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
enum sta_notify_cmd cmd,
struct ieee80211_sta *sta);
-static int brcms_ops_conf_tx(struct ieee80211_hw *hw, u16 queue,
- const struct ieee80211_tx_queue_params *params);
+static int brcms_ops_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
+ const struct ieee80211_tx_queue_params *params);
static u64 brcms_ops_get_tsf(struct ieee80211_hw *hw);
static int brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
@@ -553,7 +554,7 @@ brcms_ops_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
}
static int
-brcms_ops_conf_tx(struct ieee80211_hw *hw, u16 queue,
+brcms_ops_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct brcms_info *wl = hw->priv;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c0f63fd..b8ecba7 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1998,7 +1998,8 @@ struct ieee80211_ops {
struct ieee80211_sta *sta);
void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
enum sta_notify_cmd, struct ieee80211_sta *sta);
- int (*conf_tx)(struct ieee80211_hw *hw, u16 queue,
+ int (*conf_tx)(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif, u16 queue,
const struct ieee80211_tx_queue_params *params);
u64 (*get_tsf)(struct ieee80211_hw *hw);
void (*set_tsf)(struct ieee80211_hw *hw, u64 tsf);
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 5315a5d..d998b24 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -423,7 +423,8 @@ static inline int drv_conf_tx(struct ieee80211_local *local,
trace_drv_conf_tx(local, sdata, queue, params);
if (local->ops->conf_tx)
- ret = local->ops->conf_tx(&local->hw, queue, params);
+ ret = local->ops->conf_tx(&local->hw, &sdata->vif,
+ queue, params);
trace_drv_return_int(local, ret);
return ret;
}
--
1.7.6.401.g6a319
^ permalink raw reply related
* [PATCH 2/3] mac80211: save tx params per sdata
From: Eliad Peller @ 2011-09-25 17:06 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1316970415-23239-1-git-send-email-eliad@wizery.com>
save and configure tx param per sdata, rather than
per hardware.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
net/mac80211/cfg.c | 5 +++--
net/mac80211/driver-ops.h | 5 +++--
net/mac80211/driver-trace.h | 14 ++++++++++----
net/mac80211/ieee80211_i.h | 3 ++-
net/mac80211/mlme.c | 4 ++--
net/mac80211/util.c | 15 +++++++++++----
6 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 805b40b..edc1d21 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1275,6 +1275,7 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy,
struct ieee80211_txq_params *params)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_tx_queue_params p;
if (!local->ops->conf_tx)
@@ -1295,8 +1296,8 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy,
if (params->queue >= local->hw.queues)
return -EINVAL;
- local->tx_conf[params->queue] = p;
- if (drv_conf_tx(local, params->queue, &p)) {
+ sdata->tx_conf[params->queue] = p;
+ if (drv_conf_tx(local, sdata, params->queue, &p)) {
wiphy_debug(local->hw.wiphy,
"failed to set TX queue parameters for queue %d\n",
params->queue);
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 9001ff3..5315a5d 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -413,14 +413,15 @@ static inline void drv_sta_remove(struct ieee80211_local *local,
trace_drv_return_void(local);
}
-static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue,
+static inline int drv_conf_tx(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
int ret = -EOPNOTSUPP;
might_sleep();
- trace_drv_conf_tx(local, queue, params);
+ trace_drv_conf_tx(local, sdata, queue, params);
if (local->ops->conf_tx)
ret = local->ops->conf_tx(&local->hw, queue, params);
trace_drv_return_int(local, ret);
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index f47b00d..aaf97da 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -697,32 +697,38 @@ TRACE_EVENT(drv_sta_remove,
);
TRACE_EVENT(drv_conf_tx,
- TP_PROTO(struct ieee80211_local *local, u16 queue,
+ TP_PROTO(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ u16 queue,
const struct ieee80211_tx_queue_params *params),
- TP_ARGS(local, queue, params),
+ TP_ARGS(local, sdata, queue, params),
TP_STRUCT__entry(
LOCAL_ENTRY
+ VIF_ENTRY
__field(u16, queue)
__field(u16, txop)
__field(u16, cw_min)
__field(u16, cw_max)
__field(u8, aifs)
+ __field(bool, uapsd)
),
TP_fast_assign(
LOCAL_ASSIGN;
+ VIF_ASSIGN;
__entry->queue = queue;
__entry->txop = params->txop;
__entry->cw_max = params->cw_max;
__entry->cw_min = params->cw_min;
__entry->aifs = params->aifs;
+ __entry->uapsd = params->uapsd;
),
TP_printk(
- LOCAL_PR_FMT " queue:%d",
- LOCAL_PR_ARG, __entry->queue
+ LOCAL_PR_FMT VIF_PR_FMT " queue:%d",
+ LOCAL_PR_ARG, VIF_PR_ARG, __entry->queue
)
);
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 21186e2..fc3e846 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -609,6 +609,8 @@ struct ieee80211_sub_if_data {
__be16 control_port_protocol;
bool control_port_no_encrypt;
+ struct ieee80211_tx_queue_params tx_conf[IEEE80211_MAX_QUEUES];
+
struct work_struct work;
struct sk_buff_head skb_queue;
@@ -751,7 +753,6 @@ struct ieee80211_local {
struct workqueue_struct *workqueue;
unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES];
- struct ieee80211_tx_queue_params tx_conf[IEEE80211_MAX_QUEUES];
/* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
spinlock_t queue_stop_reason_lock;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1a59fb6..fefd9bf 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -936,8 +936,8 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
params.aifs, params.cw_min, params.cw_max,
params.txop, params.uapsd);
#endif
- local->tx_conf[queue] = params;
- if (drv_conf_tx(local, queue, ¶ms))
+ sdata->tx_conf[queue] = params;
+ if (drv_conf_tx(local, sdata, queue, ¶ms))
wiphy_debug(local->hw.wiphy,
"failed to set TX queue parameters for queue %d\n",
queue);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 4b1466d..8413dc0 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -632,8 +632,8 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
qparam.uapsd = false;
- local->tx_conf[queue] = qparam;
- drv_conf_tx(local, queue, &qparam);
+ sdata->tx_conf[queue] = qparam;
+ drv_conf_tx(local, sdata, queue, &qparam);
}
/* after reinitialize QoS TX queues setting to default,
@@ -1040,8 +1040,15 @@ int ieee80211_reconfig(struct ieee80211_local *local)
mutex_unlock(&local->sta_mtx);
/* reconfigure tx conf */
- for (i = 0; i < hw->queues; i++)
- drv_conf_tx(local, i, &local->tx_conf[i]);
+ list_for_each_entry(sdata, &local->interfaces, list) {
+ if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
+ sdata->vif.type == NL80211_IFTYPE_MONITOR ||
+ !ieee80211_sdata_running(sdata))
+ continue;
+
+ for (i = 0; i < hw->queues; i++)
+ drv_conf_tx(local, sdata, i, &sdata->tx_conf[i]);
+ }
/* reconfigure hardware */
ieee80211_hw_config(local, ~0);
--
1.7.6.401.g6a319
^ permalink raw reply related
* [PATCH 1/3] cfg80211/mac80211: add netdev param to set_txq_params()
From: Eliad Peller @ 2011-09-25 17:06 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
tx params are currently configured per hw, although they
should be configured per interface.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
include/net/cfg80211.h | 2 +-
net/mac80211/cfg.c | 1 +
net/wireless/nl80211.c | 6 ++++++
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ccfdf3f..1635e78 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1484,7 +1484,7 @@ struct cfg80211_ops {
int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
struct bss_parameters *params);
- int (*set_txq_params)(struct wiphy *wiphy,
+ int (*set_txq_params)(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_txq_params *params);
int (*set_channel)(struct wiphy *wiphy, struct net_device *dev,
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index b57ddf9..805b40b 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1271,6 +1271,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
}
static int ieee80211_set_txq_params(struct wiphy *wiphy,
+ struct net_device *dev,
struct ieee80211_txq_params *params)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index c26a1da..b43f354 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1235,6 +1235,11 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
goto bad_res;
}
+ if (!netdev) {
+ result = -EINVAL;
+ goto bad_res;
+ }
+
nla_for_each_nested(nl_txq_params,
info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS],
rem_txq_params) {
@@ -1247,6 +1252,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
goto bad_res;
result = rdev->ops->set_txq_params(&rdev->wiphy,
+ netdev,
&txq_params);
if (result)
goto bad_res;
--
1.7.6.401.g6a319
^ permalink raw reply related
* Re: [PATCH] wl12xx: Add support for HW channel switch
From: Levi, Shahar @ 2011-09-25 16:08 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
In-Reply-To: <1316775583.2157.728.camel@cumari>
On Fri, Sep 23, 2011 at 1:59 PM, Luciano Coelho <coelho@ti.com> wrote:
> On Thu, 2011-09-22 at 16:36 +0300, Luciano Coelho wrote:
>> On Thu, 2011-09-08 at 13:01 +0300, Shahar Levi wrote:
>> > WL12xx FW supports HW channel switch mechanism.
>> > Add HW channel switch support via channel_switch ops.
>> >
>> > Signed-off-by: Shahar Levi <shahar_levi@ti.com>
>> > ---
>>
>> [...]
Hi Luca,
>>
>> > +static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
>> > + struct ieee80211_channel_switch *ch_switch)
>> > +{
>> > + struct wl1271 *wl = hw->priv;
>> > + int ret;
>> > +
>> > + wl1271_debug(DEBUG_MAC80211, "mac80211 channel switch");
>> > +
>> > + mutex_lock(&wl->mutex);
>> > +
>> > + if (unlikely(wl->state == WL1271_STATE_OFF)) {
>> > + mutex_unlock(&wl->mutex);
>> > + ieee80211_chswitch_done(wl->vif, false);
>> > + return;
>> > + }
>> > +
>> > + ret = wl1271_ps_elp_wakeup(wl);
>> > + if (ret < 0)
>> > + goto out;
>> > +
>> > + /* send all pending packets */
>> > + wl1271_tx_work_locked(wl);
>>
>> Is this really needed? Can anyone tell why?
I have re- discussed with the FW guys and it seems that when using HW
channel switch sending all TX packet isn't needed.
>
> I checked this a bit further and I don't see the point in sending all
> packets here. In fact, if block_tx is set, we can't even send any more
> frames until the switch happens (or fails). So we should at least check
> this here.
The block_tx is taken into account in the mac layer.
>
> I'm leaving this patch out for now until I understand this better.
Do you prefer me to set v2 without that line or you could fix that in
the apply stage?
>
> --
> Cheers,
> Luca.
Thanks for your comment.
All the best,
Shahar
^ permalink raw reply
* [PATCH v2 2/2] mac80211: Send the management frame at requested rate
From: Rajkumar Manoharan @ 2011-09-25 9:23 UTC (permalink / raw)
To: johannes; +Cc: linville, linux-wireless, Rajkumar Manoharan, Jouni Malinen
In-Reply-To: <1316942611-2053-1-git-send-email-rmanohar@qca.qualcomm.com>
Whenever the scan request or tx_mgmt is requesting not to
use CCK rate for managemet frames through
NL80211_ATTR_TX_NO_CCK_RATE attribute, then mac80211 should
select appropriate least non-CCK rate. This could help to
send P2P probes and P2P action frames at non 11b rates
without diabling 11b rates globally.
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
include/net/mac80211.h | 4 ++++
net/mac80211/cfg.c | 3 +++
net/mac80211/ieee80211_i.h | 2 +-
net/mac80211/mlme.c | 2 +-
net/mac80211/rate.c | 29 ++++++++++++++++++++++++++++-
net/mac80211/scan.c | 3 ++-
net/mac80211/util.c | 8 ++++++--
net/mac80211/work.c | 2 +-
8 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c0f63fd..b8a0df6 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -363,6 +363,9 @@ struct ieee80211_bss_conf {
* @IEEE80211_TX_INTFL_TKIP_MIC_FAILURE: Marks this packet to be used for TKIP
* testing. It will be sent out with incorrect Michael MIC key to allow
* TKIP countermeasures to be tested.
+ * @IEEE80211_TX_CTL_NO_CCK_RATE: This frame will be sent at non CCK rate.
+ * This flag is actually used for management frame especially for P2P
+ * frames not being sent at CCK rate in 2GHz band.
*
* Note: If you have to add new flags to the enumeration, then don't
* forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
@@ -393,6 +396,7 @@ enum mac80211_tx_control_flags {
IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24),
IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25),
IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26),
+ IEEE80211_TX_CTL_NO_CCK_RATE = BIT(27),
};
#define IEEE80211_TX_CTL_STBC_SHIFT 23
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 9cba010..56c3504 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1897,6 +1897,9 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
flags |= IEEE80211_TX_CTL_TX_OFFCHAN;
}
+ if (no_cck)
+ flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
+
if (is_offchan && !offchan)
return -EBUSY;
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 21186e2..4822d69 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1324,7 +1324,7 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len,
- u32 ratemask, bool directed);
+ u32 ratemask, bool directed, bool no_cck);
void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
const size_t supp_rates_len,
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1a59fb6..cc80d32 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1239,7 +1239,7 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
} else {
ssid = ieee80211_bss_get_ie(ifmgd->associated, WLAN_EID_SSID);
ieee80211_send_probe_req(sdata, dst, ssid + 2, ssid[1], NULL, 0,
- (u32) -1, true);
+ (u32) -1, true, false);
}
ifmgd->probe_send_count++;
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 3d5a2cb..f61244c 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -233,6 +233,27 @@ static void rc_send_low_broadcast(s8 *idx, u32 basic_rates,
/* could not find a basic rate; use original selection */
}
+static inline s8
+rate_lowest_non_cck_index(struct ieee80211_supported_band *sband,
+ struct ieee80211_sta *sta)
+{
+ int i;
+
+ for (i = 0; i < sband->n_bitrates; i++) {
+ struct ieee80211_rate *srate = &sband->bitrates[i];
+ if ((srate->bitrate == 10) || (srate->bitrate == 20) ||
+ (srate->bitrate == 55) || (srate->bitrate == 110))
+ continue;
+
+ if (rate_supported(sta, sband->band, i))
+ return i;
+ }
+
+ /* No matching rate found */
+ return 0;
+}
+
+
bool rate_control_send_low(struct ieee80211_sta *sta,
void *priv_sta,
struct ieee80211_tx_rate_control *txrc)
@@ -242,7 +263,13 @@ bool rate_control_send_low(struct ieee80211_sta *sta,
int mcast_rate;
if (!sta || !priv_sta || rc_no_data_or_no_ack(txrc)) {
- info->control.rates[0].idx = rate_lowest_index(txrc->sband, sta);
+ if ((sband->band != IEEE80211_BAND_2GHZ) ||
+ !(info->flags & IEEE80211_TX_CTL_NO_CCK_RATE))
+ info->control.rates[0].idx =
+ rate_lowest_index(txrc->sband, sta);
+ else
+ info->control.rates[0].idx =
+ rate_lowest_non_cck_index(txrc->sband, sta);
info->control.rates[0].count =
(info->flags & IEEE80211_TX_CTL_NO_ACK) ?
1 : txrc->hw->max_rate_tries;
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 6f09eca..830e60f 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -660,7 +660,8 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
local->scan_req->ssids[i].ssid,
local->scan_req->ssids[i].ssid_len,
local->scan_req->ie, local->scan_req->ie_len,
- local->scan_req->rates[band], false);
+ local->scan_req->rates[band], false,
+ local->scan_req->no_cck);
/*
* After sending probe requests, wait for probe responses
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 4b1466d..ead345d 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -899,14 +899,18 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len,
- u32 ratemask, bool directed)
+ u32 ratemask, bool directed, bool no_cck)
{
struct sk_buff *skb;
skb = ieee80211_build_probe_req(sdata, dst, ratemask, ssid, ssid_len,
ie, ie_len, directed);
- if (skb)
+ if (skb) {
+ if (no_cck)
+ IEEE80211_SKB_CB(skb)->flags |=
+ IEEE80211_TX_CTL_NO_CCK_RATE;
ieee80211_tx_skb(sdata, skb);
+ }
}
u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index bac3439..af374fa 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -458,7 +458,7 @@ ieee80211_direct_probe(struct ieee80211_work *wk)
*/
ieee80211_send_probe_req(sdata, NULL, wk->probe_auth.ssid,
wk->probe_auth.ssid_len, NULL, 0,
- (u32) -1, true);
+ (u32) -1, true, false);
wk->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
run_again(local, wk->timeout);
--
1.7.6.3
^ permalink raw reply related
* [PATCH v2 1/2] nl80211/cfg80211: Add support to disable CCK rate for management frame
From: Rajkumar Manoharan @ 2011-09-25 9:23 UTC (permalink / raw)
To: johannes; +Cc: linville, linux-wireless, Rajkumar Manoharan, Jouni Malinen
Add a new nl80211 attribute to specify whether to send the management
frames in CCK rate or not. As of now the wpa_supplicant is disabling
CCK rate at P2P init itself. So this patch helps to send P2P probe
request/probe response/action frames being sent at non CCK rate in 2GHz
without disabling 11b rates.
This attribute is used with NL80211_CMD_TRIGGER_SCAN and
NL80211_CMD_FRAME commands to disable CCK rate for management frame
transmission.
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
include/linux/nl80211.h | 13 +++++++++++++
include/net/cfg80211.h | 5 ++++-
net/mac80211/cfg.c | 3 ++-
net/wireless/core.h | 3 ++-
net/wireless/mlme.c | 5 +++--
net/wireless/nl80211.c | 9 ++++++++-
6 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 460b12a..c73582f 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -238,6 +238,8 @@
*
* @NL80211_CMD_GET_SCAN: get scan results
* @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
+ * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
+ * probe requests at CCK rate or not.
* @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
* NL80211_CMD_GET_SCAN and on the "scan" multicast group)
* @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
@@ -432,6 +434,8 @@
* specified using %NL80211_ATTR_DURATION. When called, this operation
* returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the
* TX status event pertaining to the TX request.
+ * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
+ * management frames at CCK rate or not in 2GHz band.
* @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
* command may be used with the corresponding cookie to cancel the wait
* time if it is known that it is no longer necessary.
@@ -1078,6 +1082,13 @@ enum nl80211_commands {
* @NL80211_ATTR_PMKSA_CANDIDATE: Nested attribute containing the PMKSA caching
* candidate information, see &enum nl80211_pmksa_candidate_attr.
*
+ * @NL80211_ATTR_TX_NO_CCK_RATE: Indicates whether to use CCK rate or not
+ * for management frames transmission. In order to avoid p2p probe/action
+ * frames are being transmitted at CCK rate in 2GHz band, the user space
+ * applications use this attribute.
+ * This attribute is used with %NL80211_CMD_TRIGGER_SCAN and
+ * %NL80211_CMD_FRAME commands.
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1298,6 +1309,8 @@ enum nl80211_attrs {
NL80211_ATTR_PMKSA_CANDIDATE,
+ NL80211_ATTR_TX_NO_CCK_RATE,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ccfdf3f..c1dd56b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -860,6 +860,7 @@ struct cfg80211_ssid {
* @wiphy: the wiphy this was for
* @dev: the interface
* @aborted: (internal) scan request was notified as aborted
+ * @no_cck: used to send probe requests at non CCK rate in 2GHz band
*/
struct cfg80211_scan_request {
struct cfg80211_ssid *ssids;
@@ -874,6 +875,7 @@ struct cfg80211_scan_request {
struct wiphy *wiphy;
struct net_device *dev;
bool aborted;
+ bool no_cck;
/* keep last */
struct ieee80211_channel *channels[0];
@@ -1560,7 +1562,8 @@ struct cfg80211_ops {
struct ieee80211_channel *chan, bool offchan,
enum nl80211_channel_type channel_type,
bool channel_type_valid, unsigned int wait,
- const u8 *buf, size_t len, u64 *cookie);
+ const u8 *buf, size_t len, bool no_cck,
+ u64 *cookie);
int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy,
struct net_device *dev,
u64 cookie);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index b57ddf9..9cba010 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1869,7 +1869,8 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_channel *chan, bool offchan,
enum nl80211_channel_type channel_type,
bool channel_type_valid, unsigned int wait,
- const u8 *buf, size_t len, u64 *cookie)
+ const u8 *buf, size_t len, bool no_cck,
+ u64 *cookie)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 796a4bd..a472d60 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -375,7 +375,8 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
struct ieee80211_channel *chan, bool offchan,
enum nl80211_channel_type channel_type,
bool channel_type_valid, unsigned int wait,
- const u8 *buf, size_t len, u64 *cookie);
+ const u8 *buf, size_t len, bool no_cck,
+ u64 *cookie);
/* SME */
int __cfg80211_connect(struct cfg80211_registered_device *rdev,
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 61adea5..21fc970 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -900,7 +900,8 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
struct ieee80211_channel *chan, bool offchan,
enum nl80211_channel_type channel_type,
bool channel_type_valid, unsigned int wait,
- const u8 *buf, size_t len, u64 *cookie)
+ const u8 *buf, size_t len, bool no_cck,
+ u64 *cookie)
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
const struct ieee80211_mgmt *mgmt;
@@ -991,7 +992,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
/* Transmit the Action frame as requested by user space */
return rdev->ops->mgmt_tx(&rdev->wiphy, dev, chan, offchan,
channel_type, channel_type_valid,
- wait, buf, len, cookie);
+ wait, buf, len, no_cck, cookie);
}
bool cfg80211_rx_mgmt(struct net_device *dev, int freq, const u8 *buf,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index c26a1da..eba88c7e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -191,6 +191,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
.len = IEEE80211_MAX_DATA_LEN },
[NL80211_ATTR_ROAM_SUPPORT] = { .type = NLA_FLAG },
[NL80211_ATTR_SCHED_SCAN_MATCH] = { .type = NLA_NESTED },
+ [NL80211_ATTR_TX_NO_CCK_RATE] = { .type = NLA_FLAG },
};
/* policy for the key attributes */
@@ -3620,6 +3621,9 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
}
}
+ request->no_cck =
+ nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]);
+
request->dev = dev;
request->wiphy = &rdev->wiphy;
@@ -5192,6 +5196,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
struct sk_buff *msg;
unsigned int wait = 0;
bool offchan;
+ bool no_cck;
if (!info->attrs[NL80211_ATTR_FRAME] ||
!info->attrs[NL80211_ATTR_WIPHY_FREQ])
@@ -5228,6 +5233,8 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
offchan = info->attrs[NL80211_ATTR_OFFCHANNEL_TX_OK];
+ no_cck = nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]);
+
freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
chan = rdev_freq_to_chan(rdev, freq, channel_type);
if (chan == NULL)
@@ -5248,7 +5255,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
channel_type_valid, wait,
nla_data(info->attrs[NL80211_ATTR_FRAME]),
nla_len(info->attrs[NL80211_ATTR_FRAME]),
- &cookie);
+ no_cck, &cookie);
if (err)
goto free_msg;
--
1.7.6.3
^ permalink raw reply related
* Re: [PATCH 2/2] mac80211: Send the management frame at requested rate
From: Rajkumar Manoharan @ 2011-09-25 9:21 UTC (permalink / raw)
To: Eliad Peller; +Cc: johannes, linville, linux-wireless, Jouni Malinen
In-Reply-To: <CAB3XZEf0A4fVCrLoCTGy+XndSW412rwTcUyL9tQ6YjoDsYonyA@mail.gmail.com>
On Sun, Sep 25, 2011 at 11:58:47AM +0300, Eliad Peller wrote:
> On Fri, Sep 23, 2011 at 6:12 PM, Rajkumar Manoharan
> <rmanohar@qca.qualcomm.com> wrote:
> > Whenever the scan request or tx_mgmt is requesting not to
> > use CCK rate for managemet frames through
> > NL80211_ATTR_TX_NO_CCK_RATE attribute, then mac80211 should
> > select appropriate least non-CCK rate. This could help to
> > send P2P probes and P2P action frames at non 11b rates
> > without diabling 11b rates globally.
> >
> > Cc: Jouni Malinen <jouni@qca.qualcomm.com>
> > Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
> > ---
> [...]
>
> > +static inline s8
> > +rate_lowest_non_cck_index(struct ieee80211_supported_band *sband,
> > + struct ieee80211_sta *sta)
> > +{
> > + int i;
> > +
> > + for (i = 0; i < sband->n_bitrates; i++) {
> > + struct ieee80211_rate *srate = &sband->bitrates[i];
> > + if ((srate->bitrate == 10) || (srate->bitrate == 20) ||
> > + (srate->bitrate == 55) || (srate->bitrate == 110))
> > + continue;
> > +
> > + if ((i != sband->n_bitrates) &&
> > + rate_supported(sta, sband->band, i))
> > + return i;
>
> the first condition seems redundant (according to the loop condition,
> i < sband->n_bitrates)
Yeah. i missed it ;)
--
Rajkumar
^ permalink raw reply
* Re: [PATCH 2/2] mac80211: Send the management frame at requested rate
From: Eliad Peller @ 2011-09-25 8:58 UTC (permalink / raw)
To: Rajkumar Manoharan; +Cc: johannes, linville, linux-wireless, Jouni Malinen
In-Reply-To: <1316790779-8955-2-git-send-email-rmanohar@qca.qualcomm.com>
On Fri, Sep 23, 2011 at 6:12 PM, Rajkumar Manoharan
<rmanohar@qca.qualcomm.com> wrote:
> Whenever the scan request or tx_mgmt is requesting not to
> use CCK rate for managemet frames through
> NL80211_ATTR_TX_NO_CCK_RATE attribute, then mac80211 should
> select appropriate least non-CCK rate. This could help to
> send P2P probes and P2P action frames at non 11b rates
> without diabling 11b rates globally.
>
> Cc: Jouni Malinen <jouni@qca.qualcomm.com>
> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
> ---
[...]
> +static inline s8
> +rate_lowest_non_cck_index(struct ieee80211_supported_band *sband,
> + struct ieee80211_sta *sta)
> +{
> + int i;
> +
> + for (i = 0; i < sband->n_bitrates; i++) {
> + struct ieee80211_rate *srate = &sband->bitrates[i];
> + if ((srate->bitrate == 10) || (srate->bitrate == 20) ||
> + (srate->bitrate == 55) || (srate->bitrate == 110))
> + continue;
> +
> + if ((i != sband->n_bitrates) &&
> + rate_supported(sta, sband->band, i))
> + return i;
the first condition seems redundant (according to the loop condition,
i < sband->n_bitrates)
Eliad.
^ permalink raw reply
* Compat-wireless release for 2011-09-24 is baked
From: Compat-wireless cronjob account @ 2011-09-24 19:02 UTC (permalink / raw)
To: linux-wireless
>From git://github.com/mcgrof/compat
8331446..ebcc042 master -> origin/master
compat-wireless code metrics
812386 - Total upstream lines of code being pulled
2397 - backport code changes
2086 - backport code additions
311 - backport code deletions
8559 - backport from compat module
10956 - total backport code
1.3486 - % of code consists of backport work
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(601) [sender=3.0.7]
^ permalink raw reply
* Re: Bug in rt2800pci on an RT3090
From: Bernhard M. Wiedemann @ 2011-09-24 18:53 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Larry Finger, wireless, Ivo van Drn, Gertjan van Wingerde,
Helmut Schaa, users@rt2x00.serialmonkey.com
In-Reply-To: <20110924163007.GA10001@redhat.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 24.09.2011 18:30, schrieb Stanislaw Gruszka:
> On Fri, Sep 23, 2011 at 03:39:03PM -0500, Larry Finger wrote:
>> A bug was sent to me concerning a scheduling-while-atomic-BUG.
>> This happened shortly after KDE suspended an eeepc1015PE netbook
>> during system update over WLAN. Suspend&resume normally worked
>> allright. The OP is Berhard Wiedemann in the Cc list. Inquiries
>> for more info go to him.
>
> It looks like we forgot to unlock spinlock somewhere or we do not
> use _irqsave version of spinlock where needed, but provided
> calltrace is not naught to find the bug.
>
> I suggest compile kernel with CONFIG_LOCKDEP, try to reproduce and
> see if we do get some more messages.
>
> Stanislaw
Hi Stanislaw,
the kernel config already has
CONFIG_LOCKDEP_SUPPORT=y
Is that what you meant? Does it need any extra to activate?
meanwhile I had a similar bug on rc6 hours after resuming.
This time it had some additional soft lockup messages ontop. see
http://www.zq1.de/~bernhard/temp/dmesg.bug
Ciao
Bernhard M. Wiedemann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk5+JzgACgkQSTYLOx37oWQX1QCghshrnkuGt+CVmvVqlyeAD0wk
HMUAoK1GvzR0tvBokCSdZv8elrA2SZCE
=6u+w
-----END PGP SIGNATURE-----
^ permalink raw reply
* RE: higher N rates
From: Arend Van Spriel @ 2011-09-24 18:09 UTC (permalink / raw)
To: Pat Erley, James; +Cc: linux-wireless Mailing List
In-Reply-To: <4E7DF8BB.1040807@erley.org>
> From: linux-wireless-owner@vger.kernel.org [mailto:linux-wireless-
> owner@vger.kernel.org] On Behalf Of Pat Erley
> Sent: zaterdag 24 september 2011 17:35
>
> On 09/23/2011 11:30 PM, James wrote:
> > $ iw dev wlan0 scan
> >
> > printed this for my N (only) router:
> >
> > Supported rates: 1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0
> > Extended supported rates: 6.0 9.0 12.0 48.0
> >
> > Why doesn't it print the higher N rates?
>
> I may be WAY off base here, but I believe iw dev wlan0 scan reports
> what's shown in the beacons, and not what rates are actually
> negotiable.
> Beacons only directly advertise 'pre-n' rates (the basic 802.11abg
> rates).
I think you pretty close to base here ;-)
> If you look at more of the scan results, you should see something like:
>
> HT capabilities:
> Capabilities: 0x11ce
> HT20/HT40
> SM Power Save disabled
> RX HT40 SGI
> TX STBC
> RX STBC 1-stream
> Max AMSDU length: 3839 bytes
> DSSS/CCK HT40
> Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
> Minimum RX AMPDU time spacing: 8 usec (0x06)
> HT TX/RX MCS rate indexes supported: 0-15
The 11n rates are expressed in MCS (Modulation and Coding Scheme) rate
indexes, which translate to a bitrate. So it also advertises 11n rates
albeit in a slightly different format.
Gr. AvS
^ permalink raw reply
* Re: iwl4965: "MAC is in deep sleep!" freezes
From: Stanislaw Gruszka @ 2011-09-24 16:50 UTC (permalink / raw)
To: Christoph Anton Mitterer
Cc: Jonathan Nieder, linux-wireless, John W. Linville, Greg Dietsche,
linux-kernel
In-Reply-To: <20110908161955.GA9171@redhat.com>
On Thu, Sep 08, 2011 at 06:19:56PM +0200, Stanislaw Gruszka wrote:
> On Thu, Sep 08, 2011 at 10:49:13AM +0200, Stanislaw Gruszka wrote:
> > On Mon, Sep 05, 2011 at 09:42:01AM +0000, Christoph Anton Mitterer wrote:
> > > On Mon, 5 Sep 2011 11:19:18 +0200, Stanislaw Gruszka <sgruszka@redhat.com>
> > > wrote:
> > > > this look like firmware hang. This happen just after module load, that's
> > > > good news, because it allow to log relative small amount debug messages
> > > > to see what possibly driver do wrong to crash firmware.
> > > Note, that the effects of - usually but not always - frozen system while
> > > the errors are printed (sometimes keyboard input seems still be possible
> > > during that) ... happen over and over again... say about every 10 minutes
> > > or so.
> > > Not just the first time the modules is loaded.
> > > Is the firmware loaded over and over again?
> > I think is not, but even if is, kernel should not crash. Can you grab
> > crash logs using photo camera, serial cable or netconsole, to allow to
> > see where exactly crash happen and fix it.
> >
> > > > Please configure syslog to log kernel debug messages.
> > > Will mail it later.
> >
> > Firmware hang seems to happen when REPLY_LEDS_CMD command is send.
> > No idea if attached patch could help or not, but is worth to try it.
> > It prevent to send LED command asynchronously, when possibly some
> > other commands are pending in firmware.
> >
> > If it does not help, please provide the same way captured debug
> > messages from 2.6.38 kernel, where drivers works. I'll compare
> > it with broken driver logs to figure out what broken driver
> > do differently.
>
> Sorry, forgot attch the patch, do it now.
Any feedback here?
Stanislaw
> diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-led.c b/drivers/net/wireless/iwlegacy/iwl-3945-led.c
> index abd9235..127ffd6 100644
> --- a/drivers/net/wireless/iwlegacy/iwl-3945-led.c
> +++ b/drivers/net/wireless/iwlegacy/iwl-3945-led.c
> @@ -52,8 +52,7 @@ static int iwl3945_send_led_cmd(struct iwl_priv *priv,
> .id = REPLY_LEDS_CMD,
> .len = sizeof(struct iwl_led_cmd),
> .data = led_cmd,
> - .flags = CMD_ASYNC,
> - .callback = NULL,
> + .flags = CMD_SYNC,
> };
>
> return iwl_legacy_send_cmd(priv, &cmd);
> diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-led.c b/drivers/net/wireless/iwlegacy/iwl-4965-led.c
> index 26d324e..2545c19 100644
> --- a/drivers/net/wireless/iwlegacy/iwl-4965-led.c
> +++ b/drivers/net/wireless/iwlegacy/iwl-4965-led.c
> @@ -51,8 +51,7 @@ iwl4965_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd)
> .id = REPLY_LEDS_CMD,
> .len = sizeof(struct iwl_led_cmd),
> .data = led_cmd,
> - .flags = CMD_ASYNC,
> - .callback = NULL,
> + .flags = CMD_SYNC,
> };
> u32 reg;
>
> diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h b/drivers/net/wireless/iwlegacy/iwl-dev.h
> index 9c786ed..2623c79 100644
> --- a/drivers/net/wireless/iwlegacy/iwl-dev.h
> +++ b/drivers/net/wireless/iwlegacy/iwl-dev.h
> @@ -1211,6 +1211,8 @@ struct iwl_priv {
> struct delayed_work alive_start;
> struct delayed_work scan_check;
>
> + struct work_struct led_work;
> +
> /* TX Power */
> s8 tx_power_user_lmt;
> s8 tx_power_device_lmt;
> diff --git a/drivers/net/wireless/iwlegacy/iwl-led.c b/drivers/net/wireless/iwlegacy/iwl-led.c
> index bda0d61..2152d87 100644
> --- a/drivers/net/wireless/iwlegacy/iwl-led.c
> +++ b/drivers/net/wireless/iwlegacy/iwl-led.c
> @@ -106,13 +106,6 @@ static int iwl_legacy_led_cmd(struct iwl_priv *priv,
> .id = IWL_LED_LINK,
> .interval = IWL_DEF_LED_INTRVL
> };
> - int ret;
> -
> - if (!test_bit(STATUS_READY, &priv->status))
> - return -EBUSY;
> -
> - if (priv->blink_on == on && priv->blink_off == off)
> - return 0;
>
> if (off == 0) {
> /* led is SOLID_ON */
> @@ -126,24 +119,25 @@ static int iwl_legacy_led_cmd(struct iwl_priv *priv,
> led_cmd.off = iwl_legacy_blink_compensation(priv, off,
> priv->cfg->base_params->led_compensation);
>
> - ret = priv->cfg->ops->led->cmd(priv, &led_cmd);
> - if (!ret) {
> - priv->blink_on = on;
> - priv->blink_off = off;
> - }
> - return ret;
> + return priv->cfg->ops->led->cmd(priv, &led_cmd);
> }
>
> static void iwl_legacy_led_brightness_set(struct led_classdev *led_cdev,
> enum led_brightness brightness)
> {
> struct iwl_priv *priv = container_of(led_cdev, struct iwl_priv, led);
> - unsigned long on = 0;
> + unsigned long on = (brightness > 0) ? IWL_LED_SOLID : 0;
>
> - if (brightness > 0)
> - on = IWL_LED_SOLID;
> + if (!test_bit(STATUS_READY, &priv->status))
> + return;
> +
> + if (priv->blink_on == on && priv->blink_off == 0)
> + return;
> +
> + priv->blink_on = on;
> + priv->blink_off = 0;
>
> - iwl_legacy_led_cmd(priv, on, 0);
> + queue_work(priv->workqueue, &priv->led_work);
> }
>
> static int iwl_legacy_led_blink_set(struct led_classdev *led_cdev,
> @@ -152,7 +146,28 @@ static int iwl_legacy_led_blink_set(struct led_classdev *led_cdev,
> {
> struct iwl_priv *priv = container_of(led_cdev, struct iwl_priv, led);
>
> - return iwl_legacy_led_cmd(priv, *delay_on, *delay_off);
> + if (!test_bit(STATUS_READY, &priv->status))
> + return -EBUSY;
> +
> + if (priv->blink_on == *delay_on && priv->blink_off == *delay_off)
> + return 0;
> +
> + /* FIXME: Need spinlock to sync with possibly currently running led work? */
> + priv->blink_on = *delay_on;
> + priv->blink_off = *delay_off;
> +
> + queue_work(priv->workqueue, &priv->led_work);
> +
> + return 0;
> +}
> +
> +static void iwl_legacy_bg_led(struct work_struct *work)
> +{
> + struct iwl_priv *priv = container_of(work, struct iwl_priv, led_work);
> +
> + mutex_lock(&priv->mutex);
> + iwl_legacy_led_cmd(priv, priv->blink_on, priv->blink_off);
> + mutex_unlock(&priv->mutex);
> }
>
> void iwl_legacy_leds_init(struct iwl_priv *priv)
> @@ -160,6 +175,8 @@ void iwl_legacy_leds_init(struct iwl_priv *priv)
> int mode = led_mode;
> int ret;
>
> + INIT_WORK(&priv->led_work, iwl_legacy_bg_led);
> +
> if (mode == IWL_LED_DEFAULT)
> mode = priv->cfg->led_mode;
>
> @@ -202,5 +219,7 @@ void iwl_legacy_leds_exit(struct iwl_priv *priv)
>
> led_classdev_unregister(&priv->led);
> kfree(priv->led.name);
> +
> + cancel_work_sync(&priv->led_work);
> }
> EXPORT_SYMBOL(iwl_legacy_leds_exit);
^ permalink raw reply
* [PATCH] mac80211: max_tp_rate2 management of minstrel_ht
From: Lorenzo Bianconi @ 2011-09-24 16:48 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, linville, Johannes Berg
I noticed a possible issue in the max_tp_rate2 management of
minstrel_ht. In particular, if we look up just among max_tp_rate2 of
each group it will be possible that the selected rate will not be the
mcs with second maximum throughput. I wrote this simple patch.
Regards
Lorenzo
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
---
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -281,6 +281,8 @@
mr = minstrel_get_ratestats(mi, mg->max_tp_rate);
if (cur_tp < mr->cur_tp) {
+ mi->max_tp_rate2 = mi->max_tp_rate;
+ cur_tp2 = cur_tp;
mi->max_tp_rate = mg->max_tp_rate;
cur_tp = mr->cur_tp;
}
--
^ permalink raw reply
* Re: Bug in rt2800pci on an RT3090
From: Stanislaw Gruszka @ 2011-09-24 16:30 UTC (permalink / raw)
To: Larry Finger, Bernhard M. Wiedemann
Cc: wireless, Ivo van Drn, Gertjan van Wingerde, Helmut Schaa,
users@rt2x00.serialmonkey.com
In-Reply-To: <4E7CEE67.2070906@lwfinger.net>
On Fri, Sep 23, 2011 at 03:39:03PM -0500, Larry Finger wrote:
> A bug was sent to me concerning a scheduling-while-atomic-BUG. This
> happened shortly after KDE suspended an eeepc1015PE netbook during
> system update over WLAN. Suspend&resume normally worked allright.
> The OP is Berhard Wiedemann in the Cc list. Inquiries for more info
> go to him.
It looks like we forgot to unlock spinlock somewhere or we do not
use _irqsave version of spinlock where needed, but provided calltrace
is not naught to find the bug.
I suggest compile kernel with CONFIG_LOCKDEP, try to reproduce and see
if we do get some more messages.
Stanislaw
^ permalink raw reply
* Re: higher N rates
From: Pat Erley @ 2011-09-24 15:35 UTC (permalink / raw)
To: James; +Cc: linux-wireless Mailing List
In-Reply-To: <4E7D4EC4.2040506@lockie.ca>
On 09/23/2011 11:30 PM, James wrote:
> $ iw dev wlan0 scan
>
> printed this for my N (only) router:
>
> Supported rates: 1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0
> Extended supported rates: 6.0 9.0 12.0 48.0
>
> Why doesn't it print the higher N rates?
I may be WAY off base here, but I believe iw dev wlan0 scan reports
what's shown in the beacons, and not what rates are actually negotiable.
Beacons only directly advertise 'pre-n' rates (the basic 802.11abg rates).
If you look at more of the scan results, you should see something like:
HT capabilities:
Capabilities: 0x11ce
HT20/HT40
SM Power Save disabled
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-15
HT operation:
* primary channel: 36
* secondary channel offset: above
* STA channel width: any
* RIFS: 0
* HT protection: no
* non-GF present: 0
* OBSS non-GF present: 0
* dual beacon: 0
* dual CTS protection: 0
* STBC beacon: 0
* L-SIG TXOP Prot: 0
* PCO active: 0
* PCO phase: 0
Which outlines the 802.11n parameters that your device and the AP can use
to negotiate 802.11n operation. Perhaps there is something more that should
be reported, but you'll see throughputs in the 802.11n range WHEN it's
warranted. With my DSL connection, I rarely see rates above 9mbit in use (my
DSL is 1.5mbit down).
Pat
^ permalink raw reply
* Re: [PATCH 14/20] staging: brcm80211: remove dongle firmware related debug code
From: Arend van Spriel @ 2011-09-24 14:49 UTC (permalink / raw)
To: Johannes Berg
Cc: Franky (Zhenhui) Lin, devel@linuxdriverproject.org,
gregkh@suse.de, linux-wireless@vger.kernel.org
In-Reply-To: <1316860785.3952.6.camel@jlt3.sipsolutions.net>
On 09/24/2011 12:39 PM, Johannes Berg wrote:
> On Fri, 2011-09-23 at 19:09 -0700, Franky Lin wrote:
>> From: Arend van Spriel<arend@broadcom.com>
>>
>> When the device dies the driver could extract cpu registers on
>> the device to analyze the trap handling on the dongle. As the
>> firmware with this driver is stable this code does not belong
>> in the brcmfmac driver.
>>
>> Reported-by: Johannes Berg<johannes@sipsolutions.net>
> FWIW, when I said this looked strange I might have thought that it was
> actually accessing the *host* registers. I don't remember exactly what I
> said. If this is debug code for the dongle, then maybe it makes sense to
> keep it, maybe optionally. I don't think you'll want to support a
> separate driver just for debug. You could even use nl80211 testmode to
> export it to userspace for your tools.
Thanks, Johannes
Your comment was understood and merely a trigger for us to reconsider
whether we would need it in this driver. As the mechanism has also not
been tested in the brcmfmac driver and we consider the firmware stable,
we decided to remove it.
Gr. AvS
^ permalink raw reply
* Re: [PATCH 09/20] staging: brcm80211: use endian annotated structures in brcmsmac
From: Arend van Spriel @ 2011-09-24 12:34 UTC (permalink / raw)
To: Johannes Berg
Cc: Franky (Zhenhui) Lin, gregkh@suse.de,
devel@linuxdriverproject.org, linux-wireless@vger.kernel.org
In-Reply-To: <1316860721.3952.5.camel@jlt3.sipsolutions.net>
On 09/24/2011 12:38 PM, Johannes Berg wrote:
> On Fri, 2011-09-23 at 19:08 -0700, Franky Lin wrote:
>> struct d11rxhdr {
>> u16 RxFrameSize;
>> u16 PAD;
>> + union {
>> + struct d11rxhdr_le rxh_le;
>> + struct d11rxhdr rxh_cpu;
>> + };
> This seems a little strange. Why would it be both in LE and CPU byte
> order?
Indeed. When we receive it from the device it is in LE and we convert it
to CPU order for further processing using rxh_cpu.
> johannes
Gr. AvS
^ permalink raw reply
* Re: [PATCH 14/20] staging: brcm80211: remove dongle firmware related debug code
From: Johannes Berg @ 2011-09-24 10:39 UTC (permalink / raw)
To: Franky Lin; +Cc: gregkh, devel, linux-wireless
In-Reply-To: <1316830148-28661-15-git-send-email-frankyl@broadcom.com>
On Fri, 2011-09-23 at 19:09 -0700, Franky Lin wrote:
> From: Arend van Spriel <arend@broadcom.com>
>
> When the device dies the driver could extract cpu registers on
> the device to analyze the trap handling on the dongle. As the
> firmware with this driver is stable this code does not belong
> in the brcmfmac driver.
>
> Reported-by: Johannes Berg <johannes@sipsolutions.net>
FWIW, when I said this looked strange I might have thought that it was
actually accessing the *host* registers. I don't remember exactly what I
said. If this is debug code for the dongle, then maybe it makes sense to
keep it, maybe optionally. I don't think you'll want to support a
separate driver just for debug. You could even use nl80211 testmode to
export it to userspace for your tools.
johannes
^ permalink raw reply
* Re: [PATCH 09/20] staging: brcm80211: use endian annotated structures in brcmsmac
From: Johannes Berg @ 2011-09-24 10:38 UTC (permalink / raw)
To: Franky Lin; +Cc: gregkh, devel, linux-wireless
In-Reply-To: <1316830148-28661-10-git-send-email-frankyl@broadcom.com>
On Fri, 2011-09-23 at 19:08 -0700, Franky Lin wrote:
> * RxTSFTime: RxTSFTime time of first MAC symbol + M_PHY_PLCPRX_DLY
> * RxChan: gain code, channel radio code, and phy type
> */
> +struct d11rxhdr_le {
> + __le16 RxFrameSize;
> + u16 PAD;
> + __le16 PhyRxStatus_0;
> + __le16 PhyRxStatus_1;
> + __le16 PhyRxStatus_2;
> + __le16 PhyRxStatus_3;
> + __le16 PhyRxStatus_4;
> + __le16 PhyRxStatus_5;
> + __le16 RxStatus1;
> + __le16 RxStatus2;
> + __le16 RxTSFTime;
> + __le16 RxChan;
> +} __packed;
> +
> struct d11rxhdr {
> u16 RxFrameSize;
> u16 PAD;
> + union {
> + struct d11rxhdr_le rxh_le;
> + struct d11rxhdr rxh_cpu;
> + };
This seems a little strange. Why would it be both in LE and CPU byte
order?
johannes
^ permalink raw reply
* Re: [PATCH 16/20] staging: brcm80211: declared global vars in softmac phy as const
From: Julian Andres Klode @ 2011-09-24 9:52 UTC (permalink / raw)
To: Franky Lin; +Cc: gregkh, devel, linux-wireless
In-Reply-To: <1316830148-28661-17-git-send-email-frankyl@broadcom.com>
On Fri, Sep 23, 2011 at 07:09:04PM -0700, Franky Lin wrote:
> From: Roland Vossen <rvossen@broadcom.com>
>
> Global variables are undesirable unless they are read only.
>
> Reported-by: Johannes Berg <johannes@sipsolutions.net>
> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
> Reviewed-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Franky Lin <frankyl@broadcom.com>
> ---
> diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c b/drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c
> index 15c5ffc..1b11b2f 100644
> --- a/drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c
> +++ b/drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c
> @@ -1611,7 +1611,7 @@ const u32 dot11lcnphytbl_rx_gain_info_sz_rev0 =
> sizeof(dot11lcnphytbl_rx_gain_info_rev0) /
> sizeof(dot11lcnphytbl_rx_gain_info_rev0[0]);
>
> -static const u32 dot11lcnphytbl_rx_gain_info_sz_rev1 =
> +const u32 dot11lcnphytbl_rx_gain_info_sz_rev1 =
> sizeof(dot11lcnphytbl_rx_gain_info_rev1) /
> sizeof(dot11lcnphytbl_rx_gain_info_rev1[0]);
That seems like an anomaly. In a commit that is supposed
to declare variables as const, the linkage of a variable
changed. Likewise, the removal of extern global variable
declarations in phy_int.h also does not seem to belong
here.
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
^ permalink raw reply
* higher N rates
From: James @ 2011-09-24 3:30 UTC (permalink / raw)
To: linux-wireless Mailing List
$ iw dev wlan0 scan
printed this for my N (only) router:
Supported rates: 1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0
Extended supported rates: 6.0 9.0 12.0 48.0
Why doesn't it print the higher N rates?
^ permalink raw reply
* [PATCH 16/20] staging: brcm80211: declared global vars in softmac phy as const
From: Franky Lin @ 2011-09-24 2:09 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-wireless
In-Reply-To: <1316830148-28661-1-git-send-email-frankyl@broadcom.com>
From: Roland Vossen <rvossen@broadcom.com>
Global variables are undesirable unless they are read only.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
---
drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 16 +-----
drivers/staging/brcm80211/brcmsmac/phy/phy_int.h | 23 --------
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 6 +-
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 60 ++++++++++----------
.../staging/brcm80211/brcmsmac/phy/phytbl_lcn.c | 2 +-
5 files changed, 36 insertions(+), 71 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c
index 3f6e4bc..ab1db2d 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c
@@ -52,7 +52,7 @@ struct chan_info_basic {
u16 freq;
};
-static struct chan_info_basic chan_info_all[] = {
+static const struct chan_info_basic chan_info_all[] = {
{1, 2412},
{2, 2417},
{3, 2422},
@@ -111,20 +111,6 @@ static struct chan_info_basic chan_info_all[] = {
{216, 50800}
};
-u16 ltrn_list[PHY_LTRN_LIST_LEN] = {
- 0x18f9, 0x0d01, 0x00e4, 0xdef4, 0x06f1, 0x0ffc,
- 0xfa27, 0x1dff, 0x10f0, 0x0918, 0xf20a, 0xe010,
- 0x1417, 0x1104, 0xf114, 0xf2fa, 0xf7db, 0xe2fc,
- 0xe1fb, 0x13ee, 0xff0d, 0xe91c, 0x171a, 0x0318,
- 0xda00, 0x03e8, 0x17e6, 0xe9e4, 0xfff3, 0x1312,
- 0xe105, 0xe204, 0xf725, 0xf206, 0xf1ec, 0x11fc,
- 0x14e9, 0xe0f0, 0xf2f6, 0x09e8, 0x1010, 0x1d01,
- 0xfad9, 0x0f04, 0x060f, 0xde0c, 0x001c, 0x0dff,
- 0x1807, 0xf61a, 0xe40e, 0x0f16, 0x05f9, 0x18ec,
- 0x0a1b, 0xff1e, 0x2600, 0xffe2, 0x0ae5, 0x1814,
- 0x0507, 0x0fea, 0xe4f2, 0xf6e6
-};
-
const u8 ofdm_rate_lookup[] = {
BRCM_RATE_48M,
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h b/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
index b94117b..f67e2be 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
+++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
@@ -247,9 +247,6 @@ enum phy_cal_mode {
#define PUB_NOT_ASSOC(pi) \
(mboolisset(pi->measure_hold, PHY_HOLD_FOR_NOT_ASSOC))
-#define PHY_LTRN_LIST_LEN 64
-extern u16 ltrn_list[PHY_LTRN_LIST_LEN];
-
struct phy_table_info {
uint table;
int q;
@@ -922,26 +919,6 @@ struct lcnphy_radio_regs {
u8 do_init_g;
};
-extern struct lcnphy_radio_regs lcnphy_radio_regs_2064[];
-extern struct lcnphy_radio_regs lcnphy_radio_regs_2066[];
-
-extern struct radio_regs regs_2055[], regs_SYN_2056[], regs_TX_2056[],
- regs_RX_2056[];
-extern struct radio_regs regs_SYN_2056_A1[], regs_TX_2056_A1[],
- regs_RX_2056_A1[];
-extern struct radio_regs regs_SYN_2056_rev5[], regs_TX_2056_rev5[],
- regs_RX_2056_rev5[];
-extern struct radio_regs regs_SYN_2056_rev6[], regs_TX_2056_rev6[],
- regs_RX_2056_rev6[];
-extern struct radio_regs regs_SYN_2056_rev7[], regs_TX_2056_rev7[],
- regs_RX_2056_rev7[];
-extern struct radio_regs regs_SYN_2056_rev8[], regs_TX_2056_rev8[],
- regs_RX_2056_rev8[];
-
-extern struct radio_20xx_regs regs_2057_rev4[], regs_2057_rev5[],
- regs_2057_rev5v1[];
-extern struct radio_20xx_regs regs_2057_rev7[], regs_2057_rev8[];
-
extern char *phy_getvar(struct brcms_phy *pi, const char *name);
extern int phy_getintvar(struct brcms_phy *pi, const char *name);
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
index fdcea56..a87e392 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
@@ -558,7 +558,7 @@ struct chan_info_2064_lcnphy {
u8 rxrf_rxrf_spare1;
};
-static struct chan_info_2064_lcnphy chan_info_2064_lcnphy[] = {
+static const struct chan_info_2064_lcnphy chan_info_2064_lcnphy[] = {
{1, 2412, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
{2, 2417, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
{3, 2422, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
@@ -575,7 +575,7 @@ static struct chan_info_2064_lcnphy chan_info_2064_lcnphy[] = {
{14, 2484, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
};
-struct lcnphy_radio_regs lcnphy_radio_regs_2064[] = {
+static const struct lcnphy_radio_regs lcnphy_radio_regs_2064[] = {
{0x00, 0, 0, 0, 0},
{0x01, 0x64, 0x64, 0, 0},
{0x02, 0x20, 0x20, 0, 0},
@@ -4489,7 +4489,7 @@ static void wlc_lcnphy_rc_cal(struct brcms_phy *pi)
static void wlc_radio_2064_init(struct brcms_phy *pi)
{
u32 i;
- struct lcnphy_radio_regs *lcnphyregs = NULL;
+ const struct lcnphy_radio_regs *lcnphyregs = NULL;
lcnphyregs = lcnphy_radio_regs_2064;
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_n.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
index 224ce06..e080b3a 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
@@ -443,7 +443,7 @@ struct nphy_sfo_cfg {
u16 PHY_BW6;
};
-static struct chan_info_nphy_2055 chan_info_nphy_2055[] = {
+static const struct chan_info_nphy_2055 chan_info_nphy_2055[] = {
{
184, 4920, 3280, 0x71, 0x01, 0xEC, 0x0F, 0xFF, 0x01, 0x04, 0x0A,
0x00, 0x8F, 0xFF, 0xFF, 0xFF, 0x00, 0x0F, 0x0F, 0x8F, 0xFF, 0x00, 0x0F,
@@ -942,7 +942,7 @@ static struct chan_info_nphy_2055 chan_info_nphy_2055[] = {
0x01, 0x80, 0x3E6, 0x3E2, 0x3DE, 0x41B, 0x41F, 0x424}
};
-static struct chan_info_nphy_radio205x chan_info_nphyrev3_2056[] = {
+static const struct chan_info_nphy_radio205x chan_info_nphyrev3_2056[] = {
{
184, 4920, 0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04, 0x0c, 0x01,
0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, 0xff, 0xff, 0x00, 0x08, 0x00, 0x7f,
@@ -1565,7 +1565,7 @@ static struct chan_info_nphy_radio205x chan_info_nphyrev3_2056[] = {
0x0f, 0x00, 0x0d, 0x03e6, 0x03e2, 0x03de, 0x041b, 0x041f, 0x0424}
};
-static struct chan_info_nphy_radio205x chan_info_nphyrev4_2056_A1[] = {
+static const struct chan_info_nphy_radio205x chan_info_nphyrev4_2056_A1[] = {
{
184, 4920, 0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04, 0x0c, 0x01,
0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, 0xff, 0xff, 0x00, 0x0e, 0x00, 0x7f,
@@ -2188,7 +2188,7 @@ static struct chan_info_nphy_radio205x chan_info_nphyrev4_2056_A1[] = {
0x0f, 0x00, 0x0e, 0x03e6, 0x03e2, 0x03de, 0x041b, 0x041f, 0x0424}
};
-static struct chan_info_nphy_radio205x chan_info_nphyrev5_2056v5[] = {
+static const struct chan_info_nphy_radio205x chan_info_nphyrev5_2056v5[] = {
{
184, 4920, 0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04, 0x0c, 0x01,
0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, 0xff, 0xff, 0x00, 0x0b, 0x00, 0x70,
@@ -2811,7 +2811,7 @@ static struct chan_info_nphy_radio205x chan_info_nphyrev5_2056v5[] = {
0x0d, 0x00, 0x08, 0x03e6, 0x03e2, 0x03de, 0x041b, 0x041f, 0x0424}
};
-static struct chan_info_nphy_radio205x chan_info_nphyrev6_2056v6[] = {
+static const struct chan_info_nphy_radio205x chan_info_nphyrev6_2056v6[] = {
{
184, 4920, 0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04, 0x0c, 0x01,
0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, 0xff, 0xfe, 0x00, 0x09, 0x00, 0x77,
@@ -3434,7 +3434,7 @@ static struct chan_info_nphy_radio205x chan_info_nphyrev6_2056v6[] = {
0x09, 0x00, 0x09, 0x03e6, 0x03e2, 0x03de, 0x041b, 0x041f, 0x0424}
};
-static struct chan_info_nphy_radio205x chan_info_nphyrev5n6_2056v7[] = {
+static const struct chan_info_nphy_radio205x chan_info_nphyrev5n6_2056v7[] = {
{
184, 4920, 0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04, 0x0c, 0x01,
0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, 0xff, 0xff, 0x00, 0x0b, 0x00, 0x70,
@@ -4057,7 +4057,7 @@ static struct chan_info_nphy_radio205x chan_info_nphyrev5n6_2056v7[] = {
0x0d, 0x00, 0x08, 0x03e6, 0x03e2, 0x03de, 0x041b, 0x041f, 0x0424}
};
-static struct chan_info_nphy_radio205x chan_info_nphyrev6_2056v8[] = {
+static const struct chan_info_nphy_radio205x chan_info_nphyrev6_2056v8[] = {
{
184, 4920, 0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x04, 0x0c, 0x01,
0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, 0xff, 0xfe, 0x00, 0x09, 0x00, 0x77,
@@ -4680,7 +4680,7 @@ static struct chan_info_nphy_radio205x chan_info_nphyrev6_2056v8[] = {
0x09, 0x00, 0x09, 0x03e6, 0x03e2, 0x03de, 0x041b, 0x041f, 0x0424}
};
-static struct chan_info_nphy_radio205x chan_info_nphyrev6_2056v11[] = {
+static const struct chan_info_nphy_radio205x chan_info_nphyrev6_2056v11[] = {
{
184, 4920, 0xff, 0x01, 0x01, 0x01, 0xec, 0x05, 0x05, 0x02, 0x0c, 0x01,
0x00, 0x00, 0x00, 0x8f, 0x0f, 0x00, 0xff, 0xfe, 0x00, 0x09, 0x00, 0x77,
@@ -5303,7 +5303,7 @@ static struct chan_info_nphy_radio205x chan_info_nphyrev6_2056v11[] = {
0x09, 0x00, 0x09, 0x03e6, 0x03e2, 0x03de, 0x041b, 0x041f, 0x0424}
};
-static struct chan_info_nphy_radio2057 chan_info_nphyrev7_2057_rev4[] = {
+static const struct chan_info_nphy_radio2057 chan_info_nphyrev7_2057_rev4[] = {
{
184, 4920, 0x68, 0x16, 0x10, 0x0c, 0x0c, 0x0c, 0x30, 0xec, 0x01, 0x0f,
0x00, 0x0f, 0x00, 0xff, 0x00, 0x00, 0x0f, 0x0f, 0xf3, 0x00, 0xef, 0x00,
@@ -6166,7 +6166,8 @@ static struct chan_info_nphy_radio2057 chan_info_nphyrev7_2057_rev4[] = {
0x0424}
};
-static struct chan_info_nphy_radio2057_rev5 chan_info_nphyrev8_2057_rev5[] = {
+static const struct chan_info_nphy_radio2057_rev5
+chan_info_nphyrev8_2057_rev5[] = {
{
1, 2412, 0x48, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x6c, 0x09, 0x0d,
0x08, 0x0e, 0x61, 0x03, 0xff, 0x61, 0x03, 0xff, 0x03c9, 0x03c5, 0x03c1,
@@ -6225,7 +6226,8 @@ static struct chan_info_nphy_radio2057_rev5 chan_info_nphyrev8_2057_rev5[] = {
0x041b, 0x041f, 0x0424}
};
-static struct chan_info_nphy_radio2057_rev5 chan_info_nphyrev9_2057_rev5v1[] = {
+static const struct chan_info_nphy_radio2057_rev5
+chan_info_nphyrev9_2057_rev5v1[] = {
{
1, 2412, 0x48, 0x16, 0x30, 0x1b, 0x0a, 0x0a, 0x30, 0x6c, 0x09, 0x0d,
0x08, 0x0e, 0x61, 0x03, 0xff, 0x61, 0x03, 0xff, 0x03c9, 0x03c5, 0x03c1,
@@ -6284,7 +6286,7 @@ static struct chan_info_nphy_radio2057_rev5 chan_info_nphyrev9_2057_rev5v1[] = {
0x041b, 0x041f, 0x0424}
};
-static struct chan_info_nphy_radio2057 chan_info_nphyrev8_2057_rev7[] = {
+static const struct chan_info_nphy_radio2057 chan_info_nphyrev8_2057_rev7[] = {
{
184, 4920, 0x68, 0x16, 0x10, 0x0c, 0x0c, 0x0c, 0x30, 0xec, 0x01, 0x0f,
0x00, 0x0f, 0x00, 0xff, 0x00, 0xd3, 0x0f, 0x0f, 0xd3, 0x00, 0xff, 0x00,
@@ -7025,7 +7027,7 @@ static struct chan_info_nphy_radio2057 chan_info_nphyrev8_2057_rev7[] = {
0x0424}
};
-static struct chan_info_nphy_radio2057 chan_info_nphyrev8_2057_rev8[] = {
+static const struct chan_info_nphy_radio2057 chan_info_nphyrev8_2057_rev8[] = {
{
186, 4930, 0x6b, 0x16, 0x10, 0x0c, 0x0c, 0x0c, 0x30, 0xed, 0x01, 0x0f,
0x00, 0x0f, 0x00, 0xff, 0x00, 0xd3, 0x0f, 0x0f, 0xd3, 0x00, 0xff, 0x00,
@@ -20387,15 +20389,15 @@ void wlc_phy_switch_radio_nphy(struct brcms_phy *pi, bool on)
static bool
wlc_phy_chan2freq_nphy(struct brcms_phy *pi, uint channel, int *f,
- struct chan_info_nphy_radio2057 **t0,
- struct chan_info_nphy_radio205x **t1,
- struct chan_info_nphy_radio2057_rev5 **t2,
- struct chan_info_nphy_2055 **t3)
+ const struct chan_info_nphy_radio2057 **t0,
+ const struct chan_info_nphy_radio205x **t1,
+ const struct chan_info_nphy_radio2057_rev5 **t2,
+ const struct chan_info_nphy_2055 **t3)
{
uint i;
- struct chan_info_nphy_radio2057 *chan_info_tbl_p_0 = NULL;
- struct chan_info_nphy_radio205x *chan_info_tbl_p_1 = NULL;
- struct chan_info_nphy_radio2057_rev5 *chan_info_tbl_p_2 = NULL;
+ const struct chan_info_nphy_radio2057 *chan_info_tbl_p_0 = NULL;
+ const struct chan_info_nphy_radio205x *chan_info_tbl_p_1 = NULL;
+ const struct chan_info_nphy_radio2057_rev5 *chan_info_tbl_p_2 = NULL;
u32 tbl_len = 0;
int freq = 0;
@@ -20550,10 +20552,10 @@ fail:
u8 wlc_phy_get_chan_freq_range_nphy(struct brcms_phy *pi, uint channel)
{
int freq;
- struct chan_info_nphy_radio2057 *t0 = NULL;
- struct chan_info_nphy_radio205x *t1 = NULL;
- struct chan_info_nphy_radio2057_rev5 *t2 = NULL;
- struct chan_info_nphy_2055 *t3 = NULL;
+ const struct chan_info_nphy_radio2057 *t0 = NULL;
+ const struct chan_info_nphy_radio205x *t1 = NULL;
+ const struct chan_info_nphy_radio2057_rev5 *t2 = NULL;
+ const struct chan_info_nphy_2055 *t3 = NULL;
if (channel == 0)
channel = CHSPEC_CHANNEL(pi->radio_chanspec);
@@ -20573,7 +20575,7 @@ u8 wlc_phy_get_chan_freq_range_nphy(struct brcms_phy *pi, uint channel)
static void
wlc_phy_chanspec_radio2055_setup(struct brcms_phy *pi,
- struct chan_info_nphy_2055 *ci)
+ const struct chan_info_nphy_2055 *ci)
{
write_radio_reg(pi, RADIO_2055_PLL_REF, ci->RF_pll_ref);
@@ -21294,10 +21296,10 @@ wlc_phy_chanspec_nphy_setup(struct brcms_phy *pi, u16 chanspec,
void wlc_phy_chanspec_set_nphy(struct brcms_phy *pi, u16 chanspec)
{
int freq;
- struct chan_info_nphy_radio2057 *t0 = NULL;
- struct chan_info_nphy_radio205x *t1 = NULL;
- struct chan_info_nphy_radio2057_rev5 *t2 = NULL;
- struct chan_info_nphy_2055 *t3 = NULL;
+ const struct chan_info_nphy_radio2057 *t0 = NULL;
+ const struct chan_info_nphy_radio205x *t1 = NULL;
+ const struct chan_info_nphy_radio2057_rev5 *t2 = NULL;
+ const struct chan_info_nphy_2055 *t3 = NULL;
if (!wlc_phy_chan2freq_nphy
(pi, CHSPEC_CHANNEL(chanspec), &freq, &t0, &t1, &t2, &t3))
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c b/drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c
index 15c5ffc..1b11b2f 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c
@@ -1611,7 +1611,7 @@ const u32 dot11lcnphytbl_rx_gain_info_sz_rev0 =
sizeof(dot11lcnphytbl_rx_gain_info_rev0) /
sizeof(dot11lcnphytbl_rx_gain_info_rev0[0]);
-static const u32 dot11lcnphytbl_rx_gain_info_sz_rev1 =
+const u32 dot11lcnphytbl_rx_gain_info_sz_rev1 =
sizeof(dot11lcnphytbl_rx_gain_info_rev1) /
sizeof(dot11lcnphytbl_rx_gain_info_rev1[0]);
--
1.7.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox