diff options
-rw-r--r-- | drivers/net/wireless/mwifiex/debugfs.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/decl.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/ioctl.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/tdls.c | 30 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/util.c | 2 |
6 files changed, 52 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c index 2713f7acd35e..b50603276ecb 100644 --- a/drivers/net/wireless/mwifiex/debugfs.c +++ b/drivers/net/wireless/mwifiex/debugfs.c | |||
@@ -493,6 +493,15 @@ mwifiex_debug_read(struct file *file, char __user *ubuf, | |||
493 | } | 493 | } |
494 | } | 494 | } |
495 | 495 | ||
496 | if (info.tdls_peer_num) { | ||
497 | p += sprintf(p, "TDLS peer table:\n"); | ||
498 | for (i = 0; i < info.tdls_peer_num; i++) { | ||
499 | p += sprintf(p, "peer = %pM", | ||
500 | info.tdls_list[i].peer_addr); | ||
501 | p += sprintf(p, "\n"); | ||
502 | } | ||
503 | } | ||
504 | |||
496 | ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page, | 505 | ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page, |
497 | (unsigned long) p - page); | 506 | (unsigned long) p - page); |
498 | 507 | ||
diff --git a/drivers/net/wireless/mwifiex/decl.h b/drivers/net/wireless/mwifiex/decl.h index 2269acf41ad8..21b5130c264e 100644 --- a/drivers/net/wireless/mwifiex/decl.h +++ b/drivers/net/wireless/mwifiex/decl.h | |||
@@ -41,6 +41,7 @@ | |||
41 | 41 | ||
42 | #define MWIFIEX_MAX_TX_BASTREAM_SUPPORTED 2 | 42 | #define MWIFIEX_MAX_TX_BASTREAM_SUPPORTED 2 |
43 | #define MWIFIEX_MAX_RX_BASTREAM_SUPPORTED 16 | 43 | #define MWIFIEX_MAX_RX_BASTREAM_SUPPORTED 16 |
44 | #define MWIFIEX_MAX_TDLS_PEER_SUPPORTED 8 | ||
44 | 45 | ||
45 | #define MWIFIEX_STA_AMPDU_DEF_TXWINSIZE 64 | 46 | #define MWIFIEX_STA_AMPDU_DEF_TXWINSIZE 64 |
46 | #define MWIFIEX_STA_AMPDU_DEF_RXWINSIZE 64 | 47 | #define MWIFIEX_STA_AMPDU_DEF_RXWINSIZE 64 |
diff --git a/drivers/net/wireless/mwifiex/ioctl.h b/drivers/net/wireless/mwifiex/ioctl.h index 0847f3e07ab7..dcf4bdbd7505 100644 --- a/drivers/net/wireless/mwifiex/ioctl.h +++ b/drivers/net/wireless/mwifiex/ioctl.h | |||
@@ -180,7 +180,11 @@ struct mwifiex_ds_tx_ba_stream_tbl { | |||
180 | u8 amsdu; | 180 | u8 amsdu; |
181 | }; | 181 | }; |
182 | 182 | ||
183 | #define DBG_CMD_NUM 5 | 183 | #define DBG_CMD_NUM 5 |
184 | |||
185 | struct tdls_peer_info { | ||
186 | u8 peer_addr[ETH_ALEN]; | ||
187 | }; | ||
184 | 188 | ||
185 | struct mwifiex_debug_info { | 189 | struct mwifiex_debug_info { |
186 | u32 int_counter; | 190 | u32 int_counter; |
@@ -193,6 +197,9 @@ struct mwifiex_debug_info { | |||
193 | u32 rx_tbl_num; | 197 | u32 rx_tbl_num; |
194 | struct mwifiex_ds_rx_reorder_tbl rx_tbl | 198 | struct mwifiex_ds_rx_reorder_tbl rx_tbl |
195 | [MWIFIEX_MAX_RX_BASTREAM_SUPPORTED]; | 199 | [MWIFIEX_MAX_RX_BASTREAM_SUPPORTED]; |
200 | u32 tdls_peer_num; | ||
201 | struct tdls_peer_info tdls_list | ||
202 | [MWIFIEX_MAX_TDLS_PEER_SUPPORTED]; | ||
196 | u16 ps_mode; | 203 | u16 ps_mode; |
197 | u32 ps_state; | 204 | u32 ps_state; |
198 | u8 is_deep_sleep; | 205 | u8 is_deep_sleep; |
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index e66993cb5daf..b3e23f625e1a 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h | |||
@@ -1324,6 +1324,8 @@ void mwifiex_process_tdls_action_frame(struct mwifiex_private *priv, | |||
1324 | u8 *buf, int len); | 1324 | u8 *buf, int len); |
1325 | int mwifiex_tdls_oper(struct mwifiex_private *priv, const u8 *peer, u8 action); | 1325 | int mwifiex_tdls_oper(struct mwifiex_private *priv, const u8 *peer, u8 action); |
1326 | int mwifiex_get_tdls_link_status(struct mwifiex_private *priv, const u8 *mac); | 1326 | int mwifiex_get_tdls_link_status(struct mwifiex_private *priv, const u8 *mac); |
1327 | int mwifiex_get_tdls_list(struct mwifiex_private *priv, | ||
1328 | struct tdls_peer_info *buf); | ||
1327 | void mwifiex_disable_all_tdls_links(struct mwifiex_private *priv); | 1329 | void mwifiex_disable_all_tdls_links(struct mwifiex_private *priv); |
1328 | bool mwifiex_is_bss_in_11ac_mode(struct mwifiex_private *priv); | 1330 | bool mwifiex_is_bss_in_11ac_mode(struct mwifiex_private *priv); |
1329 | u8 mwifiex_get_center_freq_index(struct mwifiex_private *priv, u8 band, | 1331 | u8 mwifiex_get_center_freq_index(struct mwifiex_private *priv, u8 band, |
diff --git a/drivers/net/wireless/mwifiex/tdls.c b/drivers/net/wireless/mwifiex/tdls.c index 22884b429be7..efa81d8f2597 100644 --- a/drivers/net/wireless/mwifiex/tdls.c +++ b/drivers/net/wireless/mwifiex/tdls.c | |||
@@ -1123,6 +1123,36 @@ int mwifiex_get_tdls_link_status(struct mwifiex_private *priv, const u8 *mac) | |||
1123 | return TDLS_NOT_SETUP; | 1123 | return TDLS_NOT_SETUP; |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | int mwifiex_get_tdls_list(struct mwifiex_private *priv, | ||
1127 | struct tdls_peer_info *buf) | ||
1128 | { | ||
1129 | struct mwifiex_sta_node *sta_ptr; | ||
1130 | struct tdls_peer_info *peer = buf; | ||
1131 | int count = 0; | ||
1132 | unsigned long flags; | ||
1133 | |||
1134 | if (!ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info)) | ||
1135 | return 0; | ||
1136 | |||
1137 | /* make sure we are in station mode and connected */ | ||
1138 | if (!(priv->bss_type == MWIFIEX_BSS_TYPE_STA && priv->media_connected)) | ||
1139 | return 0; | ||
1140 | |||
1141 | spin_lock_irqsave(&priv->sta_list_spinlock, flags); | ||
1142 | list_for_each_entry(sta_ptr, &priv->sta_list, list) { | ||
1143 | if (sta_ptr->tdls_status == TDLS_SETUP_COMPLETE) { | ||
1144 | ether_addr_copy(peer->peer_addr, sta_ptr->mac_addr); | ||
1145 | peer++; | ||
1146 | count++; | ||
1147 | if (count >= MWIFIEX_MAX_TDLS_PEER_SUPPORTED) | ||
1148 | break; | ||
1149 | } | ||
1150 | } | ||
1151 | spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); | ||
1152 | |||
1153 | return count; | ||
1154 | } | ||
1155 | |||
1126 | void mwifiex_disable_all_tdls_links(struct mwifiex_private *priv) | 1156 | void mwifiex_disable_all_tdls_links(struct mwifiex_private *priv) |
1127 | { | 1157 | { |
1128 | struct mwifiex_sta_node *sta_ptr; | 1158 | struct mwifiex_sta_node *sta_ptr; |
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c index b1768fbf98f2..3bd917975e5b 100644 --- a/drivers/net/wireless/mwifiex/util.c +++ b/drivers/net/wireless/mwifiex/util.c | |||
@@ -97,6 +97,8 @@ int mwifiex_get_debug_info(struct mwifiex_private *priv, | |||
97 | info->rx_tbl); | 97 | info->rx_tbl); |
98 | info->tx_tbl_num = mwifiex_get_tx_ba_stream_tbl(priv, | 98 | info->tx_tbl_num = mwifiex_get_tx_ba_stream_tbl(priv, |
99 | info->tx_tbl); | 99 | info->tx_tbl); |
100 | info->tdls_peer_num = mwifiex_get_tdls_list(priv, | ||
101 | info->tdls_list); | ||
100 | info->ps_mode = adapter->ps_mode; | 102 | info->ps_mode = adapter->ps_mode; |
101 | info->ps_state = adapter->ps_state; | 103 | info->ps_state = adapter->ps_state; |
102 | info->is_deep_sleep = adapter->is_deep_sleep; | 104 | info->is_deep_sleep = adapter->is_deep_sleep; |