Commit b997b84f authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: use proper namespace for macros in wilc_wlan_if.h header



Rename the macros defined in wilc_wlan_if.h header to have clear
namespace. As convention used 'WILC_FW_' prefix for constants defined for
firmware and 'WILC_' prefix for driver constants.

Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 00d54198
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -684,7 +684,7 @@ static void handle_connect(struct work_struct *work)
		cur_byte[conn_attr->ssid_len] = '\0';
	}
	cur_byte += MAX_SSID_LEN;
	*(cur_byte++) = INFRASTRUCTURE;
	*(cur_byte++) = WILC_FW_BSS_TYPE_INFRA;

	if (conn_attr->ch >= 1 && conn_attr->ch <= 14) {
		*(cur_byte++) = conn_attr->ch;
@@ -2321,9 +2321,9 @@ static void handle_power_management(struct work_struct *work)
	wid.id = WID_POWER_MANAGEMENT;

	if (pm_param->enabled)
		power_mode = MIN_FAST_PS;
		power_mode = WILC_FW_MIN_FAST_PS;
	else
		power_mode = NO_POWERSAVE;
		power_mode = WILC_FW_NO_POWERSAVE;

	wid.val = &power_mode;
	wid.size = sizeof(char);
+16 −16
Original line number Diff line number Diff line
@@ -338,7 +338,7 @@ static int linux_wlan_init_test_config(struct net_device *dev,
	if (!wilc_wlan_cfg_set(vif, 0, WID_PC_TEST_MODE, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = INFRASTRUCTURE;
	c_val[0] = WILC_FW_BSS_TYPE_INFRA;
	if (!wilc_wlan_cfg_set(vif, 0, WID_BSS_TYPE, c_val, 1, 0, 0))
		goto fail;

@@ -346,7 +346,7 @@ static int linux_wlan_init_test_config(struct net_device *dev,
	if (!wilc_wlan_cfg_set(vif, 0, WID_CURRENT_TX_RATE, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = G_MIXED_11B_2_MODE;
	c_val[0] = WILC_FW_OPER_MODE_G_MIXED_11B_2;
	if (!wilc_wlan_cfg_set(vif, 0, WID_11G_OPERATING_MODE, c_val, 1, 0,
			       0))
		goto fail;
@@ -355,19 +355,19 @@ static int linux_wlan_init_test_config(struct net_device *dev,
	if (!wilc_wlan_cfg_set(vif, 0, WID_CURRENT_CHANNEL, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = G_SHORT_PREAMBLE;
	c_val[0] = WILC_FW_PREAMBLE_SHORT;
	if (!wilc_wlan_cfg_set(vif, 0, WID_PREAMBLE, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = AUTO_PROT;
	c_val[0] = WILC_FW_11N_PROT_AUTO;
	if (!wilc_wlan_cfg_set(vif, 0, WID_11N_PROT_MECH, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = ACTIVE_SCAN;
	c_val[0] = WILC_FW_ACTIVE_SCAN;
	if (!wilc_wlan_cfg_set(vif, 0, WID_SCAN_TYPE, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = SITE_SURVEY_OFF;
	c_val[0] = WILC_FW_SITE_SURVEY_OFF;
	if (!wilc_wlan_cfg_set(vif, 0, WID_SITE_SURVEY, c_val, 1, 0, 0))
		goto fail;

@@ -387,7 +387,7 @@ static int linux_wlan_init_test_config(struct net_device *dev,
	if (!wilc_wlan_cfg_set(vif, 0, WID_QOS_ENABLE, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = NO_POWERSAVE;
	c_val[0] = WILC_FW_NO_POWERSAVE;
	if (!wilc_wlan_cfg_set(vif, 0, WID_POWER_MANAGEMENT, c_val, 1, 0, 0))
		goto fail;

@@ -395,7 +395,7 @@ static int linux_wlan_init_test_config(struct net_device *dev,
	if (!wilc_wlan_cfg_set(vif, 0, WID_11I_MODE, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = OPEN_SYSTEM;
	c_val[0] = WILC_FW_AUTH_OPEN_SYSTEM;
	if (!wilc_wlan_cfg_set(vif, 0, WID_AUTH_TYPE, c_val, 1, 0, 0))
		goto fail;

@@ -429,7 +429,7 @@ static int linux_wlan_init_test_config(struct net_device *dev,
	if (!wilc_wlan_cfg_set(vif, 0, WID_DTIM_PERIOD, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = NORMAL_ACK;
	c_val[0] = WILC_FW_ACK_POLICY_NORMAL;
	if (!wilc_wlan_cfg_set(vif, 0, WID_ACK_POLICY, c_val, 1, 0, 0))
		goto fail;

@@ -452,7 +452,7 @@ static int linux_wlan_init_test_config(struct net_device *dev,
	if (!wilc_wlan_cfg_set(vif, 0, WID_BEACON_INTERVAL, c_val, 2, 0, 0))
		goto fail;

	c_val[0] = REKEY_DISABLE;
	c_val[0] = WILC_FW_REKEY_POLICY_DISABLE;
	if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_POLICY, c_val, 1, 0, 0))
		goto fail;

@@ -470,7 +470,7 @@ static int linux_wlan_init_test_config(struct net_device *dev,
			       0))
		goto fail;

	c_val[0] = G_SELF_CTS_PROT;
	c_val[0] = WILC_FW_ERP_PROT_SELF_CTS;
	if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ERP_PROT_TYPE, c_val, 1, 0, 0))
		goto fail;

@@ -478,7 +478,7 @@ static int linux_wlan_init_test_config(struct net_device *dev,
	if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ENABLE, c_val, 1, 0, 0))
		goto fail;

	c_val[0] = HT_MIXED_MODE;
	c_val[0] = WILC_FW_11N_OP_MODE_HT_MIXED;
	if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OPERATING_MODE, c_val, 1, 0,
			       0))
		goto fail;
@@ -488,12 +488,12 @@ static int linux_wlan_init_test_config(struct net_device *dev,
			       0))
		goto fail;

	c_val[0] = DETECT_PROTECT_REPORT;
	c_val[0] = WILC_FW_OBBS_NONHT_DETECT_PROTECT_REPORT;
	if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OBSS_NONHT_DETECTION, c_val, 1,
			       0, 0))
		goto fail;

	c_val[0] = RTS_CTS_NONHT_PROT;
	c_val[0] = WILC_FW_HT_PROT_RTS_CTS_NONHT;
	if (!wilc_wlan_cfg_set(vif, 0, WID_11N_HT_PROT_TYPE, c_val, 1, 0, 0))
		goto fail;

@@ -502,7 +502,7 @@ static int linux_wlan_init_test_config(struct net_device *dev,
			       0))
		goto fail;

	c_val[0] = MIMO_MODE;
	c_val[0] = WILC_FW_SMPS_MODE_MIMO;
	if (!wilc_wlan_cfg_set(vif, 0, WID_11N_SMPS_MODE, c_val, 1, 0, 0))
		goto fail;

@@ -1070,7 +1070,7 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
	wl->io_type = io_type;
	wl->hif_func = ops;
	wl->enable_ps = true;
	wl->chip_ps_state = CHIP_WAKEDUP;
	wl->chip_ps_state = WILC_CHIP_WAKEDUP;
	INIT_LIST_HEAD(&wl->txq_head.list);
	INIT_LIST_HEAD(&wl->rxq_head.list);

+2 −1
Original line number Diff line number Diff line
@@ -144,7 +144,8 @@ static int linux_sdio_probe(struct sdio_func *func,
	}

	dev_dbg(&func->dev, "Initializing netdev\n");
	ret = wilc_netdev_init(&wilc, &func->dev, HIF_SDIO, &wilc_hif_sdio);
	ret = wilc_netdev_init(&wilc, &func->dev, WILC_HIF_SDIO,
			       &wilc_hif_sdio);
	if (ret) {
		dev_err(&func->dev, "Couldn't initialize netdev\n");
		kfree(sdio_priv);
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ static int wilc_bus_probe(struct spi_device *spi)
			dev_err(&spi->dev, "failed to get the irq gpio\n");
	}

	ret = wilc_netdev_init(&wilc, NULL, HIF_SPI, &wilc_hif_spi);
	ret = wilc_netdev_init(&wilc, NULL, WILC_HIF_SPI, &wilc_hif_spi);
	if (ret) {
		kfree(spi_priv);
		return ret;
+7 −7
Original line number Diff line number Diff line
@@ -612,14 +612,14 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
							 &hidden_ntwk))
				return -ENOMEM;

			ret = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
			ret = wilc_scan(vif, USER_SCAN, WILC_FW_ACTIVE_SCAN,
					scan_ch_list,
					request->n_channels,
					(const u8 *)request->ie,
					request->ie_len, cfg_scan_result,
					(void *)priv, &hidden_ntwk);
		} else {
			ret = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
			ret = wilc_scan(vif, USER_SCAN, WILC_FW_ACTIVE_SCAN,
					scan_ch_list,
					request->n_channels,
					(const u8 *)request->ie,
@@ -647,7 +647,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
	u32 i;
	u32 sel_bssi_idx = UINT_MAX;
	u8 security = WILC_FW_SEC_NO;
	enum authtype auth_type = ANY;
	enum authtype auth_type = WILC_FW_AUTH_ANY;
	u32 cipher_group;

	vif->connecting = true;
@@ -747,11 +747,11 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,

	switch (sme->auth_type) {
	case NL80211_AUTHTYPE_OPEN_SYSTEM:
		auth_type = OPEN_SYSTEM;
		auth_type = WILC_FW_AUTH_OPEN_SYSTEM;
		break;

	case NL80211_AUTHTYPE_SHARED_KEY:
		auth_type = SHARED_KEY;
		auth_type = WILC_FW_AUTH_SHARED_KEY;
		break;

	default:
@@ -760,7 +760,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,

	if (sme->crypto.n_akm_suites) {
		if (sme->crypto.akm_suites[0] == WLAN_AKM_SUITE_8021X)
			auth_type = IEEE8021;
			auth_type = WILC_FW_AUTH_IEEE8021;
	}

	curr_channel = nw_info->ch;
@@ -909,7 +909,7 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
			ret = wilc_add_wep_key_bss_ap(vif, params->key,
						      params->key_len,
						      key_index, mode,
						      OPEN_SYSTEM);
						      WILC_FW_AUTH_OPEN_SYSTEM);
			break;
		}
		if (memcmp(params->key, priv->wep_key[key_index],
Loading