* [PATCH] mac80211: refine ieee80211_rx() context requirement
From: Wei.Yang @ 2013-05-08 8:31 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, wei.wyang
From: Wei Yang <Wei.Yang@windriver.com>
In case of RT kernel, the return value of softirq_count() always
equal to 0, we need to use in_serving_softirq to decide whether
the current context is in softirq context.
Signed-off-by: Wei Yang <Wei.Yang@windriver.com>
---
net/mac80211/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c6844ad..80fac46 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3226,7 +3226,7 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
struct ieee80211_supported_band *sband;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
- WARN_ON_ONCE(softirq_count() == 0);
+ WARN_ON_ONCE(!in_serving_softirq());
if (WARN_ON(status->band >= IEEE80211_NUM_BANDS))
goto drop;
--
1.7.9.5
^ permalink raw reply related
* [PATCH v7] cfg80211: P2P find phase offload
From: Vladimir Kondratiev @ 2013-05-08 8:19 UTC (permalink / raw)
To: Johannes Berg
Cc: Vladimir Kondratiev, linux-wireless, Luis R . Rodriguez,
John W . Linville, Jouni Malinen
In-Reply-To: <1368001148-3619-1-git-send-email-qca_vkondrat@qca.qualcomm.com>
Allow to implement P2P find phase in the driver/firmware.
Offload scheme designed as follows:
- Driver provide methods start_p2p_find and stop_p2p_find in the cfg80211_ops;
- Driver indicate firmware or driver responds to the probe requests by setting
feature NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD
- wpa_supplicant analyses methods supported to discover p2p offload support;
- wpa_supplicant analyses feature flags to discover p2p probe response
offload support;
to perform p2p scan, wpa_supplicant:
- perform legacy scan, through driver's cfg80211_ops 'scan' method
- configure rx management filter to get probe-request and probe-response frames
- start p2p find via driver's cfg80211_ops start_p2p_find method
- driver start p2p find with hardware and notify wpa_supplicant with
cfg80211_p2p_find_notify_start()
- driver/firmware toggle search/listen states. Received probe-request and
probe-response frames passed to the wpa_supplicant via cfg80211_rx_mgmt
- when wpa_supplicant wants to stop p2p find, it calls driver's
cfg80211_ops stop_p2p_find method. Alternatively, driver/firmware may decide
to stop p2p find. In all cases, driver notifies wpa_supplicant using
cfg80211_p2p_find_notify_end()
All driver to user space communication done through nl80211 layer.
Offloaded P2P find does not support variations like progressive scan.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
---
include/net/cfg80211.h | 65 ++++++++++++++++
include/uapi/linux/nl80211.h | 13 ++++
net/wireless/nl80211.c | 175 +++++++++++++++++++++++++++++++++++++++++++
net/wireless/rdev-ops.h | 19 +++++
net/wireless/trace.h | 42 +++++++++++
5 files changed, 314 insertions(+)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 26b5b69..96172ae 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1780,6 +1780,34 @@ struct cfg80211_update_ft_ies_params {
};
/**
+ * struct cfg80211_p2p_find_params - parameters for P2P find
+ * @probe_ie: extra IE's for probe frames
+ * @probe_ie_len: length, bytes, of @probe_ie
+ * @probe_resp_ie: extra IE's for probe response frames
+ * @probe_resp_ie_len: length, bytes, of @probe_resp_ie
+ * Driver/firmware may add additional IE's as well as modify
+ * provided ones; typical IE's to be added are
+ * WLAN_EID_EXT_SUPP_RATES, WLAN_EID_DS_PARAMS,
+ * WLAN_EID_HT_CAPABILITY.
+ * @min_discoverable_interval: and
+ * @max_discoverable_interval: min/max for random multiplier of 100TU's
+ * for the listen state duration
+ * @n_channels: number of channels to operate on
+ * @channels: channels to operate on
+ */
+struct cfg80211_p2p_find_params {
+ const u8 *probe_ie;
+ size_t probe_ie_len;
+ const u8 *probe_resp_ie;
+ size_t probe_resp_ie_len;
+ u32 min_discoverable_interval;
+ u32 max_discoverable_interval;
+
+ int n_channels;
+ struct ieee80211_channel **channels;
+};
+
+/**
* struct cfg80211_ops - backend description for wireless configuration
*
* This struct is registered by fullmac card drivers and/or wireless stacks
@@ -2008,6 +2036,17 @@ struct cfg80211_update_ft_ies_params {
* driver can take the most appropriate actions.
* @crit_proto_stop: Indicates critical protocol no longer needs increased link
* reliability. This operation can not fail.
+ *
+ * start_p2p_find: start P2P find phase
+ * Parameters include IEs for probe/probe-resp frames;
+ * and channels to operate on.
+ * Parameters are not retained after call, driver need to copy data if
+ * it need it later.
+ * P2P find can't run concurrently with ROC or scan, and driver should
+ * check this.
+ * stop_p2p_find: stop P2P find phase
+ * After stopping p2p find, driver should call
+ * cfg80211_p2p_find_notify_end() to inform upper layers
*/
struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -2243,6 +2282,12 @@ struct cfg80211_ops {
u16 duration);
void (*crit_proto_stop)(struct wiphy *wiphy,
struct wireless_dev *wdev);
+
+ int (*start_p2p_find)(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ struct cfg80211_p2p_find_params *params);
+ void (*stop_p2p_find)(struct wiphy *wiphy,
+ struct wireless_dev *wdev);
};
/*
@@ -4160,6 +4205,26 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
*/
void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp);
+/**
+ * cfg80211_p2p_find_notify_start - report p2p find phase started
+ * @wdev: the wireless device reporting the event
+ * @gfp: allocation flags
+ */
+void cfg80211_p2p_find_notify_start(struct wireless_dev *wdev, gfp_t gfp);
+
+/**
+ * cfg80211_p2p_find_notify_end - report p2p find phase ended
+ * @wdev: the wireless device reporting the event
+ * @gfp: allocation flags
+ *
+ * p2p find phase may be ended either unsolicited or in response to
+ * ops->stop_p2p_find
+ *
+ * In any case, if @start_p2p_find from driver's struct cfg80211_ops called,
+ * @cfg80211_p2p_find_notify_end should be eventually called
+ */
+void cfg80211_p2p_find_notify_end(struct wireless_dev *wdev, gfp_t gfp);
+
/* Logging, debugging and troubleshooting/diagnostic helpers. */
/* wiphy_printk helpers, similar to dev_printk */
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index d1e48b5..5fe3ec6 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -808,6 +808,9 @@ enum nl80211_commands {
NL80211_CMD_CRIT_PROTOCOL_START,
NL80211_CMD_CRIT_PROTOCOL_STOP,
+ NL80211_CMD_START_P2P_FIND,
+ NL80211_CMD_STOP_P2P_FIND,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -1429,6 +1432,10 @@ enum nl80211_commands {
* @NL80211_ATTR_MAX_CRIT_PROT_DURATION: duration in milliseconds in which
* the connection should have increased reliability (u16).
*
+ * @NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL:
+ * @NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL: min/max discoverable interval
+ * for the p2p find, multiple of 100 TUs, represented as u32
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1727,6 +1734,9 @@ enum nl80211_attrs {
NL80211_ATTR_CRIT_PROT_ID,
NL80211_ATTR_MAX_CRIT_PROT_DURATION,
+ NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL,
+ NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -3556,6 +3566,8 @@ enum nl80211_ap_sme_features {
* Peering Management entity which may be implemented by registering for
* beacons or NL80211_CMD_NEW_PEER_CANDIDATE events. The mesh beacon is
* still generated by the driver.
+ * @NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD: When in P2P find phase,
+ * the device responds to probe-requests in hardware.
*/
enum nl80211_feature_flags {
NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3575,6 +3587,7 @@ enum nl80211_feature_flags {
NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
+ NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD = 1 << 17,
};
/**
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index afa2838..bd33a6a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -378,6 +378,8 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
[NL80211_ATTR_MDID] = { .type = NLA_U16 },
[NL80211_ATTR_IE_RIC] = { .type = NLA_BINARY,
.len = IEEE80211_MAX_DATA_LEN },
+ [NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL] = { .type = NLA_U32 },
+ [NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL] = { .type = NLA_U32 },
};
/* policy for the key attributes */
@@ -1427,6 +1429,8 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
if (split) {
CMD(crit_proto_start, CRIT_PROTOCOL_START);
CMD(crit_proto_stop, CRIT_PROTOCOL_STOP);
+ CMD(start_p2p_find, START_P2P_FIND);
+ CMD(stop_p2p_find, STOP_P2P_FIND);
}
#ifdef CONFIG_NL80211_TESTMODE
@@ -8278,6 +8282,121 @@ static int nl80211_crit_protocol_stop(struct sk_buff *skb,
return 0;
}
+static int nl80211_start_p2p_find(struct sk_buff *skb, struct genl_info *info)
+{
+ struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct wireless_dev *wdev = info->user_ptr[1];
+ struct wiphy *wiphy = &rdev->wiphy;
+ /*
+ * Defaults, as defined in the spec
+ * Ref: Wi-Fi Peer-to-Peer (P2P) Technical Specification v1.1
+ * Clause: 3.1.2.1.3 Find Phase
+ */
+ struct cfg80211_p2p_find_params params = {
+ .min_discoverable_interval = 1,
+ .max_discoverable_interval = 3,
+ };
+ struct nlattr *attr_freq = info->attrs[NL80211_ATTR_SCAN_FREQUENCIES];
+ struct nlattr *attr;
+ int err, tmp, n_channels, i = 0;
+ struct ieee80211_channel **channels = NULL;
+
+ if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE)
+ return -EOPNOTSUPP;
+
+ if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE]))
+ return -EINVAL;
+
+ if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE_PROBE_RESP]))
+ return -EINVAL;
+
+ if (!rdev->ops->start_p2p_find || !rdev->ops->stop_p2p_find)
+ return -EOPNOTSUPP;
+
+ if (rdev->scan_req)
+ return -EBUSY;
+
+ if (attr_freq) {
+ n_channels = validate_scan_freqs(attr_freq);
+ if (!n_channels)
+ return -EINVAL;
+
+ channels = kzalloc(n_channels * sizeof(*channels), GFP_KERNEL);
+ if (!channels)
+ return -ENOMEM;
+
+ /* user specified, bail out if channel not found */
+ nla_for_each_nested(attr, attr_freq, tmp) {
+ struct ieee80211_channel *chan;
+
+ chan = ieee80211_get_channel(wiphy, nla_get_u32(attr));
+
+ if (!chan) {
+ err = -EINVAL;
+ goto out_free;
+ }
+
+ /* ignore disabled channels */
+ if (chan->flags & IEEE80211_CHAN_DISABLED)
+ continue;
+
+ params.channels[i] = chan;
+ i++;
+ }
+ if (!i) {
+ err = -EINVAL;
+ goto out_free;
+ }
+
+ params.n_channels = i;
+ params.channels = channels;
+ }
+
+
+ attr = info->attrs[NL80211_ATTR_IE];
+ if (attr) {
+ params.probe_ie_len = nla_len(attr);
+ params.probe_ie = nla_data(attr);
+ }
+
+ attr = info->attrs[NL80211_ATTR_IE_PROBE_RESP];
+ if (attr) {
+ params.probe_resp_ie_len = nla_len(attr);
+ params.probe_resp_ie = nla_data(attr);
+ }
+
+ attr = info->attrs[NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL];
+ if (attr)
+ params.min_discoverable_interval = nla_get_u32(attr);
+
+ attr = info->attrs[NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL];
+ if (attr)
+ params.max_discoverable_interval = nla_get_u32(attr);
+
+ err = rdev_start_p2p_find(rdev, wdev, ¶ms);
+
+out_free:
+ kfree(channels);
+
+ return err;
+}
+
+static int nl80211_stop_p2p_find(struct sk_buff *skb, struct genl_info *info)
+{
+ struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct wireless_dev *wdev = info->user_ptr[1];
+
+ if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE)
+ return -EOPNOTSUPP;
+
+ if (!rdev->ops->start_p2p_find || !rdev->ops->stop_p2p_find)
+ return -EOPNOTSUPP;
+
+ rdev_stop_p2p_find(rdev, wdev);
+
+ return 0;
+}
+
#define NL80211_FLAG_NEED_WIPHY 0x01
#define NL80211_FLAG_NEED_NETDEV 0x02
#define NL80211_FLAG_NEED_RTNL 0x04
@@ -8955,6 +9074,22 @@ static struct genl_ops nl80211_ops[] = {
NL80211_FLAG_NEED_RTNL,
},
{
+ .cmd = NL80211_CMD_START_P2P_FIND,
+ .doit = nl80211_start_p2p_find,
+ .policy = nl80211_policy,
+ .flags = GENL_ADMIN_PERM,
+ .internal_flags = NL80211_FLAG_NEED_WDEV_UP |
+ NL80211_FLAG_NEED_RTNL,
+ },
+ {
+ .cmd = NL80211_CMD_STOP_P2P_FIND,
+ .doit = nl80211_stop_p2p_find,
+ .policy = nl80211_policy,
+ .flags = GENL_ADMIN_PERM,
+ .internal_flags = NL80211_FLAG_NEED_WDEV_UP |
+ NL80211_FLAG_NEED_RTNL,
+ },
+ {
.cmd = NL80211_CMD_GET_PROTOCOL_FEATURES,
.doit = nl80211_get_protocol_features,
.policy = nl80211_policy,
@@ -10645,6 +10780,46 @@ void cfg80211_tdls_oper_request(struct net_device *dev, const u8 *peer,
}
EXPORT_SYMBOL(cfg80211_tdls_oper_request);
+static
+void cfg80211_p2p_find_notify(struct wireless_dev *wdev, int cmd, gfp_t gfp)
+{
+ struct wiphy *wiphy = wdev->wiphy;
+ struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
+ struct sk_buff *msg;
+ void *hdr;
+
+ trace_cfg80211_p2p_find_notify(wdev, cmd);
+ msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+ if (!msg)
+ return;
+
+ hdr = nl80211hdr_put(msg, 0, 0, 0, cmd);
+ if (!hdr) {
+ nlmsg_free(msg);
+ return;
+ }
+
+ if (genlmsg_end(msg, hdr) < 0) {
+ nlmsg_free(msg);
+ return;
+ }
+
+ genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
+ nl80211_scan_mcgrp.id, GFP_KERNEL);
+}
+
+void cfg80211_p2p_find_notify_start(struct wireless_dev *wdev, gfp_t gfp)
+{
+ cfg80211_p2p_find_notify(wdev, NL80211_CMD_START_P2P_FIND, gfp);
+}
+EXPORT_SYMBOL(cfg80211_p2p_find_notify_start);
+
+void cfg80211_p2p_find_notify_end(struct wireless_dev *wdev, gfp_t gfp)
+{
+ cfg80211_p2p_find_notify(wdev, NL80211_CMD_STOP_P2P_FIND, gfp);
+}
+EXPORT_SYMBOL(cfg80211_p2p_find_notify_end);
+
static int nl80211_netlink_notify(struct notifier_block * nb,
unsigned long state,
void *_notify)
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 9f15f0a..94ff98a 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -923,4 +923,23 @@ static inline void rdev_crit_proto_stop(struct cfg80211_registered_device *rdev,
trace_rdev_return_void(&rdev->wiphy);
}
+static inline int rdev_start_p2p_find(struct cfg80211_registered_device *rdev,
+ struct wireless_dev *wdev,
+ struct cfg80211_p2p_find_params *params)
+{
+ int ret;
+ trace_rdev_start_p2p_find(&rdev->wiphy, wdev, params);
+ ret = rdev->ops->start_p2p_find(&rdev->wiphy, wdev, params);
+ trace_rdev_return_int(&rdev->wiphy, ret);
+ return ret;
+}
+
+static inline void rdev_stop_p2p_find(struct cfg80211_registered_device *rdev,
+ struct wireless_dev *wdev)
+{
+ trace_rdev_stop_p2p_find(&rdev->wiphy, wdev);
+ rdev->ops->stop_p2p_find(&rdev->wiphy, wdev);
+ trace_rdev_return_void(&rdev->wiphy);
+}
+
#endif /* __CFG80211_RDEV_OPS */
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index ecd4fce..266c911 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -1841,6 +1841,34 @@ TRACE_EVENT(rdev_crit_proto_stop,
WIPHY_PR_ARG, WDEV_PR_ARG)
);
+TRACE_EVENT(rdev_start_p2p_find,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
+ struct cfg80211_p2p_find_params *params),
+ TP_ARGS(wiphy, wdev, params),
+ TP_STRUCT__entry(
+ WIPHY_ENTRY
+ WDEV_ENTRY
+ __field(u32, min_di)
+ __field(u32, max_di)
+ __field(int, n_channels)
+ ),
+ TP_fast_assign(
+ WIPHY_ASSIGN;
+ WDEV_ASSIGN;
+ __entry->min_di = params->min_discoverable_interval;
+ __entry->max_di = params->max_discoverable_interval;
+ __entry->n_channels = params->n_channels;
+ ),
+ TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", disc. int. [%d..%d], n_channels %d",
+ WIPHY_PR_ARG, WDEV_PR_ARG, __entry->min_di, __entry->max_di,
+ __entry->n_channels)
+);
+
+DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_find,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
+ TP_ARGS(wiphy, wdev)
+);
+
/*************************************************************
* cfg80211 exported functions traces *
*************************************************************/
@@ -2495,6 +2523,20 @@ TRACE_EVENT(cfg80211_ft_event,
WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
);
+TRACE_EVENT(cfg80211_p2p_find_notify,
+ TP_PROTO(struct wireless_dev *wdev, int cmd),
+ TP_ARGS(wdev, cmd),
+ TP_STRUCT__entry(
+ WDEV_ENTRY
+ __field(int, cmd)
+ ),
+ TP_fast_assign(
+ WDEV_ASSIGN;
+ __entry->cmd = cmd;
+ ),
+ TP_printk(WDEV_PR_FMT ", cmd: %d", WDEV_PR_ARG, __entry->cmd)
+);
+
#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
#undef TRACE_INCLUDE_PATH
--
1.8.1.2
^ permalink raw reply related
* [PATCH v7] P2P find phase offload
From: Vladimir Kondratiev @ 2013-05-08 8:19 UTC (permalink / raw)
To: Johannes Berg
Cc: Vladimir Kondratiev, linux-wireless, Luis R . Rodriguez,
John W . Linville, Jouni Malinen
Addressed input for previous version:
- formatting
- defaults for p2p params accordingly to the spec
- clarify driver should notify cfg80211 about find phase end
in case stop_p2p_find was requested by cfg80211
Vladimir Kondratiev (1):
cfg80211: P2P find phase offload
include/net/cfg80211.h | 65 ++++++++++++++++
include/uapi/linux/nl80211.h | 13 ++++
net/wireless/nl80211.c | 175 +++++++++++++++++++++++++++++++++++++++++++
net/wireless/rdev-ops.h | 19 +++++
net/wireless/trace.h | 42 +++++++++++
5 files changed, 314 insertions(+)
--
1.8.1.2
^ permalink raw reply
* ATH5k - wrong RSSI measurement on CM9
From: Jaroslav Fojtik @ 2013-05-08 7:24 UTC (permalink / raw)
To: linux-wireless-owner, open80211s, linux-wirelss
In-Reply-To: <1367935076.8328.35.camel@jlt4.sipsolutions.net>
Dears,
In Linux 2.6.22 the RSSI was measured properly for CM9 device.
Afrer upgrading to 3.0.75, the RSSI measure is offseted. I even remember, that this
problem has been introduced somewhere before 2.6.34.
You could look at the following chart:
http://78.108.103.11/cgi-bin/rodga_1month_big.cgi
This is not signal drop, but a kernel change instead.
(the chart is generated by parsing of iwconfig output:
wlan1 IEEE 802.11abg ESSID:"dvrmn.heaven-czfree.net"
Mode:Managed Frequency:5.64 GHz Access Point: 00:27:22:64:C3:02
Bit Rate=54 Mb/s Tx-Power=8 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=36/70 Signal level=-74 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:20 Invalid misc:59452 Missed beacon:0)
I guess that this problem has been fixed one time and that there are two generations of
CM9 devices that reports RSSI differently.
best regards
Jara
^ permalink raw reply
* Re: [ath9k-devel] [PATCH RFC] ath9k: collect statistics about Rx-Dup and Rx-STBC packets
From: Sujith Manoharan @ 2013-05-08 5:32 UTC (permalink / raw)
To: Felix Fietkau; +Cc: Ben Greear, Oleksij Rempel, ath9k-devel, linux-wireless
In-Reply-To: <517D3B50.6070806@openwrt.org>
Felix Fietkau wrote:
> The problem I have with the current stats is they're just an arbitrary
> collection of random stuff that is probably useless for 99% of all
> users. In many cases the way the stats are collected also makes the data
> completely meaningless (e.g. because the source/destination address is
> not taken into account).
>
> Why care about the number of packets on the air that were sent with a
> specific rate flag? Why care about the number of beacons on the air
> (with no filter on a set of APs or anything)? Or what about the number
> of fragments received? To me it just looks like an incoherent set of
> useless facts.
Yes, having per-station statistics would be useful, mainly for RX and TX. Right
now, all the counters are global and there is no way to find out how a
particular station is performing, especially in AP mode. Since mac80211 gives us
proper debugfs hooks for station addition/deletion, relevant stuff can be moved
there.
The 'recv' file used to be just for HW errors (DESC, CRC etc.), now it has various
counters that should probably be node-specific.
The 'xmit' file can be trimmed and information can be maintained per-station.
This will be really useful in AP mode - especially for diagnosing aggregation, QoS, PS etc.
Other than these two files, the rest are simple.
Sujith
^ permalink raw reply
* Re: [ath9k-devel] ath9k_htc works poorly in 3.9
From: Oleksij Rempel @ 2013-05-08 5:31 UTC (permalink / raw)
To: Corey Richardson; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <CA++BO6SfpV_7pimE=-TUcbXRX9Xgd8v69B5AQzPQ2g1b82e0FA@mail.gmail.com>
Am 08.05.2013 05:52, schrieb Corey Richardson:
> Initially, I can associate and everything works fine, but after an
> hour or maybe a few, I get deauthenticated, with:
>
> [ 3115.047842] cfg80211: Calling CRDA for country: US
> [ 3116.383330] wlan0: authenticate with 00:14:c2:ae:e1:c0
> [ 3116.480597] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3)
> [ 3119.526272] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 2/3)
> [ 3121.485530] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local
> choice (reason=3)
> [ 3123.386841] wlan0: authenticate with 00:14:c2:ae:e1:c0
> [ 3123.483019] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3)
> [ 3126.528663] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 2/3)
> [ 3128.486335] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local
> choice (reason=3)
> [ 3130.879429] wlan0: authenticate with 00:14:c2:ae:e1:c0
> [ 3130.976309] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3)
> [ 3130.976512] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local
> choice (reason=3)
>
> in dmesg and
>
> May 07 23:32:57 roger NetworkManager[317]: <warn> Connection
> disconnected (reason -4)
> May 07 23:32:57 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: completed -> disconnected
> May 07 23:32:58 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: disconnected -> scanning
> May 07 23:32:59 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: scanning -> authenticating
> May 07 23:32:59 roger NetworkManager[317]: <info> (wlan0): roamed from
> BSSID 00:14:C2:AE:E1:C0 (home1) to (none) ((none))
> May 07 23:33:04 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: authenticating -> disconnected
> May 07 23:33:04 roger NetworkManager[317]: <warn> Connection
> disconnected (reason -3)
> May 07 23:33:05 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: disconnected -> scanning
> May 07 23:33:06 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: scanning -> authenticating
> May 07 23:33:11 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: authenticating -> disconnected
> May 07 23:33:11 roger NetworkManager[317]: <warn> Connection
> disconnected (reason -3)
> May 07 23:33:12 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: disconnected -> scanning
> May 07 23:33:13 roger NetworkManager[317]: <warn> (wlan0): link timed out.
> May 07 23:33:13 roger NetworkManager[317]: <info> (wlan0): device
> state change: activated -> failed (reason 'SSID not found') [100 120
> 53]
> May 07 23:33:13 roger NetworkManager[317]: <warn> Activation (wlan0)
> failed for connection 'home1'
> May 07 23:33:13 roger NetworkManager[317]: <info> (wlan0): device
> state change: failed -> disconnected (reason 'none') [120 30 0]
> May 07 23:33:13 roger NetworkManager[317]: <info> (wlan0):
> deactivating device (reason 'none') [0]
> May 07 23:33:13 roger NetworkManager[317]: <info> (wlan0): canceled
> DHCP transaction, DHCP client pid 527
> May 07 23:33:14 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: scanning -> authenticating
> May 07 23:33:14 roger NetworkManager[317]: <warn> Connection
> disconnected (reason -3)
> May 07 23:33:14 roger NetworkManager[317]: <info> (wlan0): supplicant
> interface state: authenticating -> disconnected
> May 07 23:33:14 roger NetworkManager[317]: <warn> Connection
> disconnected (reason -3)
>
>
> in the journal.
>
> Removing and reinserting the USB stick allows me to reassociate about
> 50% of the time; others need a reboot.
>
> This is a regression from 3.8. It was present in the earlier 3.9 RC's
> after Johannes' fix for idle sequence handling, but not before the
> changes that broke ath9k_htc, so I think something between the patch
> that broke the driver and the patch that fixed it is to blame.
Hi Corey,
only person who can help to fix it is you ;)
Currently I'm trying to reproduce other bug with this driver/firmware
without luck. Yesterday i started my test, i streamed some hundred
gigabytes over the air and my system is still working.
My kernel is 3.9.0-wl-00003-g4125f14
If it is an regression, can you please do "git bisect". If you can
locate the patch which introduced this regression, it will be great.
--
Regards,
Oleksij
^ permalink raw reply
* Re: Fun with QoS in AP mode.
From: Sujith Manoharan @ 2013-05-08 5:06 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <5189DB72.3020809@candelatech.com>
Ben Greear wrote:
> We were doing some testing with ToS/QoS in some VOIP streams today.
>
> The mappings on the station machine work fine, but on the AP, the packets
> always go to the BE queue. Both systems are 3.9.0+ ath9k, recent hostapd,
> supplicant, etc.
Is the AP running ath9k ?
Sujith
^ permalink raw reply
* Fun with QoS in AP mode.
From: Ben Greear @ 2013-05-08 4:58 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
We were doing some testing with ToS/QoS in some VOIP streams today.
The mappings on the station machine work fine, but on the AP, the packets
always go to the BE queue. Both systems are 3.9.0+ ath9k, recent hostapd,
supplicant, etc.
The VOIP call traffic is going station to station, so the AP is just turning
the packets around..
Any ideas where to go poking?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* ath9k_htc works poorly in 3.9
From: Corey Richardson @ 2013-05-08 3:52 UTC (permalink / raw)
To: linux-wireless, ath9k-devel
Initially, I can associate and everything works fine, but after an
hour or maybe a few, I get deauthenticated, with:
[ 3115.047842] cfg80211: Calling CRDA for country: US
[ 3116.383330] wlan0: authenticate with 00:14:c2:ae:e1:c0
[ 3116.480597] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3)
[ 3119.526272] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 2/3)
[ 3121.485530] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local
choice (reason=3)
[ 3123.386841] wlan0: authenticate with 00:14:c2:ae:e1:c0
[ 3123.483019] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3)
[ 3126.528663] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 2/3)
[ 3128.486335] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local
choice (reason=3)
[ 3130.879429] wlan0: authenticate with 00:14:c2:ae:e1:c0
[ 3130.976309] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3)
[ 3130.976512] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local
choice (reason=3)
in dmesg and
May 07 23:32:57 roger NetworkManager[317]: <warn> Connection
disconnected (reason -4)
May 07 23:32:57 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: completed -> disconnected
May 07 23:32:58 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: disconnected -> scanning
May 07 23:32:59 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: scanning -> authenticating
May 07 23:32:59 roger NetworkManager[317]: <info> (wlan0): roamed from
BSSID 00:14:C2:AE:E1:C0 (home1) to (none) ((none))
May 07 23:33:04 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: authenticating -> disconnected
May 07 23:33:04 roger NetworkManager[317]: <warn> Connection
disconnected (reason -3)
May 07 23:33:05 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: disconnected -> scanning
May 07 23:33:06 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: scanning -> authenticating
May 07 23:33:11 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: authenticating -> disconnected
May 07 23:33:11 roger NetworkManager[317]: <warn> Connection
disconnected (reason -3)
May 07 23:33:12 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: disconnected -> scanning
May 07 23:33:13 roger NetworkManager[317]: <warn> (wlan0): link timed out.
May 07 23:33:13 roger NetworkManager[317]: <info> (wlan0): device
state change: activated -> failed (reason 'SSID not found') [100 120
53]
May 07 23:33:13 roger NetworkManager[317]: <warn> Activation (wlan0)
failed for connection 'home1'
May 07 23:33:13 roger NetworkManager[317]: <info> (wlan0): device
state change: failed -> disconnected (reason 'none') [120 30 0]
May 07 23:33:13 roger NetworkManager[317]: <info> (wlan0):
deactivating device (reason 'none') [0]
May 07 23:33:13 roger NetworkManager[317]: <info> (wlan0): canceled
DHCP transaction, DHCP client pid 527
May 07 23:33:14 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: scanning -> authenticating
May 07 23:33:14 roger NetworkManager[317]: <warn> Connection
disconnected (reason -3)
May 07 23:33:14 roger NetworkManager[317]: <info> (wlan0): supplicant
interface state: authenticating -> disconnected
May 07 23:33:14 roger NetworkManager[317]: <warn> Connection
disconnected (reason -3)
in the journal.
Removing and reinserting the USB stick allows me to reassociate about
50% of the time; others need a reboot.
This is a regression from 3.8. It was present in the earlier 3.9 RC's
after Johannes' fix for idle sequence handling, but not before the
changes that broke ath9k_htc, so I think something between the patch
that broke the driver and the patch that fixed it is to blame.
^ permalink raw reply
* Re: Linux driver for Realtek RTL8723AU devices with USB ID 0bda:1724 such as found in Lenovo IdeaPad Yoga 13
From: H. Peter Anvin @ 2013-05-08 2:32 UTC (permalink / raw)
To: Larry Finger
Cc: linux-wireless, LKML, netdev, Dan Williams, 'George0505',
Joon Ro, Greg KH
In-Reply-To: <5159B52D.3050601@lwfinger.net>
On 04/01/2013 09:26 AM, Larry Finger wrote:
>
> My plan is to evolve this driver into a form that is suitable for
> inclusion in the staging tree of the kernel; however, that will take
> some effort and time, which is why I am making the intermediate results
> available now. As that work proceeds, the git version will evolve into
> code that can be submitted to the kernel with only small changes.
>
> Please be aware that I do not have any hardware that uses this driver,
> thus I can only guarantee that the code compiles; however, Joon Ro has
> tested the driver and he assures me that it works. Together we have been
> eliminating spurious log entries.
>
> The 8723a chip also includes Bluetooth hardware. I have not received any
> indication that it is active in the RTL8723AU, but it certainly is in
> the RTL8723AE, the PCIe version. In a separate activity, I am working
> with Realtek to prepare a kernel driver for this portion of the device.
>
So I can verify that this driver works against 3.8.11 (not against
current -linus because of a build failure), and yes, there is Bluetooth
in this device. In fact, it seems to work better than some in-tree
drivers I have seen in the past.
However, I'm confused as to the above and what it implies for the
purpose of the staging tree. Wasn't the whole point of the staging tree
to have a working-but-ugly driver upstream and have the work to clean it
up happen in the mainline tree instead of off somewhere.
-hpa
^ permalink raw reply
* [PATCH 4/4] ath9k: Fix TID locking
From: Sujith Manoharan @ 2013-05-07 23:33 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <1367969613-1867-1-git-send-email-sujith@msujith.org>
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
The TID state is accessed from various contexts without any
protection. Use the TX queue lock associated with the AC
to make sure that the TID data is locked properly.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/rc.c | 12 ++++++++----
drivers/net/wireless/ath/ath9k/xmit.c | 37 ++++++++++++++++++++---------------
2 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index aa4d368..aa1b63f 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1221,15 +1221,19 @@ static bool ath_tx_aggr_check(struct ath_softc *sc, struct ieee80211_sta *sta,
u8 tidno)
{
struct ath_node *an = (struct ath_node *)sta->drv_priv;
- struct ath_atx_tid *txtid;
+ struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tidno);
+ struct ath_txq *txq = txtid->ac->txq;
if (!sta->ht_cap.ht_supported)
return false;
- txtid = ATH_AN_2_TID(an, tidno);
+ ath_txq_lock(sc, txq);
+ if (!(txtid->state & (AGGR_ADDBA_COMPLETE | AGGR_ADDBA_PROGRESS))) {
+ ath_txq_unlock(sc, txq);
+ return true;
+ }
+ ath_txq_unlock(sc, txq);
- if (!(txtid->state & (AGGR_ADDBA_COMPLETE | AGGR_ADDBA_PROGRESS)))
- return true;
return false;
}
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index eab0fcb..655057d 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -131,16 +131,13 @@ static void ath_tx_resume_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
WARN_ON(!tid->paused);
- ath_txq_lock(sc, txq);
tid->paused = false;
if (skb_queue_empty(&tid->buf_q))
- goto unlock;
+ return;
ath_tx_queue_tid(txq, tid);
ath_txq_schedule(sc, txq);
-unlock:
- ath_txq_unlock_complete(sc, txq);
}
static struct ath_frame_info *get_frame_info(struct sk_buff *skb)
@@ -1224,15 +1221,17 @@ static void ath_tx_sched_aggr(struct ath_softc *sc, struct ath_txq *txq,
int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
u16 tid, u16 *ssn)
{
- struct ath_atx_tid *txtid;
- struct ath_node *an;
+ struct ath_node *an = (struct ath_node *)sta->drv_priv;
+ struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
+ struct ath_txq *txq = txtid->ac->txq;
u8 density;
- an = (struct ath_node *)sta->drv_priv;
- txtid = ATH_AN_2_TID(an, tid);
+ ath_txq_lock(sc, txq);
- if (txtid->state & (AGGR_CLEANUP | AGGR_ADDBA_COMPLETE))
+ if (txtid->state & (AGGR_CLEANUP | AGGR_ADDBA_COMPLETE)) {
+ ath_txq_unlock(sc, txq);
return -EAGAIN;
+ }
/* update ampdu factor/density, they may have changed. This may happen
* in HT IBSS when a beacon with HT-info is received after the station
@@ -1253,6 +1252,8 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
memset(txtid->tx_buf, 0, sizeof(txtid->tx_buf));
txtid->baw_head = txtid->baw_tail = 0;
+ ath_txq_unlock(sc, txq);
+
return 0;
}
@@ -1262,15 +1263,19 @@ void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
struct ath_txq *txq = txtid->ac->txq;
- if (txtid->state & AGGR_CLEANUP)
+ ath_txq_lock(sc, txq);
+
+ if (txtid->state & AGGR_CLEANUP) {
+ ath_txq_unlock(sc, txq);
return;
+ }
if (!(txtid->state & AGGR_ADDBA_COMPLETE)) {
txtid->state &= ~AGGR_ADDBA_PROGRESS;
+ ath_txq_unlock(sc, txq);
return;
}
- ath_txq_lock(sc, txq);
txtid->paused = true;
/*
@@ -1351,16 +1356,16 @@ void ath_tx_aggr_wakeup(struct ath_softc *sc, struct ath_node *an)
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
{
- struct ath_atx_tid *txtid;
- struct ath_node *an;
-
- an = (struct ath_node *)sta->drv_priv;
+ struct ath_node *an = (struct ath_node *)sta->drv_priv;
+ struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
+ struct ath_txq *txq = txtid->ac->txq;
- txtid = ATH_AN_2_TID(an, tid);
+ ath_txq_lock(sc, txq);
txtid->baw_size = IEEE80211_MIN_AMPDU_BUF << sta->ht_cap.ampdu_factor;
txtid->state |= AGGR_ADDBA_COMPLETE;
txtid->state &= ~AGGR_ADDBA_PROGRESS;
ath_tx_resume_tid(sc, txtid);
+ ath_txq_unlock_complete(sc, txq);
}
/********************/
--
1.8.2.2
^ permalink raw reply related
* [PATCH 3/4] ath9k: Do not use local_bh_disable in ampdu_action
From: Sujith Manoharan @ 2013-05-07 23:33 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <1367969613-1867-1-git-send-email-sujith@msujith.org>
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
This was added during the early conversion of ampdu_action
to a sleeping callback. There is no need to do this - instead,
use the normal mutex that is acquired for all callbacks.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 74a0482..a1630d1 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1688,7 +1688,7 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
struct ath_softc *sc = hw->priv;
int ret = 0;
- local_bh_disable();
+ mutex_lock(&sc->mutex);
switch (action) {
case IEEE80211_AMPDU_RX_START:
@@ -1719,7 +1719,7 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
ath_err(ath9k_hw_common(sc->sc_ah), "Unknown AMPDU action\n");
}
- local_bh_enable();
+ mutex_unlock(&sc->mutex);
return ret;
}
--
1.8.2.2
^ permalink raw reply related
* [PATCH 2/4] ath9k: Use bitops for scan flag
From: Sujith Manoharan @ 2013-05-07 23:33 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <1367969613-1867-1-git-send-email-sujith@msujith.org>
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ath9k.h | 2 +-
drivers/net/wireless/ath/ath9k/main.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 8a1888d..579ed9c 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -646,6 +646,7 @@ enum sc_op_flags {
SC_OP_ANI_RUN,
SC_OP_PRIM_STA_VIF,
SC_OP_HW_RESET,
+ SC_OP_SCANNING,
};
/* Powersave flags */
@@ -759,7 +760,6 @@ struct ath_softc {
struct rchan *rfs_chan_spec_scan;
enum spectral_mode spectral_mode;
struct ath_spec_scan spec_config;
- int scanning;
#ifdef CONFIG_PM_SLEEP
atomic_t wow_got_bmiss_intr;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 04bf88a..74a0482 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1272,7 +1272,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
curchan->center_freq);
} else {
/* perform spectral scan if requested. */
- if (sc->scanning &&
+ if (test_bit(SC_OP_SCANNING, &sc->sc_flags) &&
sc->spectral_mode == SPECTRAL_CHANSCAN)
ath9k_spectral_scan_trigger(hw);
}
@@ -2338,15 +2338,13 @@ static void ath9k_set_wakeup(struct ieee80211_hw *hw, bool enabled)
static void ath9k_sw_scan_start(struct ieee80211_hw *hw)
{
struct ath_softc *sc = hw->priv;
-
- sc->scanning = 1;
+ set_bit(SC_OP_SCANNING, &sc->sc_flags);
}
static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)
{
struct ath_softc *sc = hw->priv;
-
- sc->scanning = 0;
+ clear_bit(SC_OP_SCANNING, &sc->sc_flags);
}
struct ieee80211_ops ath9k_ops = {
--
1.8.2.2
^ permalink raw reply related
* [PATCH 1/4] ath9k: Remove MAC_DEBUG
From: Sujith Manoharan @ 2013-05-07 23:33 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
This option has not been enabled by default in any
distribution, has never been enabled in OpenWrt and no developer
has asked for this information in a bug report.
Dumping pages of random values doesn't help debugging,
remove this option (along with the vmalloc() abuse).
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/Kconfig | 8 -
drivers/net/wireless/ath/ath9k/debug.c | 337 ---------------------------------
drivers/net/wireless/ath/ath9k/debug.h | 20 --
drivers/net/wireless/ath/ath9k/init.c | 3 -
drivers/net/wireless/ath/ath9k/link.c | 1 -
drivers/net/wireless/ath/ath9k/main.c | 1 -
6 files changed, 370 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig
index 17507dc..ec33c80 100644
--- a/drivers/net/wireless/ath/ath9k/Kconfig
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
@@ -84,14 +84,6 @@ config ATH9K_DFS_CERTIFIED
developed. At this point enabling this option won't do anything
except increase code size.
-config ATH9K_MAC_DEBUG
- bool "Atheros MAC statistics"
- depends on ATH9K_DEBUGFS
- default y
- ---help---
- This option enables collection of statistics for Rx/Tx status
- data and some other MAC related statistics
-
config ATH9K_RATE_CONTROL
bool "Atheros ath9k rate control"
depends on ATH9K
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index e6307b8..fc96ad3 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -738,8 +738,6 @@ void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
struct ath_tx_status *ts, struct ath_txq *txq,
unsigned int flags)
{
-#define TX_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].ts\
- [sc->debug.tsidx].c)
int qnum = txq->axq_qnum;
TX_STAT_INC(qnum, tx_pkts_all);
@@ -771,37 +769,6 @@ void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
TX_STAT_INC(qnum, data_underrun);
if (ts->ts_flags & ATH9K_TX_DELIM_UNDERRUN)
TX_STAT_INC(qnum, delim_underrun);
-
-#ifdef CONFIG_ATH9K_MAC_DEBUG
- spin_lock(&sc->debug.samp_lock);
- TX_SAMP_DBG(jiffies) = jiffies;
- TX_SAMP_DBG(rssi_ctl0) = ts->ts_rssi_ctl0;
- TX_SAMP_DBG(rssi_ctl1) = ts->ts_rssi_ctl1;
- TX_SAMP_DBG(rssi_ctl2) = ts->ts_rssi_ctl2;
- TX_SAMP_DBG(rssi_ext0) = ts->ts_rssi_ext0;
- TX_SAMP_DBG(rssi_ext1) = ts->ts_rssi_ext1;
- TX_SAMP_DBG(rssi_ext2) = ts->ts_rssi_ext2;
- TX_SAMP_DBG(rateindex) = ts->ts_rateindex;
- TX_SAMP_DBG(isok) = !!(ts->ts_status & ATH9K_TXERR_MASK);
- TX_SAMP_DBG(rts_fail_cnt) = ts->ts_shortretry;
- TX_SAMP_DBG(data_fail_cnt) = ts->ts_longretry;
- TX_SAMP_DBG(rssi) = ts->ts_rssi;
- TX_SAMP_DBG(tid) = ts->tid;
- TX_SAMP_DBG(qid) = ts->qid;
-
- if (ts->ts_flags & ATH9K_TX_BA) {
- TX_SAMP_DBG(ba_low) = ts->ba_low;
- TX_SAMP_DBG(ba_high) = ts->ba_high;
- } else {
- TX_SAMP_DBG(ba_low) = 0;
- TX_SAMP_DBG(ba_high) = 0;
- }
-
- sc->debug.tsidx = (sc->debug.tsidx + 1) % ATH_DBG_MAX_SAMPLES;
- spin_unlock(&sc->debug.samp_lock);
-#endif
-
-#undef TX_SAMP_DBG
}
static const struct file_operations fops_xmit = {
@@ -915,8 +882,6 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf,
void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
{
#define RX_PHY_ERR_INC(c) sc->debug.stats.rxstats.phy_err_stats[c]++
-#define RX_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].rs\
- [sc->debug.rsidx].c)
RX_STAT_INC(rx_pkts_all);
sc->debug.stats.rxstats.rx_bytes_all += rs->rs_datalen;
@@ -940,27 +905,7 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
RX_PHY_ERR_INC(rs->rs_phyerr);
}
-#ifdef CONFIG_ATH9K_MAC_DEBUG
- spin_lock(&sc->debug.samp_lock);
- RX_SAMP_DBG(jiffies) = jiffies;
- RX_SAMP_DBG(rssi_ctl0) = rs->rs_rssi_ctl0;
- RX_SAMP_DBG(rssi_ctl1) = rs->rs_rssi_ctl1;
- RX_SAMP_DBG(rssi_ctl2) = rs->rs_rssi_ctl2;
- RX_SAMP_DBG(rssi_ext0) = rs->rs_rssi_ext0;
- RX_SAMP_DBG(rssi_ext1) = rs->rs_rssi_ext1;
- RX_SAMP_DBG(rssi_ext2) = rs->rs_rssi_ext2;
- RX_SAMP_DBG(antenna) = rs->rs_antenna;
- RX_SAMP_DBG(rssi) = rs->rs_rssi;
- RX_SAMP_DBG(rate) = rs->rs_rate;
- RX_SAMP_DBG(is_mybeacon) = rs->is_mybeacon;
-
- sc->debug.rsidx = (sc->debug.rsidx + 1) % ATH_DBG_MAX_SAMPLES;
- spin_unlock(&sc->debug.samp_lock);
-
-#endif
-
#undef RX_PHY_ERR_INC
-#undef RX_SAMP_DBG
}
static const struct file_operations fops_recv = {
@@ -1485,283 +1430,6 @@ static const struct file_operations fops_modal_eeprom = {
.llseek = default_llseek,
};
-#ifdef CONFIG_ATH9K_MAC_DEBUG
-
-void ath9k_debug_samp_bb_mac(struct ath_softc *sc)
-{
-#define ATH_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].c)
- struct ath_hw *ah = sc->sc_ah;
- struct ath_common *common = ath9k_hw_common(ah);
- unsigned long flags;
- int i;
-
- ath9k_ps_wakeup(sc);
-
- spin_lock_bh(&sc->debug.samp_lock);
-
- spin_lock_irqsave(&common->cc_lock, flags);
- ath_hw_cycle_counters_update(common);
-
- ATH_SAMP_DBG(cc.cycles) = common->cc_ani.cycles;
- ATH_SAMP_DBG(cc.rx_busy) = common->cc_ani.rx_busy;
- ATH_SAMP_DBG(cc.rx_frame) = common->cc_ani.rx_frame;
- ATH_SAMP_DBG(cc.tx_frame) = common->cc_ani.tx_frame;
- spin_unlock_irqrestore(&common->cc_lock, flags);
-
- ATH_SAMP_DBG(noise) = ah->noise;
-
- REG_WRITE_D(ah, AR_MACMISC,
- ((AR_MACMISC_DMA_OBS_LINE_8 << AR_MACMISC_DMA_OBS_S) |
- (AR_MACMISC_MISC_OBS_BUS_1 <<
- AR_MACMISC_MISC_OBS_BUS_MSB_S)));
-
- for (i = 0; i < ATH9K_NUM_DMA_DEBUG_REGS; i++)
- ATH_SAMP_DBG(dma_dbg_reg_vals[i]) = REG_READ_D(ah,
- AR_DMADBG_0 + (i * sizeof(u32)));
-
- ATH_SAMP_DBG(pcu_obs) = REG_READ_D(ah, AR_OBS_BUS_1);
- ATH_SAMP_DBG(pcu_cr) = REG_READ_D(ah, AR_CR);
-
- memcpy(ATH_SAMP_DBG(nfCalHist), sc->caldata.nfCalHist,
- sizeof(ATH_SAMP_DBG(nfCalHist)));
-
- sc->debug.sampidx = (sc->debug.sampidx + 1) % ATH_DBG_MAX_SAMPLES;
- spin_unlock_bh(&sc->debug.samp_lock);
- ath9k_ps_restore(sc);
-
-#undef ATH_SAMP_DBG
-}
-
-static int open_file_bb_mac_samps(struct inode *inode, struct file *file)
-{
-#define ATH_SAMP_DBG(c) bb_mac_samp[sampidx].c
- struct ath_softc *sc = inode->i_private;
- struct ath_hw *ah = sc->sc_ah;
- struct ath_common *common = ath9k_hw_common(ah);
- struct ieee80211_conf *conf = &common->hw->conf;
- struct ath_dbg_bb_mac_samp *bb_mac_samp;
- struct ath9k_nfcal_hist *h;
- int i, j, qcuOffset = 0, dcuOffset = 0;
- u32 *qcuBase, *dcuBase, size = 30000, len = 0;
- u32 sampidx = 0;
- u8 *buf;
- u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask;
- u8 nread;
-
- if (test_bit(SC_OP_INVALID, &sc->sc_flags))
- return -EAGAIN;
-
- buf = vmalloc(size);
- if (!buf)
- return -ENOMEM;
- bb_mac_samp = vmalloc(sizeof(*bb_mac_samp) * ATH_DBG_MAX_SAMPLES);
- if (!bb_mac_samp) {
- vfree(buf);
- return -ENOMEM;
- }
- /* Account the current state too */
- ath9k_debug_samp_bb_mac(sc);
-
- spin_lock_bh(&sc->debug.samp_lock);
- memcpy(bb_mac_samp, sc->debug.bb_mac_samp,
- sizeof(*bb_mac_samp) * ATH_DBG_MAX_SAMPLES);
- len += snprintf(buf + len, size - len,
- "Current Sample Index: %d\n", sc->debug.sampidx);
- spin_unlock_bh(&sc->debug.samp_lock);
-
- len += snprintf(buf + len, size - len,
- "Raw DMA Debug Dump:\n");
- len += snprintf(buf + len, size - len, "Sample |\t");
- for (i = 0; i < ATH9K_NUM_DMA_DEBUG_REGS; i++)
- len += snprintf(buf + len, size - len, " DMA Reg%d |\t", i);
- len += snprintf(buf + len, size - len, "\n");
-
- for (sampidx = 0; sampidx < ATH_DBG_MAX_SAMPLES; sampidx++) {
- len += snprintf(buf + len, size - len, "%d\t", sampidx);
-
- for (i = 0; i < ATH9K_NUM_DMA_DEBUG_REGS; i++)
- len += snprintf(buf + len, size - len, " %08x\t",
- ATH_SAMP_DBG(dma_dbg_reg_vals[i]));
- len += snprintf(buf + len, size - len, "\n");
- }
- len += snprintf(buf + len, size - len, "\n");
-
- len += snprintf(buf + len, size - len,
- "Sample Num QCU: chain_st fsp_ok fsp_st DCU: chain_st\n");
- for (sampidx = 0; sampidx < ATH_DBG_MAX_SAMPLES; sampidx++) {
- qcuBase = &ATH_SAMP_DBG(dma_dbg_reg_vals[0]);
- dcuBase = &ATH_SAMP_DBG(dma_dbg_reg_vals[4]);
-
- for (i = 0; i < ATH9K_NUM_QUEUES; i++,
- qcuOffset += 4, dcuOffset += 5) {
- if (i == 8) {
- qcuOffset = 0;
- qcuBase++;
- }
-
- if (i == 6) {
- dcuOffset = 0;
- dcuBase++;
- }
- if (!sc->debug.stats.txstats[i].queued)
- continue;
-
- len += snprintf(buf + len, size - len,
- "%4d %7d %2x %1x %2x %2x\n",
- sampidx, i,
- (*qcuBase & (0x7 << qcuOffset)) >> qcuOffset,
- (*qcuBase & (0x8 << qcuOffset)) >>
- (qcuOffset + 3),
- ATH_SAMP_DBG(dma_dbg_reg_vals[2]) &
- (0x7 << (i * 3)) >> (i * 3),
- (*dcuBase & (0x1f << dcuOffset)) >> dcuOffset);
- }
- len += snprintf(buf + len, size - len, "\n");
- }
- len += snprintf(buf + len, size - len,
- "samp qcu_sh qcu_fh qcu_comp dcu_comp dcu_arb dcu_fp "
- "ch_idle_dur ch_idle_dur_val txfifo_val0 txfifo_val1 "
- "txfifo_dcu0 txfifo_dcu1 pcu_obs AR_CR\n");
-
- for (sampidx = 0; sampidx < ATH_DBG_MAX_SAMPLES; sampidx++) {
- qcuBase = &ATH_SAMP_DBG(dma_dbg_reg_vals[0]);
- dcuBase = &ATH_SAMP_DBG(dma_dbg_reg_vals[4]);
-
- len += snprintf(buf + len, size - len, "%4d %5x %5x ", sampidx,
- (ATH_SAMP_DBG(dma_dbg_reg_vals[3]) & 0x003c0000) >> 18,
- (ATH_SAMP_DBG(dma_dbg_reg_vals[3]) & 0x03c00000) >> 22);
- len += snprintf(buf + len, size - len, "%7x %8x ",
- (ATH_SAMP_DBG(dma_dbg_reg_vals[3]) & 0x1c000000) >> 26,
- (ATH_SAMP_DBG(dma_dbg_reg_vals[6]) & 0x3));
- len += snprintf(buf + len, size - len, "%7x %7x ",
- (ATH_SAMP_DBG(dma_dbg_reg_vals[5]) & 0x06000000) >> 25,
- (ATH_SAMP_DBG(dma_dbg_reg_vals[5]) & 0x38000000) >> 27);
- len += snprintf(buf + len, size - len, "%7d %12d ",
- (ATH_SAMP_DBG(dma_dbg_reg_vals[6]) & 0x000003fc) >> 2,
- (ATH_SAMP_DBG(dma_dbg_reg_vals[6]) & 0x00000400) >> 10);
- len += snprintf(buf + len, size - len, "%12d %12d ",
- (ATH_SAMP_DBG(dma_dbg_reg_vals[6]) & 0x00000800) >> 11,
- (ATH_SAMP_DBG(dma_dbg_reg_vals[6]) & 0x00001000) >> 12);
- len += snprintf(buf + len, size - len, "%12d %12d ",
- (ATH_SAMP_DBG(dma_dbg_reg_vals[6]) & 0x0001e000) >> 13,
- (ATH_SAMP_DBG(dma_dbg_reg_vals[6]) & 0x001e0000) >> 17);
- len += snprintf(buf + len, size - len, "0x%07x 0x%07x\n",
- ATH_SAMP_DBG(pcu_obs), ATH_SAMP_DBG(pcu_cr));
- }
-
- len += snprintf(buf + len, size - len,
- "Sample ChNoise Chain privNF #Reading Readings\n");
- for (sampidx = 0; sampidx < ATH_DBG_MAX_SAMPLES; sampidx++) {
- h = ATH_SAMP_DBG(nfCalHist);
- if (!ATH_SAMP_DBG(noise))
- continue;
-
- for (i = 0; i < NUM_NF_READINGS; i++) {
- if (!(chainmask & (1 << i)) ||
- ((i >= AR5416_MAX_CHAINS) && !conf_is_ht40(conf)))
- continue;
-
- nread = AR_PHY_CCA_FILTERWINDOW_LENGTH -
- h[i].invalidNFcount;
- len += snprintf(buf + len, size - len,
- "%4d %5d %4d\t %d\t %d\t",
- sampidx, ATH_SAMP_DBG(noise),
- i, h[i].privNF, nread);
- for (j = 0; j < nread; j++)
- len += snprintf(buf + len, size - len,
- " %d", h[i].nfCalBuffer[j]);
- len += snprintf(buf + len, size - len, "\n");
- }
- }
- len += snprintf(buf + len, size - len, "\nCycle counters:\n"
- "Sample Total Rxbusy Rxframes Txframes\n");
- for (sampidx = 0; sampidx < ATH_DBG_MAX_SAMPLES; sampidx++) {
- if (!ATH_SAMP_DBG(cc.cycles))
- continue;
- len += snprintf(buf + len, size - len,
- "%4d %08x %08x %08x %08x\n",
- sampidx, ATH_SAMP_DBG(cc.cycles),
- ATH_SAMP_DBG(cc.rx_busy),
- ATH_SAMP_DBG(cc.rx_frame),
- ATH_SAMP_DBG(cc.tx_frame));
- }
-
- len += snprintf(buf + len, size - len, "Tx status Dump :\n");
- len += snprintf(buf + len, size - len,
- "Sample rssi:- ctl0 ctl1 ctl2 ext0 ext1 ext2 comb "
- "isok rts_fail data_fail rate tid qid "
- "ba_low ba_high tx_before(ms)\n");
- for (sampidx = 0; sampidx < ATH_DBG_MAX_SAMPLES; sampidx++) {
- for (i = 0; i < ATH_DBG_MAX_SAMPLES; i++) {
- if (!ATH_SAMP_DBG(ts[i].jiffies))
- continue;
- len += snprintf(buf + len, size - len, "%-14d"
- "%-4d %-4d %-4d %-4d %-4d %-4d %-4d %-4d %-8d "
- "%-9d %-4d %-3d %-3d %08x %08x %-11d\n",
- sampidx,
- ATH_SAMP_DBG(ts[i].rssi_ctl0),
- ATH_SAMP_DBG(ts[i].rssi_ctl1),
- ATH_SAMP_DBG(ts[i].rssi_ctl2),
- ATH_SAMP_DBG(ts[i].rssi_ext0),
- ATH_SAMP_DBG(ts[i].rssi_ext1),
- ATH_SAMP_DBG(ts[i].rssi_ext2),
- ATH_SAMP_DBG(ts[i].rssi),
- ATH_SAMP_DBG(ts[i].isok),
- ATH_SAMP_DBG(ts[i].rts_fail_cnt),
- ATH_SAMP_DBG(ts[i].data_fail_cnt),
- ATH_SAMP_DBG(ts[i].rateindex),
- ATH_SAMP_DBG(ts[i].tid),
- ATH_SAMP_DBG(ts[i].qid),
- ATH_SAMP_DBG(ts[i].ba_low),
- ATH_SAMP_DBG(ts[i].ba_high),
- jiffies_to_msecs(jiffies -
- ATH_SAMP_DBG(ts[i].jiffies)));
- }
- }
-
- len += snprintf(buf + len, size - len, "Rx status Dump :\n");
- len += snprintf(buf + len, size - len, "Sample rssi:- ctl0 ctl1 ctl2 "
- "ext0 ext1 ext2 comb beacon ant rate rx_before(ms)\n");
- for (sampidx = 0; sampidx < ATH_DBG_MAX_SAMPLES; sampidx++) {
- for (i = 0; i < ATH_DBG_MAX_SAMPLES; i++) {
- if (!ATH_SAMP_DBG(rs[i].jiffies))
- continue;
- len += snprintf(buf + len, size - len, "%-14d"
- "%-4d %-4d %-4d %-4d %-4d %-4d %-4d %-9s %-2d %02x %-13d\n",
- sampidx,
- ATH_SAMP_DBG(rs[i].rssi_ctl0),
- ATH_SAMP_DBG(rs[i].rssi_ctl1),
- ATH_SAMP_DBG(rs[i].rssi_ctl2),
- ATH_SAMP_DBG(rs[i].rssi_ext0),
- ATH_SAMP_DBG(rs[i].rssi_ext1),
- ATH_SAMP_DBG(rs[i].rssi_ext2),
- ATH_SAMP_DBG(rs[i].rssi),
- ATH_SAMP_DBG(rs[i].is_mybeacon) ?
- "True" : "False",
- ATH_SAMP_DBG(rs[i].antenna),
- ATH_SAMP_DBG(rs[i].rate),
- jiffies_to_msecs(jiffies -
- ATH_SAMP_DBG(rs[i].jiffies)));
- }
- }
-
- vfree(bb_mac_samp);
- file->private_data = buf;
-
- return 0;
-#undef ATH_SAMP_DBG
-}
-
-static const struct file_operations fops_samps = {
- .open = open_file_bb_mac_samps,
- .read = ath9k_debugfs_read_buf,
- .release = ath9k_debugfs_release_buf,
- .owner = THIS_MODULE,
- .llseek = default_llseek,
-};
-
-#endif
-
#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
static ssize_t read_file_btcoex(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
@@ -2087,11 +1755,6 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("spectral_fft_period", S_IRUSR | S_IWUSR,
sc->debug.debugfs_phy, sc,
&fops_spectral_fft_period);
-
-#ifdef CONFIG_ATH9K_MAC_DEBUG
- debugfs_create_file("samples", S_IRUSR, sc->debug.debugfs_phy, sc,
- &fops_samps);
-#endif
debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR,
sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask);
debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR,
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
index 794a7ec..62da19c 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -294,13 +294,6 @@ struct ath9k_debug {
struct dentry *debugfs_phy;
u32 regidx;
struct ath_stats stats;
-#ifdef CONFIG_ATH9K_MAC_DEBUG
- spinlock_t samp_lock;
- struct ath_dbg_bb_mac_samp bb_mac_samp[ATH_DBG_MAX_SAMPLES];
- u8 sampidx;
- u8 tsidx;
- u8 rsidx;
-#endif
};
int ath9k_init_debug(struct ath_hw *ah);
@@ -359,17 +352,4 @@ static inline void ath_debug_stat_rx(struct ath_softc *sc,
#endif /* CONFIG_ATH9K_DEBUGFS */
-#ifdef CONFIG_ATH9K_MAC_DEBUG
-
-void ath9k_debug_samp_bb_mac(struct ath_softc *sc);
-
-#else
-
-static inline void ath9k_debug_samp_bb_mac(struct ath_softc *sc)
-{
-}
-
-#endif
-
-
#endif /* DEBUG_H */
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 0237b28..c7b888f 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -613,9 +613,6 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
spin_lock_init(&sc->sc_serial_rw);
spin_lock_init(&sc->sc_pm_lock);
mutex_init(&sc->mutex);
-#ifdef CONFIG_ATH9K_MAC_DEBUG
- spin_lock_init(&sc->debug.samp_lock);
-#endif
tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc);
tasklet_init(&sc->bcon_tasklet, ath9k_beacon_tasklet,
(unsigned long)sc);
diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
index 849259b..cc422a4 100644
--- a/drivers/net/wireless/ath/ath9k/link.c
+++ b/drivers/net/wireless/ath/ath9k/link.c
@@ -418,7 +418,6 @@ void ath_ani_calibrate(unsigned long data)
longcal ? "long" : "", shortcal ? "short" : "",
aniflag ? "ani" : "", common->ani.caldone ? "true" : "false");
- ath9k_debug_samp_bb_mac(sc);
ath9k_ps_restore(sc);
set_timer:
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index a18414b..04bf88a 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -193,7 +193,6 @@ static bool ath_prepare_reset(struct ath_softc *sc)
ath_stop_ani(sc);
del_timer_sync(&sc->rx_poll_timer);
- ath9k_debug_samp_bb_mac(sc);
ath9k_hw_disable_interrupts(ah);
if (!ath_drain_all_txq(sc))
--
1.8.2.2
^ permalink raw reply related
* Re: [PATCH 3.10-rc] wireless: rt2x00: rt2800: fix hardware antenna diversity for RT5370G
From: Gertjan van Wingerde @ 2013-05-07 22:30 UTC (permalink / raw)
To: Xose Vazquez Perez
Cc: Ivo van Doorn, Helmut Schaa, John W. Linville,
users@rt2x00.serialmonkey.com, linux-wireless@vger.kernel.org
In-Reply-To: <1367957010-9496-1-git-send-email-xose.vazquez@gmail.com>
Hi Xose,
Sent from my iPad
On 7 mei 2013, at 22:03, Xose Vazquez Perez <xose.vazquez@gmail.com> wrote:
> RT5370G has hardware RX antenna diversity like RT5390R.
>
> based on 2012_03_22_RT5572_Linux_STA_v2.6.0.0_DPO
I'll check this patch tomorrow, when I get back home.
In the meantime some style related comments below.
>
> Cc: Ivo van Doorn <IvDoorn@gmail.com>
> Cc: Gertjan van Wingerde <gwingerde@gmail.com>
> Cc: Helmut Schaa <helmut.schaa@googlemail.com>
> Cc: John W. Linville <linville@tuxdriver.com>
> Cc: users@rt2x00.serialmonkey.com
> Cc: linux-wireless@vger.kernel.org
> Tested-by: wnewbie72@gmail.com
> Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
> ---
> drivers/net/wireless/rt2x00/rt2800.h | 3 ++-
> drivers/net/wireless/rt2x00/rt2800lib.c | 8 +++++---
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
> index a7630d5..6e84eee 100644
> --- a/drivers/net/wireless/rt2x00/rt2800.h
> +++ b/drivers/net/wireless/rt2x00/rt2800.h
> @@ -89,7 +89,8 @@
> #define REV_RT3090E 0x0211
> #define REV_RT3390E 0x0211
> #define REV_RT5390F 0x0502
> -#define REV_RT5390R 0x1502
> +#define REV_RT5370G 0x0503 /* hardware RX antenna diversity */
> +#define REV_RT5390R 0x1502 /* hardware RX antenna diversity */
> #define REV_RT5592C 0x0221
Please don't the comments to the chipset revision definitions. These macros are usually used all over the place; there is no need to specify this here.
>
> #define DEFAULT_RSSI_OFFSET 120
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index b52d70c..e202ec7 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -4311,8 +4311,9 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
> }
>
> - /* This chip has hardware antenna diversity*/
> - if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
> + /* These chips have hardware RX antenna diversity */
> + if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R) ||
> + rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5370G)) {
> rt2800_bbp_write(rt2x00dev, 150, 0); /* Disable Antenna Software OFDM */
> rt2800_bbp_write(rt2x00dev, 151, 0); /* Disable Antenna Software CCK */
> rt2800_bbp_write(rt2x00dev, 154, 0); /* Clear previously selected antenna */
With respect to the comment change: are you sure this is only about RX antenna diversity?
Also, I'm wondering if the change to the if condition brings us everything that is wanted. Checking the same chipset for different minimal revisions doesn't make a whole lot of sense to me.
Sure, you are fixing later RT5370 revisions here, but may be botching up early RT5390 revisions here at the same time
> @@ -5554,7 +5555,8 @@ static int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
> rt2x00dev->default_ant.rx = ANTENNA_A;
> }
>
> - if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
> + if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R) ||
> + rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5370G)) {
> rt2x00dev->default_ant.tx = ANTENNA_HW_DIVERSITY; /* Unused */
> rt2x00dev->default_ant.rx = ANTENNA_HW_DIVERSITY; /* Unused */
> }
The same comment on the if conditions apply here.
---
Gertjan
^ permalink raw reply
* Re: [rt2x00-users] [PATCH 3.10-rc] wireless: rt2x00: rt2800: fix hardware antenna diversity for RT5370G
From: Jakub Kicinski @ 2013-05-07 21:00 UTC (permalink / raw)
To: Xose Vazquez Perez; +Cc: linux-wireless, users
In-Reply-To: <1367957010-9496-1-git-send-email-xose.vazquez@gmail.com>
Hi...
seems like you have not addressed this patch directly to John, which I
think you should do [1].
[1] http://wireless.kernel.org/en/developers/Documentation/SubmittingPatches
On Tue, 7 May 2013 22:03:30 +0200, Xose Vazquez Perez wrote:
>RT5370G has hardware RX antenna diversity like RT5390R.
>
>based on 2012_03_22_RT5572_Linux_STA_v2.6.0.0_DPO
Note that this is not the latest vendor driver for RT5572, hw antenna
diversity didn't change though, so the logic seems correct.
>Cc: Ivo van Doorn <IvDoorn@gmail.com>
>Cc: Gertjan van Wingerde <gwingerde@gmail.com>
>Cc: Helmut Schaa <helmut.schaa@googlemail.com>
>Cc: John W. Linville <linville@tuxdriver.com>
>Cc: users@rt2x00.serialmonkey.com
>Cc: linux-wireless@vger.kernel.org
>Tested-by: wnewbie72@gmail.com
>Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
>---
> drivers/net/wireless/rt2x00/rt2800.h | 3 ++-
> drivers/net/wireless/rt2x00/rt2800lib.c | 8 +++++---
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
>index a7630d5..6e84eee 100644
>--- a/drivers/net/wireless/rt2x00/rt2800.h
>+++ b/drivers/net/wireless/rt2x00/rt2800.h
>@@ -89,7 +89,8 @@
> #define REV_RT3090E 0x0211
> #define REV_RT3390E 0x0211
> #define REV_RT5390F 0x0502
>-#define REV_RT5390R 0x1502
>+#define REV_RT5370G 0x0503 /* hardware RX antenna diversity */
>+#define REV_RT5390R 0x1502 /* hardware RX antenna diversity */
Line > 80 chars. hardware -> hw should be enough?
> #define REV_RT5592C 0x0221
>
> #define DEFAULT_RSSI_OFFSET 120
>diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
>index b52d70c..e202ec7 100644
>--- a/drivers/net/wireless/rt2x00/rt2800lib.c
>+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
>@@ -4311,8 +4311,9 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
> rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
> }
>
>- /* This chip has hardware antenna diversity*/
>- if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
>+ /* These chips have hardware RX antenna diversity */
>+ if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R) ||
>+ rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5370G)) {
Indentation of conditions seems wrong... Please run
checkpatch.pl --strict on your changes.
Thanks for sending the patch! (:
-- Kuba
^ permalink raw reply
* Re: Memory leak in mwifiex_cfg80211_scan
From: Daniel Drake @ 2013-05-07 20:15 UTC (permalink / raw)
To: Bing Zhao; +Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar
In-Reply-To: <477F20668A386D41ADCC57781B1F70430DD2C9FC92@SC-VEXCH1.marvell.com>
On Mon, May 6, 2013 at 12:42 PM, Bing Zhao <bzhao@marvell.com> wrote:
> There are two different static mwifiex_free_adapter() functions which cause confusion.
> The 1/2 patch renames the one in init.c to mwifiex_adapter_cleanup().
Thanks, that was confusing indeed.
With these patches I can't trigger any further crashes.
I think you should use del_timer_sync() though, for the SMP case where
the timer may be running on a different processor.
Daniel
^ permalink raw reply
* [PATCH 3.10-rc] wireless: rt2x00: rt2800: fix hardware antenna diversity for RT5370G
From: Xose Vazquez Perez @ 2013-05-07 20:03 UTC (permalink / raw)
Cc: Xose Vazquez Perez, Ivo van Doorn, Gertjan van Wingerde,
Helmut Schaa, John W. Linville, users, linux-wireless
RT5370G has hardware RX antenna diversity like RT5390R.
based on 2012_03_22_RT5572_Linux_STA_v2.6.0.0_DPO
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: users@rt2x00.serialmonkey.com
Cc: linux-wireless@vger.kernel.org
Tested-by: wnewbie72@gmail.com
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800.h | 3 ++-
drivers/net/wireless/rt2x00/rt2800lib.c | 8 +++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index a7630d5..6e84eee 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -89,7 +89,8 @@
#define REV_RT3090E 0x0211
#define REV_RT3390E 0x0211
#define REV_RT5390F 0x0502
-#define REV_RT5390R 0x1502
+#define REV_RT5370G 0x0503 /* hardware RX antenna diversity */
+#define REV_RT5390R 0x1502 /* hardware RX antenna diversity */
#define REV_RT5592C 0x0221
#define DEFAULT_RSSI_OFFSET 120
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index b52d70c..e202ec7 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4311,8 +4311,9 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
rt2800_register_write(rt2x00dev, GPIO_CTRL, reg);
}
- /* This chip has hardware antenna diversity*/
- if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
+ /* These chips have hardware RX antenna diversity */
+ if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R) ||
+ rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5370G)) {
rt2800_bbp_write(rt2x00dev, 150, 0); /* Disable Antenna Software OFDM */
rt2800_bbp_write(rt2x00dev, 151, 0); /* Disable Antenna Software CCK */
rt2800_bbp_write(rt2x00dev, 154, 0); /* Clear previously selected antenna */
@@ -5554,7 +5555,8 @@ static int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
rt2x00dev->default_ant.rx = ANTENNA_A;
}
- if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
+ if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R) ||
+ rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5370G)) {
rt2x00dev->default_ant.tx = ANTENNA_HW_DIVERSITY; /* Unused */
rt2x00dev->default_ant.rx = ANTENNA_HW_DIVERSITY; /* Unused */
}
--
1.7.11.7
^ permalink raw reply related
* Re: Linux summit this year ?
From: Marcel Holtmann @ 2013-05-07 18:30 UTC (permalink / raw)
To: Seth Forshee
Cc: John W. Linville, Johannes Berg, Larry Finger, Matt Chen, joeyli,
linux-wireless
In-Reply-To: <20130507164236.GD32496@thinkpad-t410>
Hi Seth,
>>>> "I'm confirming that we got the space you needed for the Wireless Summit in
>>>> New Orleans.
>>>
>>>> Does that sound alright to everyone?
>>>
>>> Sounds good to me. If it overlaps LPC, which one are people going to
>>> have to register for (if not going to both anyway)?
>>
>> I would presume that if you want to got to LPC sessions then you
>> would have to register for LPC. Generally we have required Wireless
>> Summit attendees to register for LinuxCon, and I presume that would
>> be required this time (so both LinuxCon and LPC if you want the
>> LPC sessions).
>
> Why require LinuxCon registration rather than LPC? I'd assume most
> wireless summit attendees are more interested in plumbers than LinuxCon.
> Could the summit just require registration at one or the other?
the LinuxCon is providing the space for us and not the PlumbersConf. So registration to LinuxCon is what is required here. Otherwise we would have to figure out on how to pay for the space and everything around it by ourselves.
I don't think that the LinuxCon registration fee will be a big problem for anyone working for a company. And if you give a talk at LinuxCon, you can get free access to the Wireless Summit as well. That said, if we have students or other people with limited funds wanting to attend the Wireless Summit, please email John and myself privately and we can try to figure something out.
Regards
Marcel
^ permalink raw reply
* Cannot set frequency on phy device in 3.9.0+ ??
From: Ben Greear @ 2013-05-07 17:02 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
Seems like this used to work. NIC is ath9k_htc driver, configured with one
VAP and one station. Both are admin down, but still get EBUSY when trying
to set the frequency. Seems like this used to work (on ath9k driver, at least).
[root@lec2010-ath9k-1 lanforge]# ifconfig wlan1
wlan1 Link encap:Ethernet HWaddr A0:F3:C1:24:61:2B
inet addr:11.97.2.5 Bcast:11.97.255.255 Mask:255.255.0.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:761 errors:0 dropped:0 overruns:0 frame:0
TX packets:402 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:129222 (126.1 KiB) TX bytes:74364 (72.6 KiB)
[root@lec2010-ath9k-1 lanforge]# ifconfig vap1
vap1 Link encap:Ethernet HWaddr 00:A0:00:00:00:90
inet addr:10.99.1.1 Bcast:10.99.255.255 Mask:255.255.0.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:16435018 errors:0 dropped:0 overruns:0 frame:0
TX packets:9082445 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2204413501 (2.0 GiB) TX bytes:1451899217 (1.3 GiB)
[root@lec2010-ath9k-1 lanforge]# ./local/sbin/iw phy wiphy1 set freq 2437
command failed: Device or resource busy (-16)
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: Linux summit this year ?
From: Seth Forshee @ 2013-05-07 16:42 UTC (permalink / raw)
To: John W. Linville
Cc: Johannes Berg, Marcel Holtmann, Larry Finger, Matt Chen, joeyli,
linux-wireless
In-Reply-To: <20130503144947.GF2069@tuxdriver.com>
On Fri, May 03, 2013 at 10:49:47AM -0400, John W. Linville wrote:
> On Fri, May 03, 2013 at 10:11:10AM +0200, Johannes Berg wrote:
> > On Thu, 2013-05-02 at 15:43 -0400, John W. Linville wrote:
> >
> > > "I'm confirming that we got the space you needed for the Wireless Summit in
> > > New Orleans.
> >
> > > Does that sound alright to everyone?
> >
> > Sounds good to me. If it overlaps LPC, which one are people going to
> > have to register for (if not going to both anyway)?
>
> I would presume that if you want to got to LPC sessions then you
> would have to register for LPC. Generally we have required Wireless
> Summit attendees to register for LinuxCon, and I presume that would
> be required this time (so both LinuxCon and LPC if you want the
> LPC sessions).
Why require LinuxCon registration rather than LPC? I'd assume most
wireless summit attendees are more interested in plumbers than LinuxCon.
Could the summit just require registration at one or the other?
^ permalink raw reply
* Re: [PATCH v6] cfg80211: P2P find phase offload
From: Johannes Berg @ 2013-05-07 16:35 UTC (permalink / raw)
To: Vladimir Kondratiev
Cc: linux-wireless, Luis R . Rodriguez, John W . Linville,
Jouni Malinen
In-Reply-To: <3561208.okpkftdEFW@lx-vladimir>
On Tue, 2013-05-07 at 19:27 +0300, Vladimir Kondratiev wrote:
> > starting the p2p find? I mean, it seems that should implicitly enable
> > the filter? Or is there a reason you think this command would be useful
> > _without_ enabling the filter??
>
> Packet filtering already managed by the wpa_sup; and is kind of orthogonal
> to the p2p flows. Yes, wpa_sup need to assemble reasonable combinations to
> make whole system work. I want wpa_sup to take care of packet filtering;
> it deals with filtering within the cfg80211_rx_mgmt().
>
> wpa_sup may have its own idea for filtering, it may be more restrictive
> then just pass all probe-request and probe-response frames.
>
> Technically it is possible to call cfg80211_mlme_register_mgmt and
> cfg80211_mlme_unregister_socket, but then I need to save nlportid, and it
> becomes more complicated then it is when wpa_sup takes care of filtering.
Yeah, never mind. That isn't really filtering but the reporting, which
may be tied to filtering internally to the driver (but that makes sense,
if nobody cares about the frame it can drop them.)
> > Please clarify whether or not this should be called when a stop is
> > explicitly requested by userspace. I don't think it's all that useful,
> > and if required maybe cfg80211 should send the event itself instead of
> > having the driver do it?
>
> There may be delay between request from wpa_sup and actual end of p2p find.
> I want wpa_sup to know when p2p find actually get finished; for timing/race
> reasons.
Yes, but I think you should then document that the driver must call this
even when requested by cfg80211 to stop.
johannes
^ permalink raw reply
* Re: [PATCH v6] cfg80211: P2P find phase offload
From: Vladimir Kondratiev @ 2013-05-07 16:27 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Luis R . Rodriguez, John W . Linville,
Jouni Malinen
In-Reply-To: <1367935836.8328.45.camel@jlt4.sipsolutions.net>
On Tuesday, May 07, 2013 04:10:36 PM Johannes Berg wrote:
> Hi,
>
> sorry for the delay. Looks good, a few comments below.
>
> > to perform p2p scan, wpa_supplicant:
> > - perform legacy scan, through driver's cfg80211_ops 'scan' method
> > - configure rx management filter to get probe-request and probe-response frames
>
> Does that part make sense? Why should the supplicant be required to
> configure the filter, if the next thing is going to be
>
> > - start p2p find via driver's cfg80211_ops start_p2p_find method
>
> starting the p2p find? I mean, it seems that should implicitly enable
> the filter? Or is there a reason you think this command would be useful
> _without_ enabling the filter??
Packet filtering already managed by the wpa_sup; and is kind of orthogonal
to the p2p flows. Yes, wpa_sup need to assemble reasonable combinations to
make whole system work. I want wpa_sup to take care of packet filtering;
it deals with filtering within the cfg80211_rx_mgmt().
wpa_sup may have its own idea for filtering, it may be more restrictive
then just pass all probe-request and probe-response frames.
Technically it is possible to call cfg80211_mlme_register_mgmt and
cfg80211_mlme_unregister_socket, but then I need to save nlportid, and it
becomes more complicated then it is when wpa_sup takes care of filtering.
>
> > +/**
> > + * cfg80211_p2p_find_notify_end - report p2p find phase ended
> > + * @wdev: the wireless device reporting the event
> > + * @gfp: allocation flags
> > + *
> > + * p2p find phase may be ended either unsolicited or in response to
> > + * ops->p2p_stop_find
> > + *
> > + * In any case, if @start_p2p_find from driver's struct cfg80211_ops called,
> > + * @cfg80211_p2p_find_notify_end should be eventually called
> > + */
> > +void cfg80211_p2p_find_notify_end(struct wireless_dev *wdev, gfp_t gfp);
>
> Please clarify whether or not this should be called when a stop is
> explicitly requested by userspace. I don't think it's all that useful,
> and if required maybe cfg80211 should send the event itself instead of
> having the driver do it?
There may be delay between request from wpa_sup and actual end of p2p find.
I want wpa_sup to know when p2p find actually get finished; for timing/race
reasons.
>
> > + * @NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL:
> > + * @NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL: min/max discoverable interval
> > + * for the p2p find, multiple of 100 TUs, represented as u32
> > + *
> > + *
>
> One blank line is enough :-)
Sure, will fix. Perhaps, I was not careful when rebasing.
>
> > + struct cfg80211_p2p_find_params params = {};
>
> > + attr = info->attrs[NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL];
> > + if (attr)
> > + params.min_discoverable_interval = nla_get_u32(attr);
> > +
> > + attr = info->attrs[NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL];
> > + if (attr)
> > + params.max_discoverable_interval = nla_get_u32(attr);
>
> Shouldn't those have better defaults than 0/0? Or should they just be
> required?
You are right: defaults, accordingly to spec, are 1 and 3; I'll fix.
>
> > + TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", disc. int. [%d..%d]"
> > + ", n_channels %d",
>
> you shouldn't break strings across lines (and in fact checkpatch
> shouldn't warn about 80 cols there, but if it does ignore it)
Sure.
>
> johannes
Let me some 1 day to cook next version.
^ permalink raw reply
* Re: Standardisation - adding 2 bit STBC and Ness to MCS
From: Jonathan Bither @ 2013-05-07 16:09 UTC (permalink / raw)
To: Oleksij Rempel; +Cc: linux-wireless, Johannes Berg, radiotap
In-Reply-To: <518917C4.9090607@rempel-privat.de>
On Tue 07 May 2013 11:03:32 AM EDT, Oleksij Rempel wrote:
> Am 07.05.2013 16:59, schrieb Jonathan Bither:
>>
>>
>> On 05/07/2013 09:55 AM, Johannes Berg wrote:
>>> On Tue, 2013-05-07 at 15:54 +0200, Johannes Berg wrote:
>>>> On Tue, 2013-05-07 at 09:40 +0200, Oleksij Rempel wrote:
>>>>> Am 02.05.2013 22:44, schrieb Johannes Berg:
>>>>>> On Wed, 2013-05-01 at 16:34 +0200, Oleksij Rempel wrote:
>>>>>>
>>>>>>>> With this I believe we have everything needed to start the 3 week
>>>>>>>> comment period.
>>>>>>
>>>>>> Yeah, I guess there was plenty of time. I would have preferred a
>>>>>> separate thread, but I guess there's little enough traffic on this
>>>>>> list
>>>>>> so it doesn't really matter.
>>>>>>
>>>>>>> There is a bit more then 3 week now. I would like to have this
>>>>>>> approved :)
>>>>>>> Are there any thing needed to finish this?
>>>>>>
>>>>>> http://www.radiotap.org/Standardisation
>>>>>>
>>>>>> johannes
>>>>>>
>>>>>
>>>>> ping.
>>>>>
>>>>> Johannes, are you the one who says last word on standardisation for
>>>>> radiotap?
>>>>
>>>> No? I thought the link made that pretty clear.
>>>>
>>>> But since nobody poked holes in this and it's been a long time, I
>>>> think
>>>> you should probably just post "this has been adopted now" ...
>>>
>>> Or actually, go to step 5, preferably reposting it as a separate
>>> thread.
>> It looks as if someone already proposed this as a suggested field on
>> '2012-05-14 23:49:35' without any replies as far as I can tell.
>> http://www.radiotap.org/suggested-fields/MCS%20extension%20for%20STBC%20and%20Ness
>>
>
> Yes, Simon did it last year. I send this link on my first email...
> In my opinion, this should be just ACKed. Every thing what was needed
> to do, is already done.
>
Whoops, one of those days I guess. Sorry for the noise.
^ permalink raw reply
* [PATCH 3.10] iwl4965: workaround connection regression on passive channel
From: Stanislaw Gruszka @ 2013-05-07 16:07 UTC (permalink / raw)
To: John W. Linville; +Cc: Jake Edge, linux-wireless, lkml, Johannes Berg
In-Reply-To: <20130507153525.GB1576@redhat.com>
Jake reported that since commit 1672c0e31917f49d31d30d79067103432bc20cc7
"mac80211: start auth/assoc timeout on frame status", he is unable to
connect to his AP, which is configured to use passive channel.
After switch to passive channel 4965 firmware drops any TX packet until
it receives beacon. Before commit 1672c0e3 we waited on channel and
retransmit packet after 200ms, that makes we receive beacon on the
meantime and association process succeed. New mac80211 behaviour cause
that any ASSOC frame fail immediately on iwl4965 and we can not
associate.
This patch restore old mac80211 behaviour for iwl4965, by removing
IEEE80211_HW_REPORTS_TX_ACK_STATUS feature. This feature will be
added again to iwl4965 driver, when different, more complex
workaround for this firmware issue, will be added to the driver.
Cc: stable@vger.kernel.org # 3.9
Bisected-by: Jake Edge <jake@lwn.net>
Reported-and-tested-by: Jake Edge <jake@lwn.net>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/wireless/iwlegacy/4965-mac.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index b8f82e6..9a95045 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -5741,8 +5741,7 @@ il4965_mac_setup_register(struct il_priv *il, u32 max_probe_length)
hw->flags =
IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_AMPDU_AGGREGATION |
IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | IEEE80211_HW_SPECTRUM_MGMT |
- IEEE80211_HW_REPORTS_TX_ACK_STATUS | IEEE80211_HW_SUPPORTS_PS |
- IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
+ IEEE80211_HW_SUPPORTS_PS | IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
if (il->cfg->sku & IL_SKU_N)
hw->flags |=
IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
--
1.7.11.7
^ 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