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

Commit d1c580aa authored by Mike McCormack's avatar Mike McCormack Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192e: Pass ieee80211_device to callbacks

parent 09145962
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -1803,7 +1803,7 @@ struct ieee80211_device {
	u8  LPSDelayCnt;
	u8  LPSDelayCnt;
	bool bIsAggregateFrame;
	bool bIsAggregateFrame;
	bool polling;
	bool polling;
	void (*LeisurePSLeave)(struct net_device *dev);
	void (*LeisurePSLeave)(struct ieee80211_device *ieee);
#endif
#endif


#ifdef ENABLE_IPS
#ifdef ENABLE_IPS
@@ -1811,10 +1811,10 @@ struct ieee80211_device {
	bool wx_set_enc;
	bool wx_set_enc;
	struct semaphore ips_sem;
	struct semaphore ips_sem;
	struct work_struct ips_leave_wq;
	struct work_struct ips_leave_wq;
        void (*ieee80211_ips_leave_wq) (struct net_device *dev);
        void (*ieee80211_ips_leave_wq) (struct ieee80211_device *ieee);
        void (*ieee80211_ips_leave)(struct net_device *dev);
        void (*ieee80211_ips_leave)(struct ieee80211_device *ieee);
#endif
#endif
	void (*SetHwRegHandler)(struct net_device *dev,u8 variable,u8* val);
	void (*SetHwRegHandler)(struct ieee80211_device *ieee, u8 variable, u8 *val);
	u8   (*rtllib_ap_sec_type)(struct ieee80211_device *ieee);
	u8   (*rtllib_ap_sec_type)(struct ieee80211_device *ieee);


	//hw security related
	//hw security related
@@ -2099,7 +2099,7 @@ struct ieee80211_device {
        struct workqueue_struct *wq;
        struct workqueue_struct *wq;


	/* Callback functions */
	/* Callback functions */
	void (*set_security)(struct net_device *dev,
	void (*set_security)(struct ieee80211_device *ieee,
			     struct ieee80211_security *sec);
			     struct ieee80211_security *sec);


	/* Used to TX data frame by using txb structs.
	/* Used to TX data frame by using txb structs.
@@ -2107,7 +2107,7 @@ struct ieee80211_device {
	 * is set the flag IEEE_SOFTMAC_TX_QUEUE
	 * is set the flag IEEE_SOFTMAC_TX_QUEUE
	 */
	 */
	int (*hard_start_xmit)(struct ieee80211_txb *txb,
	int (*hard_start_xmit)(struct ieee80211_txb *txb,
			       struct net_device *dev);
			       struct ieee80211_device *ieee);


	int (*reset_port)(struct net_device *dev);
	int (*reset_port)(struct net_device *dev);
        int (*is_queue_full) (struct net_device * dev, int pri);
        int (*is_queue_full) (struct net_device * dev, int pri);
+1 −1
Original line number Original line Diff line number Diff line
@@ -1341,7 +1341,7 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
						(ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) )
						(ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) )
					{
					{
						if(ieee->LeisurePSLeave)
						if(ieee->LeisurePSLeave)
							ieee->LeisurePSLeave(dev);
							ieee->LeisurePSLeave(ieee);
					}
					}
				}
				}
			}
			}
+6 −6
Original line number Original line Diff line number Diff line
@@ -609,7 +609,7 @@ void ieee80211_rtl_start_scan(struct ieee80211_device *ieee)
{
{
#ifdef ENABLE_IPS
#ifdef ENABLE_IPS
	if(ieee->ieee80211_ips_leave_wq != NULL)
	if(ieee->ieee80211_ips_leave_wq != NULL)
		ieee->ieee80211_ips_leave_wq(ieee->dev);
		ieee->ieee80211_ips_leave_wq(ieee);
#endif
#endif


#ifdef ENABLE_DOT11D
#ifdef ENABLE_DOT11D
@@ -1408,7 +1408,7 @@ void ieee80211_associate_procedure_wq(struct work_struct *work)
	ieee->sync_scan_hurryup = 1;
	ieee->sync_scan_hurryup = 1;
#ifdef ENABLE_IPS
#ifdef ENABLE_IPS
	if(ieee->ieee80211_ips_leave != NULL)
	if(ieee->ieee80211_ips_leave != NULL)
        	ieee->ieee80211_ips_leave(ieee->dev);
		ieee->ieee80211_ips_leave(ieee);
#endif
#endif


	down(&ieee->wx_sem);
	down(&ieee->wx_sem);
@@ -2522,7 +2522,7 @@ void ieee80211_start_bss(struct ieee80211_device *ieee)
	if (ieee->state == IEEE80211_NOLINK){
	if (ieee->state == IEEE80211_NOLINK){
#ifdef ENABLE_IPS
#ifdef ENABLE_IPS
		if(ieee->ieee80211_ips_leave_wq != NULL)
		if(ieee->ieee80211_ips_leave_wq != NULL)
			ieee->ieee80211_ips_leave_wq(ieee->dev);
			ieee->ieee80211_ips_leave_wq(ieee);
#endif
#endif
		ieee->actscanning = true;
		ieee->actscanning = true;
		ieee80211_rtl_start_scan(ieee);
		ieee80211_rtl_start_scan(ieee);
@@ -2933,7 +2933,7 @@ static int ieee80211_wpa_set_auth_algs(struct ieee80211_device *ieee, int value)




	if (ieee->set_security)
	if (ieee->set_security)
		ieee->set_security(ieee->dev, &sec);
		ieee->set_security(ieee, &sec);


	return ret;
	return ret;
}
}
@@ -2981,7 +2981,7 @@ static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 v
			sec.level = SEC_LEVEL_1;
			sec.level = SEC_LEVEL_1;
		}
		}
		if (ieee->set_security)
		if (ieee->set_security)
			ieee->set_security(ieee->dev, &sec);
			ieee->set_security(ieee, &sec);
		break;
		break;
	}
	}


