Commit 102243f8 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: Remove conditionals CONFIG_88EU_{AP_MODE,P2P}



These rwo conditional compile symbols are explicitely defined.
As a result, their included code is always compiled. They could be
converted to Kconfig symbols; however, my experience with this driver
in a GitHub repo is that many users of the device have it built into
a SOC or SBC that they wish to use as an access point. As a result,
CONFIG_88EU_APMODE would need to be selected. Thuse it should be built in.

There have also been many users the wish to establish peer-to-peer
networks with this device. For this reason, I am also proposing that
CONFIG_88EU_P2P be automatically included.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Link: https://lore.kernel.org/r/20210909165809.12634-1-Larry.Finger@lwfinger.net


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eb01e81f
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -14,13 +14,3 @@ config R8188EU
	sources for version v4.1.4_6773.20130222, and contains modifications for
	newer kernel features. If built as a module, it will be called r8188eu.
if R8188EU

config 88EU_AP_MODE
	bool "Realtek RTL8188EU AP mode"
	help
	This option enables Access Point mode. Unless you know that your system
	will never be used as an AP, or the target system has limited memory,
	"Y" should be selected.

endif
+0 −8
Original line number Diff line number Diff line
@@ -9,8 +9,6 @@
#include "../include/ieee80211.h"
#include "../include/rtl8188e_cmd.h"

#ifdef CONFIG_88EU_AP_MODE

void init_mlme_ap_info(struct adapter *padapter)
{
	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -604,9 +602,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
	struct mlme_ext_info	*pmlmeinfo = &pmlmeext->mlmext_info;
	struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network;
	struct HT_info_element *pht_info = NULL;
#ifdef CONFIG_88EU_P2P
	struct wifidirect_info	*pwdinfo = &padapter->wdinfo;
#endif /* CONFIG_88EU_P2P */

	bcn_interval = (u16)pnetwork->Configuration.BeaconPeriod;
	cur_channel = pnetwork->Configuration.DSConfig;
@@ -707,10 +703,8 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
	/* let pnetwork_mlmeext == pnetwork_mlme. */
	memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length);

#ifdef CONFIG_88EU_P2P
	memcpy(pwdinfo->p2p_group_ssid, pnetwork->Ssid.Ssid, pnetwork->Ssid.SsidLength);
	pwdinfo->p2p_group_ssid_len = pnetwork->Ssid.SsidLength;
#endif /* CONFIG_88EU_P2P */

	if (pmlmeext->bstart_bss) {
		update_beacon(padapter, _TIM_IE_, NULL, false);
@@ -1847,5 +1841,3 @@ void stop_ap_mode(struct adapter *padapter)

	rtw_free_mlme_priv_ie_data(pmlmepriv);
}

#endif /* CONFIG_88EU_AP_MODE */
+0 −13
Original line number Diff line number Diff line
@@ -1488,10 +1488,8 @@ static void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz)
	padapter = (struct adapter *)pbuf;
	pmlmepriv = &padapter->mlmepriv;

#ifdef CONFIG_88EU_AP_MODE
	if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
		expire_timeout_chk(padapter);
#endif

	rtl8188e_sreset_xmit_status_check(padapter);

@@ -1676,7 +1674,6 @@ static void power_saving_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz)
	 rtw_ps_processor(padapter);
}

#ifdef CONFIG_88EU_P2P
u8 p2p_protocol_wk_cmd(struct adapter *padapter, int intCmdType)
{
	struct cmd_obj	*ph2c;
@@ -1713,7 +1710,6 @@ u8 p2p_protocol_wk_cmd(struct adapter *padapter, int intCmdType)

	return res;
}
#endif /* CONFIG_88EU_P2P */

u8 rtw_ps_cmd(struct adapter *padapter)
{
@@ -1747,8 +1743,6 @@ u8 rtw_ps_cmd(struct adapter *padapter)
	return res;
}

#ifdef CONFIG_88EU_AP_MODE

static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
{
	int cnt = 0;
@@ -1819,7 +1813,6 @@ u8 rtw_chk_hi_queue_cmd(struct adapter *padapter)
exit:
	return res;
}
#endif

u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt)
{
@@ -1896,10 +1889,8 @@ static void c2h_wk_callback(struct work_struct *work)
			continue;
		}

#ifdef CONFIG_88EU_P2P
		/* Enqueue into cmd_thread for others */
		rtw_c2h_wk_cmd(adapter, (u8 *)c2h_evt);
#endif
	}

	evtpriv->c2h_wk_alive = false;
@@ -1930,7 +1921,6 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
	case ANT_SELECT_WK_CID:
		antenna_select_wk_hdl(padapter, pdrvextra_cmd->type_size);
		break;
#ifdef CONFIG_88EU_P2P
	case P2P_PS_WK_CID:
		p2p_ps_wk_hdl(padapter, pdrvextra_cmd->type_size);
		break;
@@ -1939,12 +1929,9 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
		/* 	I used the type_size as the type command */
		p2p_protocol_wk_hdl(padapter, pdrvextra_cmd->type_size);
		break;
#endif
#ifdef CONFIG_88EU_AP_MODE
	case CHECK_HIQ_WK_CID:
		rtw_chk_hi_queue_hdl(padapter);
		break;
#endif /* CONFIG_88EU_AP_MODE */
	case C2H_WK_CID:
		c2h_evt_hdl(padapter, (struct c2h_evt_hdr *)pdrvextra_cmd->pbuf, NULL);
		break;
+0 −3
Original line number Diff line number Diff line
@@ -795,8 +795,6 @@ int proc_set_rssi_disp(struct file *file, const char __user *buffer,
	return count;
}

#ifdef CONFIG_88EU_AP_MODE

int proc_get_all_sta_info(char *page, char **start,
			  off_t offset, int count,
			  int *eof, void *data)
@@ -851,7 +849,6 @@ int proc_get_all_sta_info(char *page, char **start,
	*eof = 1;
	return len;
}
#endif

int proc_get_best_channel(char *page, char **start,
			  off_t offset, int count,
+0 −5
Original line number Diff line number Diff line
@@ -1051,9 +1051,7 @@ void dump_ies(u8 *buf, u32 buf_len)
		len = *(pos + 1);

		DBG_88E("%s ID:%u, LEN:%u\n", __func__, id, len);
		#ifdef CONFIG_88EU_P2P
		dump_p2p_ie(pos, len);
		#endif
		dump_wps_ie(pos, len);

		pos += (2 + len);
@@ -1081,7 +1079,6 @@ void dump_wps_ie(u8 *ie, u32 ie_len)
	}
}

#ifdef CONFIG_88EU_P2P
void dump_p2p_ie(u8 *ie, u32 ie_len)
{
	u8 *pos = (u8 *)ie;
@@ -1283,8 +1280,6 @@ void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id)
	}
}

#endif /* CONFIG_88EU_P2P */

/* Baron adds to avoid FreeBSD warning */
int ieee80211_is_empty_essid(const char *essid, int essid_len)
{
Loading