Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7057dcb3 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: Remove wrapper around spin_lock_bh



Some comment lines that mentioned spin_lock_bh() are also removed.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dfa5e81e
Loading
Loading
Loading
Loading
+19 −19
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ void free_mlme_ap_info(struct adapter *padapter)

	/* free bc/mc sta_info */
	psta = rtw_get_bcmc_stainfo(padapter);
	_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
	spin_lock_bh(&(pstapriv->sta_hash_lock));
	rtw_free_stainfo(padapter, psta);
	_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);

@@ -286,7 +286,7 @@ void expire_timeout_chk(struct adapter *padapter)
	char chk_alive_list[NUM_STA];
	int i;

	_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
	spin_lock_bh(&pstapriv->auth_list_lock);

	phead = &pstapriv->auth_list;
	plist = get_next(phead);
@@ -307,11 +307,11 @@ void expire_timeout_chk(struct adapter *padapter)

				_exit_critical_bh(&pstapriv->auth_list_lock, &irqL);

				_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
				spin_lock_bh(&(pstapriv->sta_hash_lock));
				rtw_free_stainfo(padapter, psta);
				_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);

				_enter_critical_bh(&pstapriv->auth_list_lock, &irqL);
				spin_lock_bh(&pstapriv->auth_list_lock);
			}
		}

@@ -320,7 +320,7 @@ void expire_timeout_chk(struct adapter *padapter)

	psta = NULL;

	_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
	spin_lock_bh(&pstapriv->asoc_list_lock);

	phead = &pstapriv->asoc_list;
	plist = get_next(phead);
@@ -424,7 +424,7 @@ void expire_timeout_chk(struct adapter *padapter)
			psta->keep_alive_trycnt = 0;

			DBG_88E("asoc expire %pM, state = 0x%x\n", (psta->hwaddr), psta->state);
			_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
			spin_lock_bh(&pstapriv->asoc_list_lock);
			rtw_list_delete(&psta->asoc_list);
			pstapriv->asoc_list_cnt--;
			updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
@@ -604,7 +604,7 @@ static void update_bmc_sta(struct adapter *padapter)

		rtw_stassoc_hw_rpt(padapter, psta);

		_enter_critical_bh(&psta->lock, &irqL);
		spin_lock_bh(&psta->lock);
		psta->state = _FW_LINKED;
		_exit_critical_bh(&psta->lock, &irqL);

@@ -679,7 +679,7 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)

	_rtw_memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));

	_enter_critical_bh(&psta->lock, &irqL);
	spin_lock_bh(&psta->lock);
	psta->state |= _FW_LINKED;
	_exit_critical_bh(&psta->lock, &irqL);
}
@@ -1148,7 +1148,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
	if ((NUM_ACL-1) < pacl_list->num)
		return -1;

	_enter_critical_bh(&(pacl_node_q->lock), &irqL);
	spin_lock_bh(&(pacl_node_q->lock));

	phead = get_list_head(pacl_node_q);
	plist = get_next(phead);
@@ -1171,7 +1171,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
	if (added)
		return ret;

	_enter_critical_bh(&(pacl_node_q->lock), &irqL);
	spin_lock_bh(&(pacl_node_q->lock));

	for (i = 0; i < NUM_ACL; i++) {
		paclnode = &pacl_list->aclnode[i];
@@ -1210,7 +1210,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)

	DBG_88E("%s(acl_num =%d) =%pM\n", __func__, pacl_list->num, (addr));

	_enter_critical_bh(&(pacl_node_q->lock), &irqL);
	spin_lock_bh(&(pacl_node_q->lock));

	phead = get_list_head(pacl_node_q);
	plist = get_next(phead);
@@ -1386,7 +1386,7 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
	if (!pmlmeext->bstart_bss)
		return;

	_enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
	spin_lock_bh(&pmlmepriv->bcn_update_lock);

	switch (ie_id) {
	case 0xFF:
@@ -1510,7 +1510,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
		struct sta_info *psta = NULL;
		struct sta_priv *pstapriv = &padapter->stapriv;

		_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
		spin_lock_bh(&pstapriv->asoc_list_lock);

		phead = &pstapriv->asoc_list;
		plist = get_next(phead);
@@ -1753,7 +1753,7 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta,
	rtw_clearstakey_cmd(padapter, (u8 *)psta, (u8)(psta->mac_id + 3), true);


	_enter_critical_bh(&psta->lock, &irqL);
	spin_lock_bh(&psta->lock);
	psta->state &= ~_FW_LINKED;
	_exit_critical_bh(&psta->lock, &irqL);

@@ -1763,7 +1763,7 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta,

	beacon_updated = bss_cap_update_on_sta_leave(padapter, psta);

	_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
	spin_lock_bh(&(pstapriv->sta_hash_lock));
	rtw_free_stainfo(padapter, psta);
	_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);

