aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lin <dlin@marvell.com>2016-06-01 14:44:52 +0800
committerDavid Lin <dlin@marvell.com>2016-06-01 14:44:52 +0800
commit6bacc5aa695a1f890a8842f58762a5e5e249ccea (patch)
treeb9d99370f4b15f87c688095fa35a48854324d3fa
parent265d3143319ccd598ea89ca71c745e5badadfd3d (diff)
Removed code related to MESH.
Signed-off-by: David Lin <dlin@marvell.com>
-rw-r--r--debugfs.c5
-rw-r--r--dev.h10
-rw-r--r--fwcmd.c50
-rw-r--r--mac80211.c25
-rw-r--r--main.c6
-rw-r--r--rx.c84
6 files changed, 2 insertions, 178 deletions
diff --git a/debugfs.c b/debugfs.c
index cb1763f..1be3532 100644
--- a/debugfs.c
+++ b/debugfs.c
@@ -165,11 +165,6 @@ static ssize_t mwl_debugfs_vif_read(struct file *file, char __user *ubuf,
len += scnprintf(p + len, size - len,
"mac address: %pM\n", mwl_vif->bssid);
break;
- case NL80211_IFTYPE_MESH_POINT:
- len += scnprintf(p + len, size - len, "type: mesh\n");
- len += scnprintf(p + len, size - len,
- "mac address: %pM\n", mwl_vif->bssid);
- break;
case NL80211_IFTYPE_STATION:
len += scnprintf(p + len, size - len, "type: sta\n");
len += scnprintf(p + len, size - len,
diff --git a/dev.h b/dev.h
index 9e70bfe..73a6089 100644
--- a/dev.h
+++ b/dev.h
@@ -408,11 +408,6 @@ struct beacon_info {
u8 *ie_ht_ptr;
u8 *ie_vht_ptr;
u8 *ie_country_ptr;
-#ifdef CONFIG_MAC80211_MESH
- u8 *ie_meshid_ptr;
- u8 *ie_meshcfg_ptr;
- u8 *ie_meshchsw_ptr;
-#endif
u8 ie_wmm_len;
u8 ie_wsc_len;
u8 ie_rsn_len;
@@ -420,11 +415,6 @@ struct beacon_info {
u8 ie_ht_len;
u8 ie_vht_len;
u8 ie_country_len;
-#ifdef CONFIG_MAC80211_MESH
- u8 ie_meshid_len;
- u8 ie_meshcfg_len;
- u8 ie_meshchsw_len;
-#endif
};
struct mwl_vif {
diff --git a/fwcmd.c b/fwcmd.c
index 6565ed7..aff509a 100644
--- a/fwcmd.c
+++ b/fwcmd.c
@@ -471,20 +471,6 @@ static void mwl_fwcmd_parse_beacon(struct mwl_priv *priv,
beacon_info->ie_ht_ptr += elen;
}
break;
-#ifdef CONFIG_MAC80211_MESH
- case WLAN_EID_MESH_CONFIG:
- beacon_info->ie_meshcfg_len = (elen + 2);
- beacon_info->ie_meshcfg_ptr = (pos - 2);
- break;
- case WLAN_EID_MESH_ID:
- beacon_info->ie_meshid_len = (elen + 2);
- beacon_info->ie_meshid_ptr = (pos - 2);
- break;
- case WLAN_EID_CHAN_SWITCH_PARAM:
- beacon_info->ie_meshchsw_len = (elen + 2);
- beacon_info->ie_meshchsw_ptr = (pos - 2);
- break;
-#endif
case WLAN_EID_VHT_CAPABILITY:
case WLAN_EID_VHT_OPERATION:
case WLAN_EID_OPMODE_NOTIF:
@@ -562,18 +548,6 @@ static int mwl_fwcmd_set_ies(struct mwl_priv *priv, struct mwl_vif *mwl_vif)
memcpy(pcmd->ie_list_vht, beacon->ie_vht_ptr, beacon->ie_vht_len);
pcmd->ie_list_len_vht = cpu_to_le16(beacon->ie_vht_len);
-#ifdef CONFIG_MAC80211_MESH
- memcpy(pcmd->ie_list_proprietary, beacon->ie_meshid_ptr,
- beacon->ie_meshid_len);
- ie_list_len_proprietary = beacon->ie_meshid_len;
- memcpy(pcmd->ie_list_proprietary + ie_list_len_proprietary,
- beacon->ie_meshcfg_ptr, beacon->ie_meshcfg_len);
- ie_list_len_proprietary += beacon->ie_meshcfg_len;
- memcpy(pcmd->ie_list_proprietary + ie_list_len_proprietary,
- beacon->ie_meshchsw_ptr, beacon->ie_meshchsw_len);
- ie_list_len_proprietary += beacon->ie_meshchsw_len;
-#endif
-
if (priv->chip_type == MWL8897) {
memcpy(pcmd->ie_list_proprietary + ie_list_len_proprietary,
beacon->ie_wmm_ptr, beacon->ie_wmm_len);
@@ -1957,21 +1931,6 @@ int mwl_fwcmd_set_new_stn_add(struct ieee80211_hw *hw,
pcmd->peer_info.vht_rx_channel_width = sta->bandwidth;
}
- /* Patch mesh interface for VHT based on chip type. Once if mac80211
- * supports VHT for mesh interface, following code should be removed.
- */
- if (vif->type == NL80211_IFTYPE_MESH_POINT) {
- pcmd->peer_info.vht_max_rx_mcs = cpu_to_le32(0x0000fffa);
- pcmd->peer_info.vht_cap = cpu_to_le32(0x33801931);
- pcmd->peer_info.vht_rx_channel_width = 2;
- if (priv->chip_type == MWL8864) {
- if (priv->antenna_rx == ANTENNA_RX_4_AUTO) {
- pcmd->peer_info.vht_max_rx_mcs =
- cpu_to_le32(0x0000ffea);
- }
- }
- }
-
pcmd->is_qos_sta = sta->wme;
pcmd->qos_info = ((sta->uapsd_queues << 4) | (sta->max_sp << 1));
@@ -2254,15 +2213,10 @@ int mwl_fwcmd_encryption_set_key(struct ieee80211_hw *hw,
idx = key->keyidx;
- if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) {
+ if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE)
action = ENCR_ACTION_TYPE_SET_KEY;
- } else {
+ else
action = ENCR_ACTION_TYPE_SET_GROUP_KEY;
- if (vif->type == NL80211_IFTYPE_MESH_POINT &&
- !ether_addr_equal(mwl_vif->bssid, addr))
- pcmd->key_param.key_info |=
- cpu_to_le32(ENCR_KEY_FLAG_RXGROUPKEY);
- }
switch (key->cipher) {
case WLAN_CIPHER_SUITE_WEP40:
diff --git a/mac80211.c b/mac80211.c
index 7039176..dc4fd99 100644
--- a/mac80211.c
+++ b/mac80211.c
@@ -149,7 +149,6 @@ static int mwl_mac80211_add_interface(struct ieee80211_hw *hw,
switch (vif->type) {
case NL80211_IFTYPE_AP:
- case NL80211_IFTYPE_MESH_POINT:
macids_supported = priv->ap_macids_supported;
break;
case NL80211_IFTYPE_STATION:
@@ -183,10 +182,6 @@ static int mwl_mac80211_add_interface(struct ieee80211_hw *hw,
ether_addr_copy(mwl_vif->bssid, vif->addr);
mwl_fwcmd_set_new_stn_add_self(hw, vif);
break;
- case NL80211_IFTYPE_MESH_POINT:
- ether_addr_copy(mwl_vif->bssid, vif->addr);
- mwl_fwcmd_set_new_stn_add_self(hw, vif);
- break;
case NL80211_IFTYPE_STATION:
ether_addr_copy(mwl_vif->sta_mac, vif->addr);
mwl_fwcmd_bss_start(hw, vif, true);
@@ -228,7 +223,6 @@ static void mwl_mac80211_remove_interface(struct ieee80211_hw *hw,
switch (vif->type) {
case NL80211_IFTYPE_AP:
- case NL80211_IFTYPE_MESH_POINT:
mwl_fwcmd_set_new_stn_del(hw, vif, vif->addr);
break;
case NL80211_IFTYPE_STATION:
@@ -370,7 +364,6 @@ static void mwl_mac80211_bss_info_changed(struct ieee80211_hw *hw,
{
switch (vif->type) {
case NL80211_IFTYPE_AP:
- case NL80211_IFTYPE_MESH_POINT:
mwl_mac80211_bss_info_changed_ap(hw, vif, info, changed);
break;
case NL80211_IFTYPE_STATION:
@@ -473,24 +466,6 @@ static int mwl_mac80211_sta_add(struct ieee80211_hw *hw,
memset(sta_info, 0, sizeof(*sta_info));
- if (vif->type == NL80211_IFTYPE_MESH_POINT) {
- sta_info->is_mesh_node = true;
- /* Patch mesh interface for HT based on chip type. When authsae
- * or wpa_supplicant is used for mesh security, HT capbility
- * won't be set. This would be removed if problem is fixed.
- */
- sta->ht_cap.ht_supported = true;
- sta->ht_cap.cap = 0x6f;
- sta->ht_cap.mcs.rx_mask[0] = 0xff;
- sta->ht_cap.mcs.rx_mask[1] = 0xff;
- sta->ht_cap.ampdu_factor = 0x3;
- sta->ht_cap.ampdu_density = 0x5;
- if (priv->chip_type == MWL8864) {
- if (priv->antenna_rx == ANTENNA_RX_4_AUTO)
- sta->ht_cap.mcs.rx_mask[2] = 0xff;
- }
- }
-
if (sta->ht_cap.ht_supported) {
sta_info->is_ampdu_allowed = true;
sta_info->is_amsdu_allowed = false;
diff --git a/main.c b/main.c
index 3e6446e..30b3691 100644
--- a/main.c
+++ b/main.c
@@ -135,9 +135,6 @@ static const struct ieee80211_rate mwl_rates_50[] = {
static const struct ieee80211_iface_limit ap_if_limits[] = {
{ .max = SYSADPT_NUM_OF_AP, .types = BIT(NL80211_IFTYPE_AP) },
-#ifdef CONFIG_MAC80211_MESH
- { .max = 1, .types = BIT(NL80211_IFTYPE_MESH_POINT) },
-#endif
{ .max = 1, .types = BIT(NL80211_IFTYPE_STATION) },
};
@@ -682,9 +679,6 @@ static int mwl_wl_init(struct mwl_priv *priv)
hw->wiphy->interface_modes = 0;
hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP);
-#ifdef CONFIG_MAC80211_MESH
- hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_MESH_POINT);
-#endif
hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_STATION);
hw->wiphy->iface_combinations = &ap_if_comb;
hw->wiphy->n_iface_combinations = 1;
diff --git a/rx.c b/rx.c
index 997c6ee..b555ced 100644
--- a/rx.c
+++ b/rx.c
@@ -336,78 +336,6 @@ static inline void mwl_rx_remove_dma_header(struct sk_buff *skb, __le16 qos)
skb_pull(skb, sizeof(*tr) - hdrlen);
}
-#ifdef CONFIG_MAC80211_MESH
-static inline bool mwl_rx_process_mesh_amsdu(struct mwl_priv *priv,
- struct sk_buff *skb,
- struct ieee80211_rx_status *status)
-{
- struct ieee80211_hdr *wh;
- struct mwl_sta *sta_info;
- struct ieee80211_sta *sta;
- u8 *qc;
- int wh_len;
- int len;
- u8 pad;
- u8 *data;
- u16 frame_len;
- struct sk_buff *newskb;
-
- wh = (struct ieee80211_hdr *)skb->data;
-
- spin_lock_bh(&priv->sta_lock);
- list_for_each_entry(sta_info, &priv->sta_list, list) {
- sta = container_of((char *)sta_info, struct ieee80211_sta,
- drv_priv[0]);
- if (ether_addr_equal(sta->addr, wh->addr2)) {
- if (!sta_info->is_mesh_node) {
- spin_unlock_bh(&priv->sta_lock);
- return false;
- }
- }
- }
- spin_unlock_bh(&priv->sta_lock);
-
- qc = ieee80211_get_qos_ctl(wh);
- *qc &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT;
-
- wh_len = ieee80211_hdrlen(wh->frame_control);
- len = wh_len;
- data = skb->data;
-
- while (len < skb->len) {
- frame_len = *(u8 *)(data + len + ETH_HLEN - 1) |
- (*(u8 *)(data + len + ETH_HLEN - 2) << 8);
-
- if ((len + ETH_HLEN + frame_len) > skb->len)
- break;
-
- newskb = dev_alloc_skb(wh_len + frame_len);
- if (!newskb)
- break;
-
- ether_addr_copy(wh->addr3, data + len);
- ether_addr_copy(wh->addr4, data + len + ETH_ALEN);
- memcpy(newskb->data, wh, wh_len);
- memcpy(newskb->data + wh_len, data + len + ETH_HLEN, frame_len);
- skb_put(newskb, wh_len + frame_len);
-
- pad = ((ETH_HLEN + frame_len) % 4) ?
- (4 - (ETH_HLEN + frame_len) % 4) : 0;
- len += (ETH_HLEN + frame_len + pad);
- if (len < skb->len)
- status->flag |= RX_FLAG_AMSDU_MORE;
- else
- status->flag &= ~RX_FLAG_AMSDU_MORE;
- memcpy(IEEE80211_SKB_RXCB(newskb), status, sizeof(*status));
- ieee80211_rx(priv->hw, newskb);
- }
-
- dev_kfree_skb_any(skb);
-
- return true;
-}
-#endif
-
static int mwl_rx_refill(struct mwl_priv *priv, struct mwl_rx_hndl *rx_hndl)
{
struct mwl_desc_data *desc;
@@ -601,18 +529,6 @@ void mwl_rx_recv(unsigned long data)
}
}
-#ifdef CONFIG_MAC80211_MESH
- if (ieee80211_is_data_qos(wh->frame_control) &&
- ieee80211_has_a4(wh->frame_control)) {
- u8 *qc = ieee80211_get_qos_ctl(wh);
-
- if (*qc & IEEE80211_QOS_CTL_A_MSDU_PRESENT)
- if (mwl_rx_process_mesh_amsdu(priv, prx_skb,
- &status))
- goto out;
- }
-#endif
-
memcpy(IEEE80211_SKB_RXCB(prx_skb), &status, sizeof(status));
ieee80211_rx(hw, prx_skb);
out: