diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2013-08-05 21:51:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-09 15:57:46 -0400 |
commit | 0434c464999ca73586be2c513aaa09fd1dc38595 (patch) | |
tree | 753585e40263bb75766d9e7d4f2ddc0811a1c2e6 /drivers/net | |
parent | 3f4e854a2d7d5fdb2f6e9e693903085a21ea0d5e (diff) |
mwifiex: modify mwifiex_is_pattern_supported() routine
It is modified so that it can be reused for coalesce feature.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 326f4d9a8462..62c3d9880607 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -2309,7 +2309,8 @@ EXPORT_SYMBOL_GPL(mwifiex_del_virtual_intf); | |||
2309 | 2309 | ||
2310 | #ifdef CONFIG_PM | 2310 | #ifdef CONFIG_PM |
2311 | static bool | 2311 | static bool |
2312 | mwifiex_is_pattern_supported(struct cfg80211_pkt_pattern *pat, s8 *byte_seq) | 2312 | mwifiex_is_pattern_supported(struct cfg80211_pkt_pattern *pat, s8 *byte_seq, |
2313 | u8 max_byte_seq) | ||
2313 | { | 2314 | { |
2314 | int j, k, valid_byte_cnt = 0; | 2315 | int j, k, valid_byte_cnt = 0; |
2315 | bool dont_care_byte = false; | 2316 | bool dont_care_byte = false; |
@@ -2327,12 +2328,12 @@ mwifiex_is_pattern_supported(struct cfg80211_pkt_pattern *pat, s8 *byte_seq) | |||
2327 | dont_care_byte = true; | 2328 | dont_care_byte = true; |
2328 | } | 2329 | } |
2329 | 2330 | ||
2330 | if (valid_byte_cnt > MWIFIEX_MEF_MAX_BYTESEQ) | 2331 | if (valid_byte_cnt > max_byte_seq) |
2331 | return false; | 2332 | return false; |
2332 | } | 2333 | } |
2333 | } | 2334 | } |
2334 | 2335 | ||
2335 | byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] = valid_byte_cnt; | 2336 | byte_seq[max_byte_seq] = valid_byte_cnt; |
2336 | 2337 | ||
2337 | return true; | 2338 | return true; |
2338 | } | 2339 | } |
@@ -2375,7 +2376,8 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy, | |||
2375 | for (i = 0; i < wowlan->n_patterns; i++) { | 2376 | for (i = 0; i < wowlan->n_patterns; i++) { |
2376 | memset(byte_seq, 0, sizeof(byte_seq)); | 2377 | memset(byte_seq, 0, sizeof(byte_seq)); |
2377 | if (!mwifiex_is_pattern_supported(&wowlan->patterns[i], | 2378 | if (!mwifiex_is_pattern_supported(&wowlan->patterns[i], |
2378 | byte_seq)) { | 2379 | byte_seq, |
2380 | MWIFIEX_MEF_MAX_BYTESEQ)) { | ||
2379 | wiphy_err(wiphy, "Pattern not supported\n"); | 2381 | wiphy_err(wiphy, "Pattern not supported\n"); |
2380 | kfree(mef_entry); | 2382 | kfree(mef_entry); |
2381 | return -EOPNOTSUPP; | 2383 | return -EOPNOTSUPP; |