@@ -1787,7 +1787,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
	DBG_88E(FUNC_NDEV_FMT" with ch:%u, offset:%u\n",
		FUNC_NDEV_ARG(padapter->pnetdev), new_ch, ch_offset);

	_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
	spin_lock_bh(&pstapriv->asoc_list_lock);
	phead = &pstapriv->asoc_list;
	plist = get_next(phead);

@@ -1822,7 +1822,7 @@ int rtw_sta_flush(struct adapter *padapter)
	if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
		return ret;

	_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
	spin_lock_bh(&pstapriv->asoc_list_lock);
	phead = &pstapriv->asoc_list;
	plist = get_next(phead);

@@ -1954,7 +1954,7 @@ void stop_ap_mode(struct adapter *padapter)
	padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;

	/* for ACL */
	_enter_critical_bh(&(pacl_node_q->lock), &irqL);
	spin_lock_bh(&(pacl_node_q->lock));
	phead = get_list_head(pacl_node_q);
	plist = get_next(phead);
	while ((rtw_end_of_queue_search(phead, plist)) == false) {
@@ -1979,7 +1979,7 @@ void stop_ap_mode(struct adapter *padapter)
	rtw_free_all_stainfo(padapter);

	psta = rtw_get_bcmc_stainfo(padapter);
	_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL);
	spin_lock_bh(&(pstapriv->sta_hash_lock));
	rtw_free_stainfo(padapter, psta);
	_exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL);

