mirror of https://gitee.com/openkylin/linux.git
mwifiex: rename mef macros
Their names were generic. We need to define similar macros for coalesce feature. Hence they are renamed here. 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>
This commit is contained in:
parent
fa5978447c
commit
3f4e854a2d
|
@ -2327,12 +2327,12 @@ mwifiex_is_pattern_supported(struct cfg80211_pkt_pattern *pat, s8 *byte_seq)
|
||||||
dont_care_byte = true;
|
dont_care_byte = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (valid_byte_cnt > MAX_BYTESEQ)
|
if (valid_byte_cnt > MWIFIEX_MEF_MAX_BYTESEQ)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
byte_seq[MAX_BYTESEQ] = valid_byte_cnt;
|
byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] = valid_byte_cnt;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2345,7 +2345,7 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
|
||||||
struct mwifiex_mef_entry *mef_entry;
|
struct mwifiex_mef_entry *mef_entry;
|
||||||
int i, filt_num = 0, ret;
|
int i, filt_num = 0, ret;
|
||||||
bool first_pat = true;
|
bool first_pat = true;
|
||||||
u8 byte_seq[MAX_BYTESEQ + 1];
|
u8 byte_seq[MWIFIEX_MEF_MAX_BYTESEQ + 1];
|
||||||
const u8 ipv4_mc_mac[] = {0x33, 0x33};
|
const u8 ipv4_mc_mac[] = {0x33, 0x33};
|
||||||
const u8 ipv6_mc_mac[] = {0x01, 0x00, 0x5e};
|
const u8 ipv6_mc_mac[] = {0x01, 0x00, 0x5e};
|
||||||
struct mwifiex_private *priv =
|
struct mwifiex_private *priv =
|
||||||
|
@ -2383,16 +2383,16 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
|
||||||
|
|
||||||
if (!wowlan->patterns[i].pkt_offset) {
|
if (!wowlan->patterns[i].pkt_offset) {
|
||||||
if (!(byte_seq[0] & 0x01) &&
|
if (!(byte_seq[0] & 0x01) &&
|
||||||
(byte_seq[MAX_BYTESEQ] == 1)) {
|
(byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] == 1)) {
|
||||||
mef_cfg.criteria |= MWIFIEX_CRITERIA_UNICAST;
|
mef_cfg.criteria |= MWIFIEX_CRITERIA_UNICAST;
|
||||||
continue;
|
continue;
|
||||||
} else if (is_broadcast_ether_addr(byte_seq)) {
|
} else if (is_broadcast_ether_addr(byte_seq)) {
|
||||||
mef_cfg.criteria |= MWIFIEX_CRITERIA_BROADCAST;
|
mef_cfg.criteria |= MWIFIEX_CRITERIA_BROADCAST;
|
||||||
continue;
|
continue;
|
||||||
} else if ((!memcmp(byte_seq, ipv4_mc_mac, 2) &&
|
} else if ((!memcmp(byte_seq, ipv4_mc_mac, 2) &&
|
||||||
(byte_seq[MAX_BYTESEQ] == 2)) ||
|
(byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] == 2)) ||
|
||||||
(!memcmp(byte_seq, ipv6_mc_mac, 3) &&
|
(!memcmp(byte_seq, ipv6_mc_mac, 3) &&
|
||||||
(byte_seq[MAX_BYTESEQ] == 3))) {
|
(byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] == 3))) {
|
||||||
mef_cfg.criteria |= MWIFIEX_CRITERIA_MULTICAST;
|
mef_cfg.criteria |= MWIFIEX_CRITERIA_MULTICAST;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2418,7 +2418,8 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
|
||||||
mef_entry->filter[filt_num].repeat = 16;
|
mef_entry->filter[filt_num].repeat = 16;
|
||||||
memcpy(mef_entry->filter[filt_num].byte_seq, priv->curr_addr,
|
memcpy(mef_entry->filter[filt_num].byte_seq, priv->curr_addr,
|
||||||
ETH_ALEN);
|
ETH_ALEN);
|
||||||
mef_entry->filter[filt_num].byte_seq[MAX_BYTESEQ] = ETH_ALEN;
|
mef_entry->filter[filt_num].byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] =
|
||||||
|
ETH_ALEN;
|
||||||
mef_entry->filter[filt_num].offset = 14;
|
mef_entry->filter[filt_num].offset = 14;
|
||||||
mef_entry->filter[filt_num].filt_type = TYPE_EQ;
|
mef_entry->filter[filt_num].filt_type = TYPE_EQ;
|
||||||
if (filt_num)
|
if (filt_num)
|
||||||
|
@ -2491,7 +2492,7 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = {
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static const struct wiphy_wowlan_support mwifiex_wowlan_support = {
|
static const struct wiphy_wowlan_support mwifiex_wowlan_support = {
|
||||||
.flags = WIPHY_WOWLAN_MAGIC_PKT,
|
.flags = WIPHY_WOWLAN_MAGIC_PKT,
|
||||||
.n_patterns = MWIFIEX_MAX_FILTERS,
|
.n_patterns = MWIFIEX_MEF_MAX_FILTERS,
|
||||||
.pattern_min_len = 1,
|
.pattern_min_len = 1,
|
||||||
.pattern_max_len = MWIFIEX_MAX_PATTERN_LEN,
|
.pattern_max_len = MWIFIEX_MAX_PATTERN_LEN,
|
||||||
.max_pkt_offset = MWIFIEX_MAX_OFFSET_LEN,
|
.max_pkt_offset = MWIFIEX_MAX_OFFSET_LEN,
|
||||||
|
|
|
@ -362,13 +362,13 @@ struct mwifiex_ds_misc_subsc_evt {
|
||||||
struct subsc_evt_cfg bcn_h_rssi_cfg;
|
struct subsc_evt_cfg bcn_h_rssi_cfg;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_BYTESEQ 6 /* non-adjustable */
|
#define MWIFIEX_MEF_MAX_BYTESEQ 6 /* non-adjustable */
|
||||||
#define MWIFIEX_MAX_FILTERS 10
|
#define MWIFIEX_MEF_MAX_FILTERS 10
|
||||||
|
|
||||||
struct mwifiex_mef_filter {
|
struct mwifiex_mef_filter {
|
||||||
u16 repeat;
|
u16 repeat;
|
||||||
u16 offset;
|
u16 offset;
|
||||||
s8 byte_seq[MAX_BYTESEQ + 1];
|
s8 byte_seq[MWIFIEX_MEF_MAX_BYTESEQ + 1];
|
||||||
u8 filt_type;
|
u8 filt_type;
|
||||||
u8 filt_action;
|
u8 filt_action;
|
||||||
};
|
};
|
||||||
|
@ -376,7 +376,7 @@ struct mwifiex_mef_filter {
|
||||||
struct mwifiex_mef_entry {
|
struct mwifiex_mef_entry {
|
||||||
u8 mode;
|
u8 mode;
|
||||||
u8 action;
|
u8 action;
|
||||||
struct mwifiex_mef_filter filter[MWIFIEX_MAX_FILTERS];
|
struct mwifiex_mef_filter filter[MWIFIEX_MEF_MAX_FILTERS];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mwifiex_ds_mef_cfg {
|
struct mwifiex_ds_mef_cfg {
|
||||||
|
|
|
@ -1070,7 +1070,7 @@ mwifiex_cmd_append_rpn_expression(struct mwifiex_private *priv,
|
||||||
int i, byte_len;
|
int i, byte_len;
|
||||||
u8 *stack_ptr = *buffer;
|
u8 *stack_ptr = *buffer;
|
||||||
|
|
||||||
for (i = 0; i < MWIFIEX_MAX_FILTERS; i++) {
|
for (i = 0; i < MWIFIEX_MEF_MAX_FILTERS; i++) {
|
||||||
filter = &mef_entry->filter[i];
|
filter = &mef_entry->filter[i];
|
||||||
if (!filter->filt_type)
|
if (!filter->filt_type)
|
||||||
break;
|
break;
|
||||||
|
@ -1079,7 +1079,7 @@ mwifiex_cmd_append_rpn_expression(struct mwifiex_private *priv,
|
||||||
*stack_ptr = TYPE_DNUM;
|
*stack_ptr = TYPE_DNUM;
|
||||||
stack_ptr += 1;
|
stack_ptr += 1;
|
||||||
|
|
||||||
byte_len = filter->byte_seq[MAX_BYTESEQ];
|
byte_len = filter->byte_seq[MWIFIEX_MEF_MAX_BYTESEQ];
|
||||||
memcpy(stack_ptr, filter->byte_seq, byte_len);
|
memcpy(stack_ptr, filter->byte_seq, byte_len);
|
||||||
stack_ptr += byte_len;
|
stack_ptr += byte_len;
|
||||||
*stack_ptr = byte_len;
|
*stack_ptr = byte_len;
|
||||||
|
|
Loading…
Reference in New Issue