Commit 4e0b0f42 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: use struct to pack join parameters for FW

Refactor code to use struct to construct the join parameters. Avoid use
of extra buffer before sending to FW instead directly pass the struct
pointer.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dc18fa1d
This diff is collapsed.
...@@ -35,21 +35,6 @@ enum { ...@@ -35,21 +35,6 @@ enum {
#define WILC_MAX_ASSOC_RESP_FRAME_SIZE 256 #define WILC_MAX_ASSOC_RESP_FRAME_SIZE 256
struct network_info {
s8 rssi;
u16 cap_info;
u8 ssid[MAX_SSID_LEN];
u8 ssid_len;
u8 bssid[6];
u16 beacon_period;
u8 dtim_period;
u8 ch;
u32 tsf_lo;
u8 *ies;
u16 ies_len;
u64 tsf;
};
struct connect_info { struct connect_info {
u8 bssid[6]; u8 bssid[6];
u8 *req_ies; u8 *req_ies;
...@@ -288,5 +273,6 @@ int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power); ...@@ -288,5 +273,6 @@ int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power);
void wilc_scan_complete_received(struct wilc *wilc, u8 *buffer, u32 length); void wilc_scan_complete_received(struct wilc *wilc, u8 *buffer, u32 length);
void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length); void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length);
void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *buffer, u32 length); void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *buffer, u32 length);
void *wilc_parse_join_bss_param(struct cfg80211_bss *bss); void *wilc_parse_join_bss_param(struct cfg80211_bss *bss,
struct cfg80211_crypto_settings *crypto);
#endif #endif
...@@ -422,7 +422,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -422,7 +422,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
goto out_put_bss; goto out_put_bss;
} }
join_params = wilc_parse_join_bss_param(bss); join_params = wilc_parse_join_bss_param(bss, &sme->crypto);
if (!join_params) { if (!join_params) {
netdev_err(dev, "%s: failed to construct join param\n", netdev_err(dev, "%s: failed to construct join param\n",
__func__); __func__);
......
...@@ -47,7 +47,6 @@ typedef void (*wilc_tx_complete_func_t)(void *, int); ...@@ -47,7 +47,6 @@ typedef void (*wilc_tx_complete_func_t)(void *, int);
* *
********************************************/ ********************************************/
#define WILC_MULTICAST_TABLE_SIZE 8 #define WILC_MULTICAST_TABLE_SIZE 8
#define MAX_SSID_LEN 33
#define MAX_RATES_SUPPORTED 12 #define MAX_RATES_SUPPORTED 12
enum bss_types { enum bss_types {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment