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

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

staging: rtl8192e: Pass ieee80211_device to callbacks

parent ad44d2a1
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -2186,20 +2186,20 @@ struct ieee80211_device {
	void (*stop_send_beacons) (struct ieee80211_device *dev);

	/* power save mode related */
	void (*sta_wake_up) (struct net_device *dev);
	void (*enter_sleep_state) (struct net_device *dev, u32 th, u32 tl);
	short (*ps_is_queue_empty) (struct net_device *dev);
        int (*handle_beacon) (struct net_device * dev, struct ieee80211_beacon * beacon, struct ieee80211_network * network);
        int (*handle_assoc_response) (struct net_device * dev, struct ieee80211_assoc_response_frame * resp, struct ieee80211_network * network);
	void (*sta_wake_up) (struct ieee80211_device *ieee80211);
	void (*enter_sleep_state) (struct ieee80211_device *ieee80211, u32 th, u32 tl);
	short (*ps_is_queue_empty) (struct ieee80211_device *ieee80211);
        int (*handle_beacon) (struct ieee80211_device *ieee80211, struct ieee80211_beacon *beacon, struct ieee80211_network *network);
        int (*handle_assoc_response) (struct ieee80211_device *ieee80211, struct ieee80211_assoc_response_frame *resp, struct ieee80211_network *network);

	/* check whether Tx hw resouce available */
	short (*check_nic_enough_desc)(struct net_device *dev, int queue_index);
	short (*check_nic_enough_desc)(struct ieee80211_device *ieee80211, int queue_index);
	//added by wb for HT related
	void (*SetBWModeHandler)(struct net_device *dev, HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset);
	bool (*GetNmodeSupportBySecCfg)(struct net_device* dev);
	void (*SetWirelessMode)(struct net_device* dev, u8 wireless_mode);
	bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device* dev);
	void (*InitialGainHandler)(struct net_device *dev, u8 Operation);
	void (*SetBWModeHandler)(struct ieee80211_device *ieee80211, HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset);
	bool (*GetNmodeSupportBySecCfg)(struct ieee80211_device *ieee80211);
	void (*SetWirelessMode)(struct ieee80211_device *ieee80211, u8 wireless_mode);
	bool (*GetHalfNmodeSupportByAPsHandler)(struct ieee80211_device *ieee80211);
	void (*InitialGainHandler)(struct ieee80211_device *ieee80211, u8 Operation);

	/* This must be the last item so that it points to the data
	 * allocated beyond this structure by alloc_ieee80211 */
