summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorNitin Bindal <nbindal@nvidia.com>2012-10-25 18:05:01 +0530
committerSimone Willett <swillett@nvidia.com>2012-10-31 19:15:10 -0700
commita693da8b6eae7b315221ba0ee895415cf89f44ca (patch)
tree46b6da8f2e1f61d1fccef58b9b91e6b318ad4d68 /net
parentcca9dbb7d5c4caf9ffa171a4be7789220bb61fbc (diff)
Revert "mac80211&nl80211: support to abort a scan request on tx"
This reverts commit 4ffe2cabbc00d9d12a3884178e3f85aa9f66804c. This revert fixes p2p connect issue on android. Bug 1161910 Bug 1059518 Change-Id: I2d10b2cf57fab88ccdfd3d2eca6cdeb36ef9f544 Signed-off-by: Nitin Bindal <nbindal@nvidia.com> Reviewed-on: http://git-master/r/147584 Reviewed-by: Rakesh Kumar <krakesh@nvidia.com> Tested-by: Rakesh Kumar <krakesh@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ieee80211_i.h6
-rw-r--r--net/mac80211/scan.c36
-rw-r--r--net/wireless/nl80211.c7
3 files changed, 6 insertions, 43 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 3c143b4ed1e1..db8fae51714c 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -808,10 +808,6 @@ enum {
* @SCAN_SUSPEND: Suspend the scan and go back to operating channel to
* send out data
* @SCAN_RESUME: Resume the scan and scan the next channel
- * @SCAN_ABORT: Abnormally terminate the scan operation, set only when
- * on the operating channel
- * @SCAN_SUSPEND_ABORT: Return to the operating channel then
- * terminate the scan operation
*/
enum mac80211_scan_state {
SCAN_DECISION,
@@ -819,8 +815,6 @@ enum mac80211_scan_state {
SCAN_SEND_PROBE,
SCAN_SUSPEND,
SCAN_RESUME,
- SCAN_ABORT,
- SCAN_SUSPEND_ABORT,
};
struct ieee80211_local {
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 7d61c8acfaa3..c70e17677135 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -487,7 +487,6 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
unsigned long min_beacon_int = 0;
struct ieee80211_sub_if_data *sdata;
struct ieee80211_channel *next_chan;
- enum mac80211_scan_state next_scan_state;
/*
* check if at least one STA interface is associated,
@@ -546,24 +545,10 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
usecs_to_jiffies(min_beacon_int * 1024) *
local->hw.conf.listen_interval);
- if (associated && !tx_empty) {
- if (unlikely(local->scan_req->flags &
- CFG80211_SCAN_FLAG_TX_ABORT)) {
- /*
- * Scan request is marked to abort when there
- * is outbound traffic. Mark state to return
- * the operating channel and then abort. This
- * happens as soon as possible.
- */
- next_scan_state = SCAN_SUSPEND_ABORT;
- } else
- next_scan_state = SCAN_SUSPEND;
- } else if (associated && (bad_latency || listen_int_exceeded))
- next_scan_state = SCAN_SUSPEND;
+ if (associated && (!tx_empty || bad_latency || listen_int_exceeded))
+ local->next_scan_state = SCAN_SUSPEND;
else
- next_scan_state = SCAN_SET_CHANNEL;
-
- local->next_scan_state = next_scan_state;
+ local->next_scan_state = SCAN_SET_CHANNEL;
*next_delay = 0;
}
@@ -651,14 +636,9 @@ static void ieee80211_scan_state_suspend(struct ieee80211_local *local,
*/
ieee80211_offchannel_return(local, false);
- if (local->next_scan_state == SCAN_SUSPEND) {
- *next_delay = HZ / 5;
- /* afterwards, resume scan & go to next channel */
- local->next_scan_state = SCAN_RESUME;
- } else {
- *next_delay = 0;
- local->next_scan_state = SCAN_ABORT;
- }
+ *next_delay = HZ / 5;
+ /* afterwards, resume scan & go to next channel */
+ local->next_scan_state = SCAN_RESUME;
}
static void ieee80211_scan_state_resume(struct ieee80211_local *local,
@@ -751,15 +731,11 @@ void ieee80211_scan_work(struct work_struct *work)
ieee80211_scan_state_send_probe(local, &next_delay);
break;
case SCAN_SUSPEND:
- case SCAN_SUSPEND_ABORT:
ieee80211_scan_state_suspend(local, &next_delay);
break;
case SCAN_RESUME:
ieee80211_scan_state_resume(local, &next_delay);
break;
- case SCAN_ABORT:
- aborted = true;
- goto out_complete;
}
} while (next_delay == 0);
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 22b74e7f217d..e0e655b4b80a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -136,7 +136,6 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
[NL80211_ATTR_MGMT_SUBTYPE] = { .type = NLA_U8 },
[NL80211_ATTR_IE] = { .type = NLA_BINARY,
.len = IEEE80211_MAX_DATA_LEN },
- [NL80211_ATTR_SCAN_FLAGS] = { .type = NLA_U32 },
[NL80211_ATTR_SCAN_FREQUENCIES] = { .type = NLA_NESTED },
[NL80211_ATTR_SCAN_SSIDS] = { .type = NLA_NESTED },
@@ -3868,10 +3867,6 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
request->no_cck =
nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]);
- if (info->attrs[NL80211_ATTR_SCAN_FLAGS])
- request->flags = nla_get_u32(
- info->attrs[NL80211_ATTR_SCAN_FLAGS]);
-
request->dev = dev;
request->wiphy = &rdev->wiphy;
@@ -6928,8 +6923,6 @@ static int nl80211_add_scan_req(struct sk_buff *msg,
if (req->ie)
NLA_PUT(msg, NL80211_ATTR_IE, req->ie_len, req->ie);
- NLA_PUT_U32(msg, NL80211_ATTR_SCAN_FLAGS, req->flags);
-
return 0;
nla_put_failure:
return -ENOBUFS;