* [RFC 7/7] cfg80211 and nl80211: setting and getting mesh non-peer power mode
From: Ivan Bezyazychnyy @ 2011-10-21 8:37 UTC (permalink / raw)
To: linux-wireless
Signed-off-by: Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
---
include/linux/nl80211.h | 3 +++
net/mac80211/cfg.c | 5 +++++
net/wireless/nl80211.c | 8 ++++++++
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 4f4bfb8..78807f4 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -2015,6 +2015,8 @@ enum nl80211_mesh_power_mode {
* access to a broader network beyond the MBSS. This is done via Root
* Announcement frames.
*
+ * @NL80211_MESHCONF_POWER_MODE: mesh non-peer power mode
+ *
* @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
*
* @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
@@ -2038,6 +2040,7 @@ enum nl80211_meshconf_params {
NL80211_MESHCONF_ELEMENT_TTL,
NL80211_MESHCONF_HWMP_RANN_INTERVAL,
NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
+ NL80211_MESHCONF_POWER_MODE,
/* keep last */
__NL80211_MESHCONF_ATTR_AFTER_LAST,
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 2b0cc2c..e841740 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1227,6 +1227,11 @@ static int ieee80211_update_mesh_config(struct
wiphy *wiphy,
conf->dot11MeshHWMPRannInterval =
nconf->dot11MeshHWMPRannInterval;
}
+ if (_chg_mesh_attr(NL80211_MESHCONF_POWER_MODE, mask)) {
+ conf->power_mode = nconf->power_mode;
+ ieee80211_bss_info_change_notify(sdata,
+ BSS_CHANGED_BEACON);
+ }
return 0;
}
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index c53c8bb..cfa8b0e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3144,6 +3144,8 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
cur_params.dot11MeshHWMPRannInterval);
NLA_PUT_U8(msg, NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
cur_params.dot11MeshGateAnnouncementProtocol);
+ NLA_PUT_U8(msg, NL80211_MESHCONF_POWER_MODE,
+ cur_params.power_mode);
nla_nest_end(msg, pinfoattr);
genlmsg_end(msg, hdr);
return genlmsg_reply(msg, info);
@@ -3174,6 +3176,8 @@ static const struct nla_policy
nl80211_meshconf_params_policy[NL80211_MESHCONF_A
[NL80211_MESHCONF_HWMP_ROOTMODE] = { .type = NLA_U8 },
[NL80211_MESHCONF_HWMP_RANN_INTERVAL] = { .type = NLA_U16 },
[NL80211_MESHCONF_GATE_ANNOUNCEMENTS] = { .type = NLA_U8 },
+
+ [NL80211_MESHCONF_POWER_MODE] = { .type = NLA_U8 },
};
static const struct nla_policy
@@ -3260,6 +3264,10 @@ do {\
dot11MeshGateAnnouncementProtocol, mask,
NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
nla_get_u8);
+ FILL_IN_MESH_PARAM_IF_SET(tb, cfg,
+ power_mode, mask,
+ NL80211_MESHCONF_POWER_MODE,
+ nla_get_u8);
if (mask_out)
*mask_out = mask;
--
1.7.3.4
^ permalink raw reply related
* [RFC 6/7] cfg80211 and nl80211: getting local and peer mesh power modes
From: Ivan Bezyazychnyy @ 2011-10-21 8:37 UTC (permalink / raw)
To: linux-wireless
Signed-off-by: Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
---
include/linux/nl80211.h | 6 ++++++
include/net/cfg80211.h | 10 +++++++++-
net/mac80211/cfg.c | 6 +++++-
net/wireless/nl80211.c | 6 ++++++
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index ce789ce..4f4bfb8 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1552,6 +1552,10 @@ enum nl80211_sta_bss_param {
* containing info as possible, see &enum nl80211_sta_bss_param
* @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
* @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
+ * @NL80211_STA_INFO_LOCAL_MESH_PS_MODE: local mesh STA link-specific power
+ * save mode
+ * @NL80211_STA_INFO_PEER_MESH_PS_MODE: peer mesh STA link-specific power
+ * save mode
* @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
@@ -1574,6 +1578,8 @@ enum nl80211_sta_info {
NL80211_STA_INFO_BSS_PARAM,
NL80211_STA_INFO_CONNECTED_TIME,
NL80211_STA_INFO_STA_FLAGS,
+ NL80211_STA_INFO_LOCAL_MESH_PS_MODE,
+ NL80211_STA_INFO_PEER_MESH_PS_MODE,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 2204222..845937c 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -500,6 +500,8 @@ struct station_parameters {
* @STATION_INFO_CONNECTED_TIME: @connected_time filled
* @STATION_INFO_ASSOC_REQ_IES: @assoc_req_ies filled
* @STATION_INFO_STA_FLAGS: @sta_flags filled
+ * @STATION_INFO_LOCAL_MESH_PS_MODE: @local_ps_mode filled
+ * @STATION_INFO_PEER_MESH_PS_MODE: @peer_ps_mode filled
*/
enum station_info_flags {
STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -520,7 +522,9 @@ enum station_info_flags {
STATION_INFO_BSS_PARAM = 1<<15,
STATION_INFO_CONNECTED_TIME = 1<<16,
STATION_INFO_ASSOC_REQ_IES = 1<<17,
- STATION_INFO_STA_FLAGS = 1<<18
+ STATION_INFO_STA_FLAGS = 1<<18,
+ STATION_INFO_LOCAL_MESH_PS_MODE = 1<<17,
+ STATION_INFO_PEER_MESH_PS_MODE = 1<<18
};
/**
@@ -608,6 +612,8 @@ struct sta_bss_parameters {
* @tx_failed: number of failed transmissions (retries exceeded, no ACK)
* @rx_dropped_misc: Dropped for un-specified reason.
* @bss_param: current BSS parameters
+ * @local_ps_mode: local mesh STA power save mode
+ * @peer_ps_mode: peer mesh STA power save mode
* @generation: generation number for nl80211 dumps.
* This number should increase every time the list of stations
* changes, i.e. when a station is added or removed, so that
@@ -638,6 +644,8 @@ struct station_info {
u32 rx_dropped_misc;
struct sta_bss_parameters bss_param;
struct nl80211_sta_flag_update sta_flags;
+ u8 local_ps_mode;
+ u8 peer_ps_mode;
int generation;
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 78c61ee..2b0cc2c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -388,11 +388,15 @@ static void sta_set_sinfo(struct sta_info *sta,
struct station_info *sinfo)
#ifdef CONFIG_MAC80211_MESH
sinfo->filled |= STATION_INFO_LLID |
STATION_INFO_PLID |
- STATION_INFO_PLINK_STATE;
+ STATION_INFO_PLINK_STATE |
+ STATION_INFO_LOCAL_MESH_PS_MODE |
+ STATION_INFO_PEER_MESH_PS_MODE;
sinfo->llid = le16_to_cpu(sta->llid);
sinfo->plid = le16_to_cpu(sta->plid);
sinfo->plink_state = sta->plink_state;
+ sinfo->local_ps_mode = sta->local_ps_mode;
+ sinfo->peer_ps_mode = sta->peer_ps_mode;
#endif
}
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 80bc2a7..c53c8bb 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2325,6 +2325,12 @@ static int nl80211_send_station(struct sk_buff
*msg, u32 pid, u32 seq,
if (sinfo->filled & STATION_INFO_TX_FAILED)
NLA_PUT_U32(msg, NL80211_STA_INFO_TX_FAILED,
sinfo->tx_failed);
+ if (sinfo->filled & STATION_INFO_LOCAL_MESH_PS_MODE)
+ NLA_PUT_U8(msg, NL80211_STA_INFO_LOCAL_MESH_PS_MODE,
+ sinfo->local_ps_mode);
+ if (sinfo->filled & STATION_INFO_PEER_MESH_PS_MODE)
+ NLA_PUT_U8(msg, NL80211_STA_INFO_PEER_MESH_PS_MODE,
+ sinfo->peer_ps_mode);
if (sinfo->filled & STATION_INFO_BSS_PARAM) {
bss_param = nla_nest_start(msg, NL80211_STA_INFO_BSS_PARAM);
if (!bss_param)
--
1.7.3.4
^ permalink raw reply related
* [RFC 5/7] cfg80211 and nl80211: Setting local link-specific power mode
From: Ivan Bezyazychnyy @ 2011-10-21 8:37 UTC (permalink / raw)
To: linux-wireless
Signed-off-by: Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
---
include/linux/nl80211.h | 3 +++
include/net/cfg80211.h | 2 ++
net/mac80211/cfg.c | 5 +++++
net/wireless/nl80211.c | 8 ++++++++
4 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 001e9e3..ce789ce 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1054,6 +1054,7 @@ enum nl80211_commands {
* %NL80211_ATTR_SUPPORTED_IFTYPES) containing the interface types that
* are managed in software: interfaces of these types aren't subject to
* any restrictions in their number or combinations.
+ * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power mode
*
* @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information
* necessary for GTK rekeying in the device, see &enum nl80211_rekey_data.
@@ -1337,6 +1338,8 @@ enum nl80211_attrs {
NL80211_ATTR_TDLS_SUPPORT,
NL80211_ATTR_TDLS_EXTERNAL_SETUP,
+ NL80211_ATTR_LOCAL_MESH_POWER_MODE,
+
/* 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 e00e04e..2204222 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -456,6 +456,7 @@ enum station_parameters_apply_mask {
* as the AC bitmap in the QoS info field
* @max_sp: max Service Period. same format as the MAX_SP in the
* QoS info field (but already shifted down)
+ * @local_ps_mode: local link-specific mesh power save mode
*/
struct station_parameters {
u8 *supported_rates;
@@ -470,6 +471,7 @@ struct station_parameters {
struct ieee80211_ht_cap *ht_capa;
u8 uapsd_queues;
u8 max_sp;
+ u8 local_ps_mode;
};
/**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index e253afa..78c61ee 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -804,6 +804,11 @@ static void sta_apply_parameters(struct
ieee80211_local *local,
mesh_plink_block(sta);
break;
}
+
+ if (params->local_ps_mode) {
+ ieee80211s_set_local_ps_mode(sta,
+ params->local_ps_mode);
+ }
#endif
}
}
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 48260c2..80bc2a7 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2517,6 +2517,10 @@ static int nl80211_set_station(struct sk_buff
*skb, struct genl_info *info)
params.plink_state =
nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_STATE]);
+ if (info->attrs[NL80211_ATTR_LOCAL_MESH_POWER_MODE])
+ params.local_ps_mode =
+ nla_get_u8(info->attrs[NL80211_ATTR_LOCAL_MESH_POWER_MODE]);
+
err = get_vlan(info, rdev, ¶ms.vlan);
if (err)
goto out;
@@ -2531,6 +2535,8 @@ static int nl80211_set_station(struct sk_buff
*skb, struct genl_info *info)
/* disallow mesh-specific things */
if (params.plink_action)
err = -EINVAL;
+ if (params.local_ps_mode)
+ err = -EINVAL;
break;
case NL80211_IFTYPE_P2P_CLIENT:
case NL80211_IFTYPE_STATION:
@@ -2554,6 +2560,8 @@ static int nl80211_set_station(struct sk_buff
*skb, struct genl_info *info)
if (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) &&
(params.sta_flags_mask & BIT(NL80211_STA_FLAG_TDLS_PEER)))
err = -EINVAL;
+ if (params.local_ps_mode)
+ err = -EINVAL;
break;
case NL80211_IFTYPE_MESH_POINT:
/* disallow things mesh doesn't support */
--
1.7.3.4
^ permalink raw reply related
* [RFC 4/7] mac80211: setting link-specific mesh power modes when plink open
From: Ivan Bezyazychnyy @ 2011-10-21 8:37 UTC (permalink / raw)
To: linux-wireless
Setting peer link-specific power mode equal to peer non-peer power mode
value and local link-specific power mode equal to local non-peer value
Signed-off-by: Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
---
net/mac80211/mesh.c | 33 +++++++++++++++++++++++++++++++++
net/mac80211/mesh.h | 6 ++++++
net/mac80211/mesh_plink.c | 22 +++++++++++++++++++++-
3 files changed, 60 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index c16a203..275f2cf 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -387,6 +387,39 @@ void ieee80211_mesh_root_setup(struct
ieee80211_if_mesh *ifmsh)
}
}
+void ieee80211s_set_local_ps_mode(struct sta_info *sta, u8 pm)
+{
+ switch (pm) {
+ case NL80211_MESH_POWER_ACTIVE:
+ sta->local_ps_mode = NL80211_MESH_POWER_ACTIVE;
+#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
+ printk(KERN_DEBUG "%s: local STA operates in active mode with STA %pM\n",
+ sta->sdata->name, sta->sta.addr);
+#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
+ break;
+ case NL80211_MESH_POWER_LIGHT_SLEEP:
+ sta->local_ps_mode = NL80211_MESH_POWER_LIGHT_SLEEP;
+#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
+ printk(KERN_DEBUG "%s: local STA operates in light sleep mode with
STA %pM\n",
+ sta->sdata->name, sta->sta.addr);
+#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
+ break;
+ case NL80211_MESH_POWER_DEEP_SLEEP:
+ sta->local_ps_mode = NL80211_MESH_POWER_DEEP_SLEEP;
+#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
+ printk(KERN_DEBUG "%s: local STA operates in deep sleep mode with STA %pM\n",
+ sta->sdata->name, sta->sta.addr);
+#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
+ break;
+ default:
+#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
+ printk(KERN_DEBUG "%s: local STA used invalid power mode to operate
with STA %pM\n",
+ sta->sdata->name, sta->sta.addr);
+#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
+ break;
+ }
+}
+
/**
* ieee80211_fill_mesh_addresses - fill addresses of a locally
originated mesh frame
* @hdr: 802.11 frame header
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 188cc86..c67a9f1 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -227,6 +227,7 @@ void ieee80211_stop_mesh(struct
ieee80211_sub_if_data *sdata);
void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh);
void ieee80211s_set_sta_ps_mode(struct sta_info *sta,
enum nl80211_mesh_power_mode mode);
+void ieee80211s_set_local_ps_mode(struct sta_info *sta, u8 pm);
/* Mesh paths */
int mesh_nexthop_lookup(struct sk_buff *skb,
@@ -312,6 +313,11 @@ static inline bool mesh_path_sel_is_hwmp(struct
ieee80211_sub_if_data *sdata)
return sdata->u.mesh.mesh_pp_id == IEEE80211_PATH_PROTOCOL_HWMP;
}
+static inline bool ieee80211s_has_capab_pm(__le16 capab_info)
+{
+ return (capab_info & MESHCONF_CAPAB_PS_LEVEL) != 0;
+}
+
void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local);
void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata);
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 7e57f5d..a8f92f3 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -248,6 +248,8 @@ void mesh_neighbour_update(u8 *hw_addr, u32 rates,
{
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
+ struct ieee80211_mgmt *mgmt = container_of(hw_addr,
+ struct ieee80211_mgmt, sa[0]);
rcu_read_lock();
@@ -275,8 +277,26 @@ void mesh_neighbour_update(u8 *hw_addr, u32 rates,
if (mesh_peer_accepts_plinks(elems) &&
sta->plink_state == NL80211_PLINK_LISTEN &&
sdata->u.mesh.accepting_plinks &&
- sdata->u.mesh.mshcfg.auto_open_plinks)
+ sdata->u.mesh.mshcfg.auto_open_plinks) {
+ if (ieee80211_has_pm(mgmt->frame_control)) {
+ __le16 capab_info = mgmt->u.probe_resp.capab_info;
+ if (ieee80211s_has_capab_pm(capab_info)) {
+ ieee80211s_set_sta_ps_mode(sta,
+ NL80211_MESH_POWER_DEEP_SLEEP);
+ } else {
+ ieee80211s_set_sta_ps_mode(sta,
+ NL80211_MESH_POWER_LIGHT_SLEEP);
+ }
+ } else {
+ ieee80211s_set_sta_ps_mode(sta,
+ NL80211_MESH_POWER_ACTIVE);
+ }
+
+ ieee80211s_set_local_ps_mode(sta,
+ sdata->u.mesh.mshcfg.power_mode);
+
mesh_plink_open(sta);
+ }
rcu_read_unlock();
}
--
1.7.3.4
^ permalink raw reply related
* [RFC 3/7] mac80211: mesh non-peer power mode indication in beacons
From: Ivan Bezyazychnyy @ 2011-10-21 8:37 UTC (permalink / raw)
To: linux-wireless
inidicate local mesh sta non-peer power mode in beacons
Signed-off-by: Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
---
net/mac80211/mesh.c | 3 +++
net/mac80211/mesh.h | 3 +++
net/mac80211/tx.c | 3 +++
3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index a7078fd..c16a203 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -242,6 +242,9 @@ mesh_add_meshconf_ie(struct sk_buff *skb, struct
ieee80211_sub_if_data *sdata)
/* Mesh capability */
ifmsh->accepting_plinks = mesh_plink_availables(sdata);
*pos = MESHCONF_CAPAB_FORWARDING;
+ if (sdata->u.mesh.mshcfg.power_mode == NL80211_MESH_POWER_DEEP_SLEEP) {
+ *pos |= MESHCONF_CAPAB_PS_LEVEL;
+ }
*pos++ |= ifmsh->accepting_plinks ?
MESHCONF_CAPAB_ACCEPT_PLINKS : 0x00;
*pos++ = 0x00;
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 6842453..188cc86 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -188,6 +188,9 @@ struct mesh_rmc {
/* Maximum number of paths per interface */
#define MESH_MAX_MPATHS 1024
+/* capability power save flag mask */
+#define MESHCONF_CAPAB_PS_LEVEL 0x80
+
/* Public interfaces */
/* Various */
int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc,
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8f2bc51..b1b1234 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2344,6 +2344,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct
ieee80211_hw *hw,
memset(mgmt, 0, 24 + sizeof(mgmt->u.beacon));
mgmt->frame_control =
cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON);
+ if (sdata->u.mesh.mshcfg.power_mode != NL80211_MESH_POWER_ACTIVE) {
+ mgmt->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
+ }
memset(mgmt->da, 0xff, ETH_ALEN);
memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
--
1.7.3.4
^ permalink raw reply related
* [RFC 2/7] mac80211: tracking mesh peer link-specific power mode
From: Ivan Bezyazychnyy @ 2011-10-21 8:37 UTC (permalink / raw)
To: linux-wireless
Tracking link-specific power mode from QoS data and QoS null frames
Signed-off-by: Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
---
include/linux/ieee80211.h | 10 +++++++
net/mac80211/mesh.h | 2 +
net/mac80211/rx.c | 65 +++++++++++++++++++++++++++++++++++++++++++++
net/mac80211/sta_info.h | 2 +
4 files changed, 79 insertions(+), 0 deletions(-)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index b206b94..aa6e61d 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -546,6 +546,16 @@ static inline int ieee80211_is_qos_nullfunc(__le16 fc)
cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
}
+/**
+ * ieee80211s_has_qos_pm - check Power Save Level in QoS control
+ * @qc - QoS control bytes in little-endian byteorder
+ */
+
+static inline int ieee80211s_has_qos_pm(__le16 qc)
+{
+ return (qc & cpu_to_le16(IEEE80211_QOS_CTL_PS_LEVEL)) != 0;
+}
+
struct ieee80211s_hdr {
u8 flags;
u8 ttl;
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 8c00e2d..6842453 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -222,6 +222,8 @@ void ieee80211_mesh_init_sdata(struct
ieee80211_sub_if_data *sdata);
void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata);
void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata);
void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh);
+void ieee80211s_set_sta_ps_mode(struct sta_info *sta,
+ enum nl80211_mesh_power_mode mode);
/* Mesh paths */
int mesh_nexthop_lookup(struct sk_buff *skb,
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b867bd5..4decfab 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1162,6 +1162,36 @@ int ieee80211_sta_ps_transition(struct
ieee80211_sta *sta, bool start)
}
EXPORT_SYMBOL(ieee80211_sta_ps_transition);
+#ifdef CONFIG_MAC80211_MESH
+void ieee80211s_set_sta_ps_mode(struct sta_info *sta,
+ enum nl80211_mesh_power_mode mode)
+{
+ if (sta->peer_ps_mode != mode) {
+ sta->peer_ps_mode = mode;
+#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
+ switch (mode) {
+ case NL80211_MESH_POWER_ACTIVE:
+ printk(KERN_DEBUG "%s: STA %pM enters active mode\n",
+ sta->sdata->name, sta->sta.addr);
+ break;
+ case NL80211_MESH_POWER_LIGHT_SLEEP:
+ printk(KERN_DEBUG "%s: STA %pM enters light sleep mode\n",
+ sta->sdata->name, sta->sta.addr);
+ break;
+ case NL80211_MESH_POWER_DEEP_SLEEP:
+ printk(KERN_DEBUG "%s: STA %pM enters deep sleep mode\n",
+ sta->sdata->name, sta->sta.addr);
+ break;
+ default:
+ printk(KERN_DEBUG "%s: STA %pM used invalid power save mode\n",
+ sta->sdata->name, sta->sta.addr);
+ break;
+ }
+#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
+ }
+}
+#endif /* CONFIG_MAC80211_MESH */
+
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_uapsd_and_pspoll(struct ieee80211_rx_data *rx)
{
@@ -1313,6 +1343,41 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
}
}
+#ifdef CONFIG_MAC80211_MESH
+ /*
+ * Test mesh power save level subfield of QoS control field (PSL)
+ * and Power Managment field of frame control (PW)
+ * +----+----+-----------------+
+ * | PM | PSL| Mesh Power Mode |
+ * +----+----+-----------------+
+ * | 0 |Rsrv| Active |
+ * +----+----+-----------------+
+ * | 1 | 0 | Light |
+ * +----+----+-----------------+
+ * | 1 | 1 | Deep |
+ * +----+----+-----------------+
+ */
+ if (!ieee80211_has_morefrags(hdr->frame_control) &&
+ !(status->rx_flags & IEEE80211_RX_DEFERRED_RELEASE) &&
+ ieee80211_vif_is_mesh(&rx->sdata->vif) &&
+ (ieee80211_is_data(hdr->frame_control) ||
+ ieee80211_is_nullfunc(hdr->frame_control))) {
+ if (ieee80211_has_pm(hdr->frame_control)) {
+ __le16 *qc = (__le16 *) ieee80211_get_qos_ctl(hdr);
+ if (ieee80211s_has_qos_pm(*qc)) {
+ ieee80211s_set_sta_ps_mode(sta,
+ NL80211_MESH_POWER_DEEP_SLEEP);
+ } else {
+ ieee80211s_set_sta_ps_mode(sta,
+ NL80211_MESH_POWER_LIGHT_SLEEP);
+ }
+ } else {
+ ieee80211s_set_sta_ps_mode(sta,
+ NL80211_MESH_POWER_ACTIVE);
+ }
+ }
+#endif /* CONFIG_MAC80211_MESH */
+
/*
* Drop (qos-)data::nullfunc frames silently, since they
* are used only to control station power saving mode.
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 8742668..86fe10a 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -251,6 +251,7 @@ struct sta_ampdu_mlme {
* @ignore_plink_timer: ignore the peer-link timer (used internally)
* @plink_state: peer link state
* @local_ps_mode: local link-specific power save mode
+ * @peer_ps_mode: peer link-specific power save mode
* @plink_timeout: timeout of peer link
* @plink_timer: peer link watch timer
* @plink_timer_was_running: used by suspend/resume to restore timers
@@ -340,6 +341,7 @@ struct sta_info {
bool plink_timer_was_running;
enum nl80211_plink_state plink_state;
enum nl80211_mesh_power_mode local_ps_mode;
+ enum nl80211_mesh_power_mode peer_ps_mode;
u32 plink_timeout;
struct timer_list plink_timer;
#endif
--
1.7.3.4
^ permalink raw reply related
* [RFC 1/7] mac80211: mesh power mode indication in QoS frames
From: Ivan Bezyazychnyy @ 2011-10-21 8:36 UTC (permalink / raw)
To: linux-wireless
indicate non-peer mesh power mode in multicast and local
link-specific power mode in unicast QoS frames
Signed-off-by: Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
---
include/linux/ieee80211.h | 3 ++
include/linux/nl80211.h | 29 ++++++++++++++++++++++++++
include/net/cfg80211.h | 2 +
net/mac80211/sta_info.h | 2 +
net/mac80211/tx.c | 50 ++++++++++++++++++++++++++++++++++++++++++++-
net/wireless/mesh.c | 1 +
6 files changed, 86 insertions(+), 1 deletions(-)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 48363c3..b206b94 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -133,6 +133,9 @@
/* Mesh Control 802.11s */
#define IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT 0x0100
+/* mesh power save level subfield mask */
+#define IEEE80211_QOS_CTL_PS_LEVEL 0x0200
+
/* U-APSD queue for WMM IEs sent by AP */
#define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7)
#define IEEE80211_WMM_IE_AP_QOSINFO_PARAM_SET_CNT_MASK 0x0f
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 8049bf7..001e9e3 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1915,6 +1915,35 @@ enum nl80211_mntr_flags {
};
/**
+ * enum nl80211_mesh_power_mode - mesh power save modes
+ *
+ * @__NL80211_MESH_POWER_INVALID - internal use
+ *
+ * @NL80211_MESH_POWER_ACTIVE - active mesh power mode, mesh STA
+ * in Awake state all the time
+ * @NL80211_MESH_POWER_LIGHT_SLEEP - light sleep mode, mesh STA
+ * alternate between Active and Doze states,
+ * mesh STA should listen to all the beacons
+ * @NL80211_MESH_POWER_DEEP_SLEEP - deep sleep mode, mesh STA
+ * alternates between Active and Doze states,
+ * may choose not listen to the beacons
+ *
+ * @__NL80211_MESH_POWER_AFTER_LAST - internal use
+ * @NL80211_MESH_POWER_MAX - highest possible power save level
+ */
+
+enum nl80211_mesh_power_mode {
+ __NL80211_MESH_POWER_INVALID,
+
+ NL80211_MESH_POWER_ACTIVE,
+ NL80211_MESH_POWER_LIGHT_SLEEP,
+ NL80211_MESH_POWER_DEEP_SLEEP,
+
+ __NL80211_MESH_POWER_AFTER_LAST,
+ NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1
+};
+
+/**
* enum nl80211_meshconf_params - mesh configuration parameters
*
* Mesh configuration parameters. These can be changed while the mesh is
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 92cf1c2..e00e04e 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -765,6 +765,8 @@ struct mesh_config {
u16 dot11MeshMaxPeerLinks;
u8 dot11MeshMaxRetries;
u8 dot11MeshTTL;
+ /* non-peer mesh power save mode */
+ u8 power_mode;
/* ttl used in path selection information elements */
u8 element_ttl;
bool auto_open_plinks;
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 8c8ce05..8742668 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -250,6 +250,7 @@ struct sta_ampdu_mlme {
* @plink_retries: Retries in establishment
* @ignore_plink_timer: ignore the peer-link timer (used internally)
* @plink_state: peer link state
+ * @local_ps_mode: local link-specific power save mode
* @plink_timeout: timeout of peer link
* @plink_timer: peer link watch timer
* @plink_timer_was_running: used by suspend/resume to restore timers
@@ -338,6 +339,7 @@ struct sta_info {
bool ignore_plink_timer;
bool plink_timer_was_running;
enum nl80211_plink_state plink_state;
+ enum nl80211_mesh_power_mode local_ps_mode;
u32 plink_timeout;
struct timer_list plink_timer;
#endif
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 48bbb96..8f2bc51 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1033,6 +1033,48 @@ ieee80211_tx_h_calculate_duration(struct
ieee80211_tx_data *tx)
return TX_CONTINUE;
}
+#ifdef CONFIG_MAC80211_MESH
+static enum nl80211_mesh_power_mode
+ieee80211s_get_ps_mode(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_hdr *hdr)
+{
+ enum nl80211_mesh_power_mode pm = NL80211_MESH_POWER_ACTIVE;
+ struct mesh_path *mpath;
+
+ if (is_multicast_ether_addr(hdr->addr1)) {
+ pm = (enum nl80211_mesh_power_mode)
+ sdata->u.mesh.mshcfg.power_mode;
+ } else {
+ rcu_read_lock();
+ mpath = mesh_path_lookup(hdr->addr3, sdata);
+ if (mpath) {
+ pm = mpath->next_hop->local_ps_mode;
+ }
+ rcu_read_unlock();
+ }
+
+ return pm;
+}
+
+static void ieee80211_set_mesh_ps_fields(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_hdr *hdr)
+{
+ if (ieee80211_vif_is_mesh(&sdata->vif) &&
+ (ieee80211_is_data_qos(hdr->frame_control)
+ || ieee80211_is_qos_nullfunc(hdr->frame_control))) {
+ enum nl80211_mesh_power_mode
+ pm = ieee80211s_get_ps_mode(sdata, hdr);
+ if (pm != NL80211_MESH_POWER_ACTIVE) {
+ __le16 *qc = (__le16 *) ieee80211_get_qos_ctl(hdr);
+ hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
+ if (pm == NL80211_MESH_POWER_DEEP_SLEEP) {
+ *qc |= cpu_to_le16(IEEE80211_QOS_CTL_PS_LEVEL);
+ }
+ }
+ }
+}
+#endif /* CONFIG_MAC80211_MESH*/
+
/* actual transmit path */
static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
@@ -1437,6 +1479,9 @@ void ieee80211_xmit(struct ieee80211_sub_if_data
*sdata, struct sk_buff *skb)
}
ieee80211_set_qos_hdr(sdata, skb);
+#ifdef CONFIG_MAC80211_MESH
+ ieee80211_set_mesh_ps_fields(sdata, hdr);
+#endif /* CONFIG_MAC80211_MESH */
ieee80211_tx(sdata, skb, false);
rcu_read_unlock();
}
@@ -1887,7 +1932,10 @@ netdev_tx_t ieee80211_subif_start_xmit(struct
sk_buff *skb,
wme_sta = true;
/* receiver and we are QoS enabled, use a QoS type frame */
- if (wme_sta && local->hw.queues >= 4) {
+ if ((wme_sta && local->hw.queues >= 4) ||
+ (ieee80211_vif_is_mesh(&sdata->vif) &&
+ (ieee80211s_get_ps_mode(sdata, &hdr) !=
+ NL80211_MESH_POWER_ACTIVE))) {
fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
hdrlen += 2;
}
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
index 4423e64..5febd0b 100644
--- a/net/wireless/mesh.c
+++ b/net/wireless/mesh.c
@@ -52,6 +52,7 @@ const struct mesh_config default_mesh_config = {
.min_discovery_timeout = MESH_MIN_DISCOVERY_TIMEOUT,
.dot11MeshHWMPRannInterval = MESH_RANN_INTERVAL,
.dot11MeshGateAnnouncementProtocol = false,
+ .power_mode = NL80211_MESH_POWER_ACTIVE,
};
const struct mesh_setup default_mesh_setup = {
--
1.7.3.4
^ permalink raw reply related
* [RFC 0/7] mesh power saving implementation: indication
From: Ivan Bezyazychnyy @ 2011-10-21 8:36 UTC (permalink / raw)
To: linux-wireless
Hello!
We have started implementation of power saving modes in mesh according
to chapter 11C.13 of the IEEE802.11s standard. We divided the work in
several phases and the first is indication of mesh STA's power save
modes in frames according to 11C.13.2 and 11C.13.3. We are very keen
to receive comments.
Thanks,
Ivan
^ permalink raw reply
* [PATCH v2] mac80211: exit cooked monitor RX early if there are none
From: Johannes Berg @ 2011-10-21 8:22 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <1319185071.3964.5.camel@jlt3.sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
If there are no cooked monitor interfaces, there's
no point in building the radiotap RX header for the
frame and iterating the interface list.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
v2: wow, embarrassing ... try quilt refresh ...
net/mac80211/rx.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/mac80211/rx.c 2011-10-21 10:19:33.000000000 +0200
+++ b/net/mac80211/rx.c 2011-10-21 10:20:59.000000000 +0200
@@ -2489,6 +2489,10 @@ static void ieee80211_rx_cooked_monitor(
goto out_free_skb;
rx->flags |= IEEE80211_RX_CMNTR;
+ /* If there are no cooked monitor interfaces, just free the SKB */
+ if (!local->cooked_mntrs)
+ goto out_free_skb;
+
if (skb_headroom(skb) < sizeof(*rthdr) &&
pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC))
goto out_free_skb;
^ permalink raw reply
* [PATCH] mac80211: exit cooked monitor RX early if there are none
From: Johannes Berg @ 2011-10-21 8:17 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
If there are no cooked monitor interfaces, there's
no point in building the radiotap RX header for the
frame and iterating the interface list.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/rx.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/mac80211/rx.c 2011-10-20 22:03:03.000000000 +0200
+++ b/net/mac80211/rx.c 2011-10-21 10:15:27.000000000 +0200
@@ -2496,6 +2496,10 @@ static void ieee80211_rx_cooked_monitor(
goto out_free_skb;
rx->flags |= IEEE80211_RX_CMNTR;
+ /* If there are no cooked monitor interfaces, just free the SKB */
+ if (!local->>cooked_mntrs)
+ goto out_free_skb;
+
if (skb_headroom(skb) < sizeof(*rthdr) &&
pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC))
goto out_free_skb;
^ permalink raw reply
* iwlagn and iwconfig
From: jarek @ 2011-10-21 7:25 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
Hi all!
How can I select radio channels on iwlagn (Intel Wireless-N 1030
adapter) in monitor mode ?
I've tried to use
iwconfig wlan0 channel NN
but it doesn't work properly. Any channel number is accepted, but is not
changed. The card is working properly, network-manager is able to find
all hotspots on all channels, so it must use some other way to make
channel hooping.
Best regards
Jarek
^ permalink raw reply
* Re: rtl8192cu - fails to maintain connection to some Access Points
From: Sedat Dilek @ 2011-10-21 7:28 UTC (permalink / raw)
To: Larry Finger; +Cc: Alan Pater, linux-wireless, George0505, georgia
In-Reply-To: <4EA0EE26.8010107@lwfinger.net>
On Fri, Oct 21, 2011 at 5:59 AM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> On 10/20/2011 06:02 PM, Alan Pater wrote:
>>
>> Hi folks
>>
>> Several people over on Ubuntu Launchpad are reporting that this USB WiFi
>> adaptor has issues connecting to certain access points. In my case, I
>> cannot
>> connect to a Meraki mesh network, but have no trouble when using my
>> Android
>> phone as a WiFi Access Point.
>>
>> The launchpad bugs are:
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/852190
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/869530
>>
>> https://bugs.launchpad.net/ubuntu/+source/linux-backports-modules-3.0.0/+bug/862684
>>
>> ~$ uname -a
>> Linux crow 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011
>> i686 i686 i386 GNU/Linux
>> ~$ lsusb
>> Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp.
>>
>> Note that I have tried newer kernels, including 3.1.0 without it making a
>> difference.
>>
>> Is there some other steps we could be taking to figure out what is going
>> on
>> here?
>
> You need to run wireshark on a different computer and capture the attempt to
> connect. The device works with my 3 APs, but none are Meraki.
>
Asking as a non-native speaker/writer: What do you mean by "Meraki"?
- Sedat -
[1] http://meraki.com/products/wireless/wifi-stumbler
> Larry
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: iwlagn is getting very shaky
From: Johannes Berg @ 2011-10-21 7:26 UTC (permalink / raw)
To: Norbert Preining
Cc: Guy, Wey-Yi, David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <20111021012354.GA26758@gamma.logic.tuwien.ac.at>
On Fri, 2011-10-21 at 10:23 +0900, Norbert Preining wrote:
> > > [17419.285141] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (0)
> > > [17419.286583] wlan0: deauthenticating from 00:24:c4:ab:bd:ef by local choice (reason=2)
> > > [17419.300296] cfg80211: Calling CRDA for country: JP
> > > [17419.309278] wlan0: authenticate with 00:24:c4:ab:bd:ef (try 1)
> > > [17419.310105] wlan0: authenticated
> > > [17419.317900] wlan0: associate with 00:24:c4:ab:bd:ef (try 1)
> >
> > It seems a bit like the 5 GHz AP (:e0) just fails, and wpa_supplicant
> > selects a 2.4 GHz AP (:ef) now? Pure conjecture, I guess the AP could
> > also be on the same channel -- did you have scan information for these
> > APs?
>
> BSS 00:24:c4:ab:bd:e0 (on wlan0)
> freq: 2412
> And the one I am on:
> BSS 00:24:c4:ab:bd:ef (on wlan0) -- associated
> freq: 5200
> No idea if that helps you.
Yes, thanks. So it's actually the other way around I guess.
I'm wondering if this too is related to the channel mess in mac80211.
johannes
^ permalink raw reply
* Re: [PATCH v2 2/2] mac80211: select queue for fwded mesh frames
From: Thomas Pedersen @ 2011-10-21 4:24 UTC (permalink / raw)
To: linux-wireless; +Cc: Thomas Pedersen, johannes, linville
In-Reply-To: <1319135408-6370-2-git-send-email-thomas@cozybit.com>
On Thu, Oct 20, 2011 at 11:30 AM, Thomas Pedersen <thomas@cozybit.com> wrote:
> Set proper queue mapping and timestamp for forwarded mesh frames.
>
> Thanks to Luis Rodriguez for investigating and fixing this.
>
> Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
>
> ---
> v2:
> We were already doing this for mcast frames, so don't duplicate
> the code.
>
> net/mac80211/rx.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index b867bd5..1408472 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1952,13 +1952,15 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
> info = IEEE80211_SKB_CB(fwd_skb);
> memset(info, 0, sizeof(*info));
> info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
> + info->control.jiffies = jiffies;
> info->control.vif = &rx->sdata->vif;
> + skb_set_queue_mapping(fwd_skb,
> + ieee80211_select_queue(sdata, fwd_skb));
> + ieee80211_set_qos_hdr(sdata, fwd_skb);
> +
> if (is_multicast_ether_addr(fwd_hdr->addr1)) {
> IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,
> fwded_mcast);
> - skb_set_queue_mapping(fwd_skb,
> - ieee80211_select_queue(sdata, fwd_skb));
> - ieee80211_set_qos_hdr(sdata, fwd_skb);
> } else {
> int err;
> /*
> --
> 1.7.5.4
>
>
John,
It seems this patch reverts part of
4777be41638cfab56c78b2a764a5f83beb6cfdd2 "mac80211: Start implementing
QoS support for mesh interfaces", and is probably the cause for some
breakage we're seeing here. Please hold off on this patch until I can
figure out what the right thing to do is.
Thanks,
Thomas
^ permalink raw reply
* Re: Question on channel 44 and HT40+
From: Ben Greear @ 2011-10-21 4:11 UTC (permalink / raw)
To: hostap, linux-wireless@vger.kernel.org
In-Reply-To: <4EA09874.3010006@candelatech.com>
On 10/20/2011 02:53 PM, Ben Greear wrote:
>
> I configured hostapd for channel 44, and gave it option for HT40+
> That seems to work fine:
>
> [root@ct520-6157 ]# cat /debug/ieee80211/wiphy0/ath9k/wiphy
> wiphy0 (chan=44 center-freq: 5220 MHz channel-type: 3 (ht40+))
> addr: 00:0e:8e:32:12:cf
> addrmask: ff:79:e8:45:74:31
> rfilt: 0x4497 UCAST MCAST BCAST BEACON PROBEREQ COMP_BAR PSPOLL
> [root@ct520-6157 ]#
Gah, user-error. The client NIC had country-code of AM (Armenia..really??)
and I had forgotten to enable the over-ride.
Once I force the NIC's country-code to 0 then it will do HT-40+- just
fine.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: rtl8192cu - fails to maintain connection to some Access Points
From: Larry Finger @ 2011-10-21 3:59 UTC (permalink / raw)
To: Alan Pater; +Cc: linux-wireless, 'George0505', 'georgia'
In-Reply-To: <CAN4ACka-egrr=GnBomT0Yc_r_mzS-+v8OE=D0vBoH+jFQJwX8w@mail.gmail.com>
On 10/20/2011 06:02 PM, Alan Pater wrote:
> Hi folks
>
> Several people over on Ubuntu Launchpad are reporting that this USB WiFi
> adaptor has issues connecting to certain access points. In my case, I cannot
> connect to a Meraki mesh network, but have no trouble when using my Android
> phone as a WiFi Access Point.
>
> The launchpad bugs are:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/852190
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/869530
> https://bugs.launchpad.net/ubuntu/+source/linux-backports-modules-3.0.0/+bug/862684
>
> ~$ uname -a
> Linux crow 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011
> i686 i686 i386 GNU/Linux
> ~$ lsusb
> Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp.
>
> Note that I have tried newer kernels, including 3.1.0 without it making a
> difference.
>
> Is there some other steps we could be taking to figure out what is going on
> here?
You need to run wireshark on a different computer and capture the attempt to
connect. The device works with my 3 APs, but none are Meraki.
Larry
^ permalink raw reply
* Re: Module rtl8192cu (Upstream kernel bug)
From: Larry Finger @ 2011-10-21 3:52 UTC (permalink / raw)
To: Thor Malmjursson; +Cc: ziv_huang, georgia, linux-wireless, linux-kernel
In-Reply-To: <SNT114-W5A13731399C34DE1C30D6A4EB0@phx.gbl>
On 10/20/2011 03:19 PM, Thor Malmjursson wrote:
> Hi. My name is Thor Malmjursson, I'm on the Kubuntu 11.10 OS, and I've
> discovered a bug with a kernel driver module which may need some attention. The
> main details of the bug are here:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/878504
>
> The issue is with the rtl8192cu kernel module, released in the 3.0 series of
> kernels, which we only got for the first time with our distro upgrade about 6
> days ago. I have a USB WiFi adapter which should work with that module, and it
> actually associates with it when I plug it into the PC - the problem is, the
> device is immediately locking open and refusing to scan, either automatically or
> manually.
>
> It's a wireless adapter made by Texet, with the USBID 0BDA:8176
>
> The only way I've been able to get the device to function is through
> ndiswrapper, but native support would be much better.
>
> As all the information you would need (i assume) is present on the bug report I
> listed above, I will leave this with you.
>
> I trust you will be able to help me with this.
I tried to post on the Ubuntu bugzilla, but the response was really slow and I
gave up there.
The dmesg output you posted there involved using ndiswrapper, thus I did not see
if the device was able to load the firmware. The specific file for that device
is /lib/firmware/rtlwifi/rtl8192cufw.bin. It is part of a kernel firmware
package. I do not know what Ubuntu calls it.
Larry
^ permalink raw reply
* Re: iwlagn is getting very shaky
From: Norbert Preining @ 2011-10-21 1:24 UTC (permalink / raw)
To: wwguy
Cc: David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <1319119852.2111.2.camel@wwguy-ubuntu>
On Do, 20 Okt 2011, wwguy wrote:
> Great, this is just a test patch, we will figure out what is the correct
> way to handle this and fix the issue for good :-)
Thanks. If you need more testing just let me know.
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
HODDLESDEN (n.)
An 'injured' footballer's limb back into the game which draws applause
but doesn't fool anybody.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply
* Re: iwlagn is getting very shaky
From: Norbert Preining @ 2011-10-21 1:23 UTC (permalink / raw)
To: Johannes Berg
Cc: Guy, Wey-Yi, David Rientjes, linux-kernel@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, ilw@linux.intel.com,
linux-wireless@vger.kernel.org, Pekka Enberg
In-Reply-To: <1319096418.3959.1.camel@jlt3.sipsolutions.net>
On Do, 20 Okt 2011, Johannes Berg wrote:
> > [17409.616748] wlan0: direct probe to 00:24:c4:ab:bd:e0 (try 1/3)
..
> > [17419.285141] iwlagn 0000:06:00.0: Encounter TX_STATUS_FAIL_PASSIVE_NO_RX, am I on 5.2G band? (0)
> > [17419.286583] wlan0: deauthenticating from 00:24:c4:ab:bd:ef by local choice (reason=2)
> > [17419.300296] cfg80211: Calling CRDA for country: JP
> > [17419.309278] wlan0: authenticate with 00:24:c4:ab:bd:ef (try 1)
> > [17419.310105] wlan0: authenticated
> > [17419.317900] wlan0: associate with 00:24:c4:ab:bd:ef (try 1)
>
> It seems a bit like the 5 GHz AP (:e0) just fails, and wpa_supplicant
> selects a 2.4 GHz AP (:ef) now? Pure conjecture, I guess the AP could
> also be on the same channel -- did you have scan information for these
> APs?
BSS 00:24:c4:ab:bd:e0 (on wlan0)
TSF: 8728607601135 usec (101d, 00:36:47)
freq: 2412
beacon interval: 102
capability: ESS ShortPreamble ShortSlotTime (0x0421)
signal: -62.00 dBm
last seen: 6012 ms ago
SSID: XXXXXX
Supported rates: 1.0* 2.0* 5.5* 6.0 9.0 11.0* 12.0 18.0
DS Parameter set: channel 1
TIM: DTIM Count 0 DTIM Period 1 Bitmap Control 0x0 Bitmap[0] 0x0
Country: JP Environment: Indoor/Outdoor
Channels [1 - 13] @ 20 dBm
ERP: Use_Protection
HT capabilities:
Capabilities: 0x182c
HT20
SM Power Save disabled
RX HT20 SGI
No RX STBC
Max AMSDU length: 7935 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
Extended supported rates: 24.0 36.0 48.0 54.0
HT operation:
* primary channel: 1
* secondary channel offset: no secondary
* STA channel width: 20 MHz
* RIFS: 0
* HT protection: non-HT mixed
* non-GF present: 1
* 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
WMM: * Parameter version 1
* u-APSD
* BE: CW 15-1023, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: acm CW 3-7, AIFSN 2, TXOP 1504 usec
And the one I am on:
BSS 00:24:c4:ab:bd:ef (on wlan0) -- associated
TSF: 8728558719143 usec (101d, 00:35:58)
freq: 5200
beacon interval: 102
capability: ESS (0x0001)
signal: -69.00 dBm
last seen: 96 ms ago
Information elements from Probe Response frame:
SSID: XXXXXX
Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0
Country: JP Environment: Indoor/Outdoor
Channels [36 - 64] @ 22 dBm
HT capabilities:
Capabilities: 0x186e
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 7935 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 40
* secondary channel offset: below
* STA channel width: any
* RIFS: 1
* HT protection: no
* non-GF present: 1
* 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
WMM: * Parameter version 1
* u-APSD
* BE: CW 15-1023, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: acm CW 3-7, AIFSN 2, TXOP 1504 usec
No idea if that helps you.
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
SCREGGAN (n. banking)
The crossed-out bit caused by people putting the wrong year on their
cheques all through January.
--- Douglas Adams, The Meaning of Liff
^ permalink raw reply
* rtl8192cu - fails to maintain connection to some Access Points
From: Alan Pater @ 2011-10-20 23:02 UTC (permalink / raw)
To: linux-wireless
Hi folks
Several people over on Ubuntu Launchpad are reporting that this USB WiFi
adaptor has issues connecting to certain access points. In my case, I cannot
connect to a Meraki mesh network, but have no trouble when using my Android
phone as a WiFi Access Point.
The launchpad bugs are:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/852190
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/869530
https://bugs.launchpad.net/ubuntu/+source/linux-backports-modules-3.0.0/+bug/862684
~$ uname -a
Linux crow 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011
i686 i686 i386 GNU/Linux
~$ lsusb
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp.
Note that I have tried newer kernels, including 3.1.0 without it making a
difference.
Is there some other steps we could be taking to figure out what is going on
here?
gracias,
Alan
^ permalink raw reply
* [PATCH v2] ath6kl: Implement support for listen interval from userspace
From: Rishi Panjwani @ 2011-10-20 22:35 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Rishi Panjwani
In-Reply-To: <1319150111-5647-1-git-send-email-rpanjwan@qca.qualcomm.com>
In order to allow user space based control of listen interval, we use
available debugfs infrastructure. Listen interval implies how frequently
we want the WLAN chip to wake up and synchronize the beacons in case it
is in sleep mode. The feature has been added for testing purposes. The
command requires two parameters in the following order:
1) listen_interval_time
2) listen_interval_beacons
The user has to write the listen interval_time (in msecs) and
listen_interval_beacons (in no. of beacons) to the listen_interval file in
ath6kl debug directory.
Example:
echo "30 1" > listen_interval
Signed-off-by: Rishi Panjwani <rpanjwan@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/debug.c | 60 +++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 3eaa291..b589ab6 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1489,6 +1489,66 @@ static const struct file_operations fops_bgscan_int = {
.llseek = default_llseek,
};
+static ssize_t ath6kl_listen_int_write(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath6kl *ar = file->private_data;
+ u16 listen_int_t, listen_int_b;
+ char buf[32];
+ char *sptr, *token;
+ ssize_t len;
+
+ len = min(count, sizeof(buf) - 1);
+ if (copy_from_user(buf, user_buf, len))
+ return -EFAULT;
+
+ buf[len] = '\0';
+ sptr = buf;
+
+ token = strsep(&sptr, " ");
+ if (!token)
+ return -EINVAL;
+ if (kstrtou16(token, 0, &listen_int_t) ||
+ kstrtou16(sptr, 0, &listen_int_b))
+ return -EINVAL;
+
+
+ if ((listen_int_t >= 15) && (listen_int_t <= 5000) &&
+ (listen_int_b >= 1) && (listen_int_b <= 50)) {
+ ar->listen_intvl_t = listen_int_t;
+ ar->listen_intvl_b = listen_int_b;
+ ath6kl_wmi_listeninterval_cmd(ar->wmi, ar->listen_intvl_t,
+ ar->listen_intvl_b);
+ } else {
+ return -EINVAL;
+ }
+
+ return count;
+}
+
+static ssize_t ath6kl_listen_int_read(struct file *file,
+ char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath6kl *ar = file->private_data;
+ char buf[16];
+ int len;
+
+ len = snprintf(buf, sizeof(buf), "%u %u\n", ar->listen_intvl_t,
+ ar->listen_intvl_b);
+
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static const struct file_operations fops_listen_int = {
+ .read = ath6kl_listen_int_read,
+ .write = ath6kl_listen_int_write,
+ .open = ath6kl_debugfs_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
int ath6kl_debug_init(struct ath6kl *ar)
{
ar->debug.fwlog_buf.buf = vmalloc(ATH6KL_FWLOG_SIZE);
--
1.7.0.4
^ permalink raw reply related
* [PATCH v2] ath6kl: Implement support for listen interval from userspace
From: Rishi Panjwani @ 2011-10-20 22:35 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Rishi Panjwani
The patch allows modification of listen interval thereby allowing change
in sleep/awake cycle causing change in power consumption numbers.
Rishi Panjwani (1):
ath6kl: Implement support for listen interval from userspace
drivers/net/wireless/ath/ath6kl/debug.c | 60 +++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
^ permalink raw reply
* Question on channel 44 and HT40+
From: Ben Greear @ 2011-10-20 21:53 UTC (permalink / raw)
To: hostap, linux-wireless@vger.kernel.org
I configured hostapd for channel 44, and gave it option for HT40+
That seems to work fine:
[root@ct520-6157 ]# cat /debug/ieee80211/wiphy0/ath9k/wiphy
wiphy0 (chan=44 center-freq: 5220 MHz channel-type: 3 (ht40+))
addr: 00:0e:8e:32:12:cf
addrmask: ff:79:e8:45:74:31
rfilt: 0x4497 UCAST MCAST BCAST BEACON PROBEREQ COMP_BAR PSPOLL
[root@ct520-6157 ]#
However, the clients will not use HT40 because this check from the kernel's
mlme.c fails:
case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
if (!(local->hw.conf.channel->flags &
IEEE80211_CHAN_NO_HT40PLUS))
channel_type = NL80211_CHAN_HT40PLUS;
Both systems are ath9k on 3.0.6+ (+ my standard set of hacks).
Both systems are using US country code.
Client-side:
03:00.0 Network controller: Atheros Communications Inc. AR9160 802.11abgn Wireless PCI Adapter (rev 01)
AP:
03:00.0 Network controller: Atheros Communications Inc. AR9300 Wireless LAN adaptor (rev 01)
So, the question is: Is this *supposed* to work? The hostapd conf file seems
to indicate that HT40+ is valid on channel 44...
The hostapd config file is here:
interface=vap0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/home/lanforge/wifi/hostapd_vap0.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=test123
bssid=00:88:99:88:99:01
country_code=US
ieee80211d=0
hw_mode=a
ieee80211n=1
channel=44
beacon_int=240
dtim_period=2
max_num_sta=2007
rts_threshold=2347
fragm_threshold=2346
preamble=0
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
# Enable HT modes if you want 300Mbps+ throughput.
#ht_capab=[HT20][HT40-][HT40+][GF][SHORT-GI-20][SHORT-GI-40]
# [TX-STBC][RX-STBC123][MAX-AMSDU-7935][DSSS_CCK-40][PSMP][LSIG-TXOP-PROT]
ht_capab=[HT20][HT40+][HT40-][SHORT-GI-40]
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
ieee8021x=0
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
wpa=1
wpa_pairwise=TKIP CCMP
wpa_passphrase=test1234
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH v2 0/6] HT support for mesh
From: Johannes Berg @ 2011-10-20 19:18 UTC (permalink / raw)
To: Xianghua Xiao; +Cc: Thomas Pedersen, linux-wireless
In-Reply-To: <CAP7cwtsB0jckz_WVFJuibKiewuOQZ_BMHTHBDfCTMNt_ge9buw@mail.gmail.com>
On Thu, 2011-10-20 at 14:17 -0500, Xianghua Xiao wrote:
> how does this relate to Alex HT patches? Alex's patch addresses IBSS
> but there seems to be some overlaps between Mesh/IBSS HT patches.
He just uses one of Alex's refactoring patches here :)
johannes
^ permalink raw reply
* Re: [PATCH v2 0/6] HT support for mesh
From: Xianghua Xiao @ 2011-10-20 19:17 UTC (permalink / raw)
To: Thomas Pedersen; +Cc: linux-wireless
In-Reply-To: <1319135679-6740-1-git-send-email-thomas@cozybit.com>
how does this relate to Alex HT patches? Alex's patch addresses IBSS
but there seems to be some overlaps between Mesh/IBSS HT patches.
thanks,
On Thu, Oct 20, 2011 at 1:34 PM, Thomas Pedersen <thomas@cozybit.com> wrote:
> This patchset adds basic HT support for mesh nodes. We avoid the question of
> how to negotiate channel types, by simply disallowing peering with mismatched
> HT modes. Needs the mesh fixes posted earlier today for patch context.
>
> Many thanks to Luis Rodriguez for his assistance, and Ashok Nagarajan for
> co-authoring this patchset.
>
> v2:
> Remove outdated BA comments (Christian)
>
> Alexander Simon (1):
> mac80211: Add HT helper functions
>
> Thomas Pedersen (5):
> mac80211: add HT IEs to mesh frames
> mac80211: set HT capabilities for mesh peer
> mac80211: allow frame aggregation for mesh
> mac80211: add WMM IE to mesh frames
> mac80211: check mesh peer's WMM parameters
>
> include/linux/ieee80211.h | 26 ++++++
> include/net/mac80211.h | 4 +
> net/mac80211/agg-rx.c | 3 +-
> net/mac80211/agg-tx.c | 10 +--
> net/mac80211/ht.c | 3 +-
> net/mac80211/ieee80211_i.h | 8 ++
> net/mac80211/mesh.c | 75 ++++++++++++++--
> net/mac80211/mesh.h | 4 +
> net/mac80211/mesh_plink.c | 24 +++++-
> net/mac80211/rx.c | 7 +--
> net/mac80211/tx.c | 6 ++
> net/mac80211/util.c | 208 ++++++++++++++++++++++++++++++++++++++++----
> net/mac80211/work.c | 29 +------
> 13 files changed, 336 insertions(+), 71 deletions(-)
>
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
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