+7 −9
Original line number Diff line number Diff line
@@ -331,7 +331,7 @@ static inline int __nat25_network_hash(unsigned char *networkAddr)
static inline void __network_hash_link(struct adapter *priv,
				struct nat25_network_db_entry *ent, int hash)
{
	/*  Caller must _enter_critical_bh already! */
	/*  Caller must spin_lock_bh already! */
	ent->next_hash = priv->nethash[hash];
	if (ent->next_hash != NULL)
		ent->next_hash->pprev_hash = &ent->next_hash;
@@ -341,7 +341,7 @@ static inline void __network_hash_link(struct adapter *priv,

static inline void __network_hash_unlink(struct nat25_network_db_entry *ent)
{
	/*  Caller must _enter_critical_bh already! */
	/*  Caller must spin_lock_bh already! */
	*(ent->pprev_hash) = ent->next_hash;
	if (ent->next_hash != NULL)
		ent->next_hash->pprev_hash = ent->pprev_hash;
@@ -354,7 +354,7 @@ static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
{
	struct nat25_network_db_entry *db;
	unsigned long irqL;
	_enter_critical_bh(&priv->br_ext_lock, &irqL);
	spin_lock_bh(&priv->br_ext_lock);

	db = priv->nethash[__nat25_network_hash(networkAddr)];
	while (db != NULL) {
@@ -406,7 +406,7 @@ static void __nat25_db_network_insert(struct adapter *priv,
	int hash;
	unsigned long irqL;

	_enter_critical_bh(&priv->br_ext_lock, &irqL);
	spin_lock_bh(&priv->br_ext_lock);
	hash = __nat25_network_hash(networkAddr);
	db = priv->nethash[hash];
	while (db != NULL) {
@@ -445,7 +445,7 @@ void nat25_db_cleanup(struct adapter *priv)
{
	int i;
	unsigned long irqL;
	_enter_critical_bh(&priv->br_ext_lock, &irqL);
	spin_lock_bh(&priv->br_ext_lock);

	for (i = 0; i < NAT25_HASH_SIZE; i++) {
		struct nat25_network_db_entry *f;
@@ -471,7 +471,7 @@ void nat25_db_expire(struct adapter *priv)
{
	int i;
	unsigned long irqL;
	_enter_critical_bh(&priv->br_ext_lock, &irqL);
	spin_lock_bh(&priv->br_ext_lock);

	for (i = 0; i < NAT25_HASH_SIZE; i++) {
		struct nat25_network_db_entry *f;
@@ -1061,7 +1061,7 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)

		if (!priv->ethBrExtInfo.nat25_disable) {
			unsigned long irqL;
			_enter_critical_bh(&priv->br_ext_lock, &irqL);
			spin_lock_bh(&priv->br_ext_lock);
			/*
			 *	This function look up the destination network address from
			 *	the NAT2.5 database. Return value = -1 means that the
@@ -1178,8 +1178,6 @@ void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr,
	unsigned char networkAddr[MAX_NETWORK_ADDR_LEN];
	struct nat25_network_db_entry *db;
	int hash;
	/* unsigned long irqL; */
	/* _enter_critical_bh(&priv->br_ext_lock, &irqL); */

	__nat25_generate_ipv4_network_addr(networkAddr, (unsigned int *)ipAddr);
	hash = __nat25_network_hash(networkAddr);
+4 −8
Original line number Diff line number Diff line
@@ -153,12 +153,10 @@ _func_enter_;
	if (obj == NULL)
		goto exit;

	/* _enter_critical_bh(&queue->lock, &irqL); */
	_enter_critical(&queue->lock, &irqL);

	rtw_list_insert_tail(&obj->list, &queue->queue);

	/* _exit_critical_bh(&queue->lock, &irqL); */
	_exit_critical(&queue->lock, &irqL);

exit:
@@ -175,7 +173,6 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)

_func_enter_;

	/* _enter_critical_bh(&(queue->lock), &irqL); */
	_enter_critical(&queue->lock, &irqL);
	if (rtw_is_list_empty(&(queue->queue))) {
		obj = NULL;
@@ -184,7 +181,6 @@ _func_enter_;
		rtw_list_delete(&obj->list);
	}

	/* _exit_critical_bh(&(queue->lock), &irqL); */
	_exit_critical(&queue->lock, &irqL);

_func_exit_;
@@ -2206,7 +2202,7 @@ void rtw_disassoc_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
_func_enter_;

	if (pcmd->res != H2C_SUCCESS) {
		_enter_critical_bh(&pmlmepriv->lock, &irqL);
		spin_lock_bh(&pmlmepriv->lock);
		set_fwstate(pmlmepriv, _FW_LINKED);
		_exit_critical_bh(&pmlmepriv->lock, &irqL);

@@ -2263,7 +2259,7 @@ _func_enter_;

	_cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled);

	_enter_critical_bh(&pmlmepriv->lock, &irqL);
	spin_lock_bh(&pmlmepriv->lock);

	if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
		psta = rtw_get_stainfo(&padapter->stapriv, pnetwork->MacAddress);
@@ -2280,7 +2276,7 @@ _func_enter_;
		unsigned long	irqL;

		pwlan = _rtw_alloc_network(pmlmepriv);
		_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
		spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
		if (pwlan == NULL) {
			pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue);
			if (pwlan == NULL) {
@@ -2349,7 +2345,7 @@ _func_enter_;
	psta->aid = passocsta_rsp->cam_id;
	psta->mac_id = passocsta_rsp->cam_id;

	_enter_critical_bh(&pmlmepriv->lock, &irqL);
	spin_lock_bh(&pmlmepriv->lock);

	if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true))
		_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
+1 −1
Original line number Diff line number Diff line
@@ -848,7 +848,7 @@ int proc_get_all_sta_info(char *page, char **start,

	len += snprintf(page + len, count - len, "sta_dz_bitmap=0x%x, tim_bitmap=0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);

	_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
	spin_lock_bh(&pstapriv->sta_hash_lock);

	for (i = 0; i < NUM_STA; i++) {
		phead = &(pstapriv->sta_hash[i]);
+6 −6
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ u8 rtw_do_join(struct adapter *padapter)

_func_enter_;

	_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
	spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
	phead = get_list_head(queue);
	plist = get_next(phead);

@@ -195,7 +195,7 @@ _func_enter_;
		goto exit;
	}

	_enter_critical_bh(&pmlmepriv->lock, &irqL);
	spin_lock_bh(&pmlmepriv->lock);


	DBG_88E("Set BSSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
@@ -285,7 +285,7 @@ _func_enter_;
		goto exit;
	}

	_enter_critical_bh(&pmlmepriv->lock, &irqL);
	spin_lock_bh(&pmlmepriv->lock);

	DBG_88E("Set SSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
@@ -391,7 +391,7 @@ _func_enter_;
		  *pold_state, networktype, get_fwstate(pmlmepriv)));

	if (*pold_state != networktype) {
		_enter_critical_bh(&pmlmepriv->lock, &irqL);
		spin_lock_bh(&pmlmepriv->lock);

		RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, (" change mode!"));
		/* DBG_88E("change mode, old_mode =%d, new_mode =%d, fw_state = 0x%x\n", *pold_state, networktype, get_fwstate(pmlmepriv)); */
@@ -455,7 +455,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)

_func_enter_;

	_enter_critical_bh(&pmlmepriv->lock, &irqL);
	spin_lock_bh(&pmlmepriv->lock);

	if (check_fwstate(pmlmepriv, _FW_LINKED)) {
		RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
@@ -512,7 +512,7 @@ _func_enter_;
			return _SUCCESS;
		}

		_enter_critical_bh(&pmlmepriv->lock, &irqL);
		spin_lock_bh(&pmlmepriv->lock);

		res = rtw_sitesurvey_cmd(padapter, pssid, ssid_max_num, NULL, 0);

Loading