+1 −1
Original line number Diff line number Diff line
@@ -2634,7 +2634,7 @@ static inline void ieee80211_process_probe_response(
	if (is_beacon(beacon->header.frame_ctl)&&is_same_network(&ieee->current_network, &network, ieee)&&\
		(ieee->state == IEEE80211_LINKED)) {
		if(ieee->handle_beacon != NULL) {
			ieee->handle_beacon(ieee->dev,beacon,&ieee->current_network);
			ieee->handle_beacon(ieee, beacon, &ieee->current_network);
		}
	}
}
+14 −14
Original line number Diff line number Diff line
@@ -259,8 +259,8 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
			ieee->seq_ctrl[0]++;

		/* check wether the managed packet queued greater than 5 */
		if(!ieee->check_nic_enough_desc(ieee->dev,tcb_desc->queue_index)||\
				(skb_queue_len(&ieee->skb_waitQ[tcb_desc->queue_index]) != 0)||\
		if(!ieee->check_nic_enough_desc(ieee, tcb_desc->queue_index)||
				(skb_queue_len(&ieee->skb_waitQ[tcb_desc->queue_index]) != 0)||
				(ieee->queue_stop) ) {
			/* insert the skb packet to the management queue */
			/* as for the completion function, it does not need
@@ -1508,11 +1508,11 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
					if(ieee80211_is_54g(ieee->current_network) &&
						(ieee->modulation & IEEE80211_OFDM_MODULATION)){
						ieee->rate = 108;
						ieee->SetWirelessMode(ieee->dev, IEEE_G);
						ieee->SetWirelessMode(ieee, IEEE_G);
						printk(KERN_INFO"Using G rates\n");
					}else{
						ieee->rate = 22;
						ieee->SetWirelessMode(ieee->dev, IEEE_B);
						ieee->SetWirelessMode(ieee, IEEE_B);
						printk(KERN_INFO"Using B rates\n");
					}
					memset(ieee->dot11HTOperationalRateSet, 0, 16);
@@ -1845,13 +1845,13 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
	}
	if(sleep == 1){
		if(ieee->sta_sleep == 1){
			ieee->enter_sleep_state(ieee->dev,th,tl);
			ieee->enter_sleep_state(ieee, th, tl);
		}

		else if(ieee->sta_sleep == 0){
			spin_lock(&ieee->mgmt_tx_lock);

			if(ieee->ps_is_queue_empty(ieee->dev)){
			if (ieee->ps_is_queue_empty(ieee)) {
				ieee->sta_sleep = 2;
				ieee->ack_tx_to_ieee = 1;
				ieee80211_sta_ps_send_null_frame(ieee,1);
@@ -1897,7 +1897,7 @@ void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl)
	}

	if(ieee->sta_sleep == 1)
		ieee->sta_wake_up(ieee->dev);
		ieee->sta_wake_up(ieee);
	if(nl){

			if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_NULL_DATA_POWER_SAVING)
@@ -1929,7 +1929,7 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
		/* Null frame with PS bit set */
		if(success){
			ieee->sta_sleep = 1;
			ieee->enter_sleep_state(ieee->dev,ieee->ps_th,ieee->ps_tl);
			ieee->enter_sleep_state(ieee, ieee->ps_th, ieee->ps_tl);
		}
	} else {/* 21112005 - tx again null without PS bit if lost */

@@ -2028,7 +2028,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
							memcpy(ieee->pHTInfo->PeerHTInfoBuf, network->bssht.bdHTInfoBuf, network->bssht.bdHTInfoLen);
						}
						if (ieee->handle_assoc_response != NULL)
							ieee->handle_assoc_response(ieee->dev, (struct ieee80211_assoc_response_frame*)header, network);
							ieee->handle_assoc_response(ieee, (struct ieee80211_assoc_response_frame*)header, network);
					}
					ieee80211_associate_complete(ieee);
				} else {
@@ -2072,7 +2072,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
								ieee->softmac_stats.rx_auth_rs_ok++;
								if(!(ieee->pHTInfo->IOTAction&HT_IOT_ACT_PURE_N_MODE))
								{
									if (!ieee->GetNmodeSupportBySecCfg(ieee->dev))
									if (!ieee->GetNmodeSupportBySecCfg(ieee))
									{
										// WEP or TKIP encryption
										if(IsHTHalfNmodeAPs(ieee))
@@ -2091,12 +2091,12 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
								/* Dummy wirless mode setting to avoid encryption issue */
								if(bSupportNmode) {
									//N mode setting
									ieee->SetWirelessMode(ieee->dev, \
									ieee->SetWirelessMode(ieee,
											ieee->current_network.mode);
								}else{
									//b/g mode setting
									/*TODO*/
									ieee->SetWirelessMode(ieee->dev, IEEE_G);
									ieee->SetWirelessMode(ieee, IEEE_G);
								}

								if (ieee->current_network.mode == IEEE_N_24G && bHalfSupportNmode == true)
@@ -2207,7 +2207,7 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
#else
		if ((skb_queue_len(&ieee->skb_waitQ[queue_index]) != 0) ||
#endif
		(!ieee->check_nic_enough_desc(ieee->dev,queue_index))||\
		(!ieee->check_nic_enough_desc(ieee, queue_index))||
		     (ieee->queue_stop)) {
			/* insert the skb packet to the wait queue */
			/* as for the completion function, it does not need
@@ -2457,7 +2457,7 @@ void ieee80211_start_ibss_wq(struct work_struct *work)

		// By default, WMM function will be disabled in IBSS mode
		ieee->current_network.QoS_Enable = 0;
		ieee->SetWirelessMode(ieee->dev, IEEE_G);
		ieee->SetWirelessMode(ieee, IEEE_G);
		ieee->current_network.atim_window = 0;
		ieee->current_network.capability = WLAN_CAPABILITY_IBSS;
		if(ieee->short_slot)
+4 −4
Original line number Diff line number Diff line
@@ -322,13 +322,13 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)

	ieee->state = IEEE80211_LINKED_SCANNING;
	ieee->link_change(ieee);
	ieee->InitialGainHandler(ieee->dev,IG_Backup);
	ieee->InitialGainHandler(ieee, IG_Backup);
	if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT && ieee->pHTInfo->bCurBW40MHz) {
		b40M = 1;
		chan_offset = ieee->pHTInfo->CurSTAExtChnlOffset;
		bandwidth = (HT_CHANNEL_WIDTH)ieee->pHTInfo->bCurBW40MHz;
		printk("Scan in 40M, force to 20M first:%d, %d\n", chan_offset, bandwidth);
		ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
		ieee->SetBWModeHandler(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
		}
	ieee80211_start_scan_syncro(ieee);
	if (b40M) {
@@ -339,12 +339,12 @@ void ieee80211_wx_sync_scan_wq(struct work_struct *work)
			ieee->set_chan(ieee, chan - 2);
		else
			ieee->set_chan(ieee, chan);
		ieee->SetBWModeHandler(ieee->dev, bandwidth, chan_offset);
		ieee->SetBWModeHandler(ieee, bandwidth, chan_offset);
	} else {
		ieee->set_chan(ieee, chan);
	}

	ieee->InitialGainHandler(ieee->dev,IG_Restore);
	ieee->InitialGainHandler(ieee, IG_Restore);
	ieee->state = IEEE80211_LINKED;
	ieee->link_change(ieee);

+1 −1
Original line number Diff line number Diff line
@@ -330,7 +330,7 @@ void ieee80211_tx_query_agg_cap(struct ieee80211_device* ieee, struct sk_buff* s


#if 1
	if(!ieee->GetNmodeSupportBySecCfg(ieee->dev))
	if (!ieee->GetNmodeSupportBySecCfg(ieee))
	{
		return;
	}
Loading