@@ -3147,7 +3147,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
	}
	}
 done:
 done:
	if (ieee->set_security)
	if (ieee->set_security)
		ieee->set_security(ieee->dev, &sec);
		ieee->set_security(ieee, &sec);


	/* Do not reset port if card is in Managed mode since resetting will
	/* Do not reset port if card is in Managed mode since resetting will
	 * generate new IEEE 802.11 authentication which may end up in looping
	 * generate new IEEE 802.11 authentication which may end up in looping
+6 −6
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info
		}
		}
#endif
#endif
		ieee->current_network.channel = fwrq->m;
		ieee->current_network.channel = fwrq->m;
		ieee->set_chan(ieee->dev, ieee->current_network.channel);
		ieee->set_chan(ieee, ieee->current_network.channel);


		if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
		if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
			if(ieee->state == IEEE80211_LINKED){
			if(ieee->state == IEEE80211_LINKED){
@@ -307,7 +307,7 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)


#ifdef ENABLE_LPS
#ifdef ENABLE_LPS
	if (ieee->LeisurePSLeave) {
	if (ieee->LeisurePSLeave) {
		ieee->LeisurePSLeave(ieee->dev);
		ieee->LeisurePSLeave(ieee);
	}
	}


	/* notify AP to be in PS mode */
	/* notify AP to be in PS mode */
@@ -334,14 +334,14 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
	if (b40M) {
	if (b40M) {
		printk("Scan in 20M, back to 40M\n");
		printk("Scan in 20M, back to 40M\n");
		if (chan_offset == HT_EXTCHNL_OFFSET_UPPER)
		if (chan_offset == HT_EXTCHNL_OFFSET_UPPER)
			ieee->set_chan(ieee->dev, chan + 2);
			ieee->set_chan(ieee, chan + 2);
		else if (chan_offset == HT_EXTCHNL_OFFSET_LOWER)
		else if (chan_offset == HT_EXTCHNL_OFFSET_LOWER)
			ieee->set_chan(ieee->dev, chan - 2);
			ieee->set_chan(ieee, chan - 2);
		else
		else
			ieee->set_chan(ieee->dev, chan);
			ieee->set_chan(ieee, chan);
		ieee->SetBWModeHandler(ieee->dev, bandwidth, chan_offset);
		ieee->SetBWModeHandler(ieee->dev, bandwidth, chan_offset);
	} else {
	} else {
		ieee->set_chan(ieee->dev, chan);
		ieee->set_chan(ieee, chan);
	}
	}


	ieee->InitialGainHandler(ieee->dev,IG_Restore);
	ieee->InitialGainHandler(ieee->dev,IG_Restore);
+1 −1
Original line number Original line Diff line number Diff line
@@ -935,7 +935,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, struct net_device *dev)
		if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE){
		if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE){
			ieee80211_softmac_xmit(txb, ieee);
			ieee80211_softmac_xmit(txb, ieee);
		}else{
		}else{
			if ((*ieee->hard_start_xmit)(txb, dev) == 0) {
			if ((*ieee->hard_start_xmit)(txb, ieee) == 0) {
				stats->tx_packets++;
				stats->tx_packets++;
				stats->tx_bytes += txb->payload_size;
				stats->tx_bytes += txb->payload_size;
				return 0;
				return 0;
Loading