• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MAC_ARG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MAC_ARG函数的典型用法代码示例。如果您正苦于以下问题:C++ MAC_ARG函数的具体用法?C++ MAC_ARG怎么用?C++ MAC_ARG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MAC_ARG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: print_mac

void print_mac(struct ethhdr* eth)
{
    if(eth==NULL)
        return;

    if(eth->h_source!=NULL)
        printk("SOURCE:" MAC_FMT "\n", MAC_ARG(eth->h_source));

    if(eth->h_dest!=NULL)
        printk("DEST:" MAC_FMT "\n", MAC_ARG(eth->h_dest));
}
开发者ID:fengidri,项目名称:linux-C,代码行数:11,代码来源:drop.c


示例2: proc_get_ap_info

int proc_get_ap_info(struct seq_file *m, void *v)
{
	struct net_device *dev = m->private;
	struct sta_info *psta;
	_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
	struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
	struct wlan_network *cur_network = &(pmlmepriv->cur_network);
	struct sta_priv *pstapriv = &padapter->stapriv;

	psta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
	if(psta)
	{
		int i;
		struct recv_reorder_ctrl *preorder_ctrl;
					
		DBG_871X_SEL_NL(m, "SSID=%s\n", cur_network->network.Ssid.Ssid);		
		DBG_871X_SEL_NL(m, "sta's macaddr:" MAC_FMT "\n", MAC_ARG(psta->hwaddr));
		DBG_871X_SEL_NL(m, "cur_channel=%d, cur_bwmode=%d, cur_ch_offset=%d\n", pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);		
		DBG_871X_SEL_NL(m, "wireless_mode=0x%x, rtsen=%d, cts2slef=%d\n", psta->wireless_mode, psta->rtsen, psta->cts2self);
		DBG_871X_SEL_NL(m, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
#ifdef CONFIG_80211N_HT
		DBG_871X_SEL_NL(m, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);		
		DBG_871X_SEL_NL(m, "bwmode=%d, ch_offset=%d, sgi_20m=%d,sgi_40m=%d\n", psta->bw_mode, psta->htpriv.ch_offset, psta->htpriv.sgi_20m, psta->htpriv.sgi_40m);
		DBG_871X_SEL_NL(m, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);	
		DBG_871X_SEL_NL(m, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
		DBG_871X_SEL_NL(m, "ldpc_cap=0x%x, stbc_cap=0x%x, beamform_cap=0x%x\n", psta->htpriv.ldpc_cap, psta->htpriv.stbc_cap, psta->htpriv.beamform_cap);
#endif //CONFIG_80211N_HT
#ifdef CONFIG_80211AC_VHT
		DBG_871X_SEL_NL(m, "vht_en=%d, vht_sgi_80m=%d\n", psta->vhtpriv.vht_option, psta->vhtpriv.sgi_80m);
		DBG_871X_SEL_NL(m, "vht_ldpc_cap=0x%x, vht_stbc_cap=0x%x, vht_beamform_cap=0x%x\n", psta->vhtpriv.ldpc_cap, psta->vhtpriv.stbc_cap, psta->vhtpriv.beamform_cap);
		DBG_871X_SEL_NL(m, "vht_mcs_map=0x%x, vht_highest_rate=0x%x, vht_ampdu_len=%d\n", *(u16*)psta->vhtpriv.vht_mcs_map, psta->vhtpriv.vht_highest_rate, psta->vhtpriv.ampdu_len);
#endif
					
		for(i=0;i<16;i++)
		{							
			preorder_ctrl = &psta->recvreorder_ctrl[i];
			if(preorder_ctrl->enable)
			{
				DBG_871X_SEL_NL(m, "tid=%d, indicate_seq=%d\n", i, preorder_ctrl->indicate_seq);
			}
		}	
							
	}
	else
	{							
		DBG_871X_SEL_NL(m, "can't get sta's macaddr, cur_network's macaddr:" MAC_FMT "\n", MAC_ARG(cur_network->network.MacAddress));
	}

	return 0;
}
开发者ID:NotKit,项目名称:android-ia_kernel_intel_baytrail,代码行数:51,代码来源:rtw_debug.c


示例3: IOLog

IOReturn darwin_iwi4965::getHardwareAddress( IOEthernetAddress * addr )
{
	UInt16 val;
	if (fEnetAddr.bytes[0]==0 && fEnetAddr.bytes[1]==0 && fEnetAddr.bytes[2]==0
	&& fEnetAddr.bytes[3]==0 && fEnetAddr.bytes[4]==0 && fEnetAddr.bytes[5]==0)
	{
		//00:0e:35:e0:3d:b3
		/*fEnetAddr.bytes[0]=0x00;
		fEnetAddr.bytes[1]=0x0e;
		fEnetAddr.bytes[2]=0x35;
		fEnetAddr.bytes[3]=0xe0;
		fEnetAddr.bytes[4]=0x3d;
		fEnetAddr.bytes[5]=0xb3;
		if (priv) memcpy(priv->eeprom.mac_address, fEnetAddr.bytes, ETH_ALEN);*/
		if (priv) memcpy(fEnetAddr.bytes, priv->eeprom.mac_address, ETH_ALEN);	
		IOLog("getHardwareAddress " MAC_FMT "\n",MAC_ARG(fEnetAddr.bytes));	
	}
	memcpy(addr, &fEnetAddr, sizeof(*addr));
	if (priv)
	{
		memcpy(priv->mac_addr, &fEnetAddr.bytes, ETH_ALEN);
		struct ieee80211_local* loc=hw_to_local(priv->hw);
		memcpy(loc->mdev->dev_addr, &fEnetAddr.bytes, ETH_ALEN);
		//IOLog("getHardwareAddress " MAC_FMT "\n",MAC_ARG(priv->mac_addr));
	}
	
	return kIOReturnSuccess;
}
开发者ID:Klozz,项目名称:iwidarwin,代码行数:28,代码来源:iwi4965.cpp


示例4: rtllib_encrypt_fragment

int rtllib_encrypt_fragment(
	struct rtllib_device *ieee,
	struct sk_buff *frag,
	int hdr_len)
#endif
{
	struct rtllib_crypt_data* crypt = NULL;//ieee->crypt[ieee->tx_keyidx];
	int res;
	
#ifdef _RTL8192_EXT_PATCH_
	if(is_mesh)
		crypt = ieee->cryptlist[0]->crypt[ieee->mesh_txkeyidx]; //AMY modify 090226
	else
		crypt = ieee->sta_crypt[ieee->tx_keyidx]; 		
#else
	crypt = ieee->crypt[ieee->tx_keyidx];
#endif

	if (!(crypt && crypt->ops))
	{
		printk("=========>%s(), crypt is null\n", __FUNCTION__);
		return -1;
	}
#ifdef CONFIG_RTLLIB_CRYPT_TKIP
	struct rtllib_hdr_1addr *header;

	if (ieee->tkip_countermeasures &&
	    crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) {
		header = (struct rtllib_hdr_1addr *) frag->data;
		if (net_ratelimit()) {
			printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
			       "TX packet to " MAC_FMT "\n",
			       ieee->dev->name, MAC_ARG(header->addr1));
		}
		return -1;
	}
#endif
	/* To encrypt, frame format is:
	 * IV (4 bytes), clear payload (including SNAP), ICV (4 bytes) */

	// PR: FIXME: Copied from hostap. Check fragmentation/MSDU/MPDU encryption.
	/* Host-based IEEE 802.11 fragmentation for TX is not yet supported, so
	 * call both MSDU and MPDU encryption functions from here. */
	atomic_inc(&crypt->refcnt);
	res = 0;
	if (crypt->ops->encrypt_msdu)
		res = crypt->ops->encrypt_msdu(frag, hdr_len, crypt->priv);
	if (res == 0 && crypt->ops->encrypt_mpdu)
		res = crypt->ops->encrypt_mpdu(frag, hdr_len, crypt->priv);

	atomic_dec(&crypt->refcnt);
	if (res < 0) {
		printk(KERN_INFO "%s: Encryption failed: len=%d.\n",
		       ieee->dev->name, frag->len);
		ieee->ieee_stats.tx_discards++;
		return -1;
	}

	return 0;
}
开发者ID:OpenHMR,项目名称:Open-HMR600,代码行数:60,代码来源:rtllib_tx.c


示例5: rtl_op_sta_add

static int rtl_op_sta_add(struct ieee80211_hw *hw,
			 struct ieee80211_vif *vif,
			 struct ieee80211_sta *sta)
{
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
	struct rtl_sta_info *sta_entry;

	if (sta) {
		sta_entry = (struct rtl_sta_info *) sta->drv_priv;
		if (rtlhal->current_bandtype == BAND_ON_2_4G) {
			sta_entry->wireless_mode = WIRELESS_MODE_G;
			if (sta->supp_rates[0] <= 0xf)
				sta_entry->wireless_mode = WIRELESS_MODE_B;
			if (sta->ht_cap.ht_supported == true)
				sta_entry->wireless_mode = WIRELESS_MODE_N_24G;
		} else if (rtlhal->current_bandtype == BAND_ON_5G) {
			sta_entry->wireless_mode = WIRELESS_MODE_A;
			if (sta->ht_cap.ht_supported == true)
				sta_entry->wireless_mode = WIRELESS_MODE_N_24G;
		}

		/* I found some times mac80211 give wrong supp_rates for adhoc*/
		if (rtlpriv->mac80211.opmode == NL80211_IFTYPE_ADHOC)
			sta_entry->wireless_mode = WIRELESS_MODE_G;

		RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG,
			("Add sta addr is "MAC_FMT"\n", MAC_ARG(sta->addr)));
		rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
	}
	return 0;
}
开发者ID:Druboo666,项目名称:Xperia-2011-Kernel-2.6.32.9-KRsH,代码行数:32,代码来源:core.c


示例6: nm_ap_print_self

void
nm_ap_print_self (NMAccessPoint *ap,
                  const char * prefix)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	nm_info ("%s'%s' (%p) stamp=%ld flags=0x%X wpa-flags=0x%X rsn-flags=0x%x "
	         "bssid=" MAC_FMT " strength=%d freq=%d rate=%d mode=%d seen=%ld",
	         prefix,
	         priv->ssid ? nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len) : "(none)",
	         ap,
	         priv->timestamp.tv_sec,
	         priv->flags,
	         priv->wpa_flags,
	         priv->rsn_flags,
	         MAC_ARG (priv->address.ether_addr_octet),
	         priv->strength,
	         priv->freq,
	         priv->max_bitrate,
	         priv->mode,
	         priv->last_seen);
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:26,代码来源:NetworkManagerAP.c


示例7: ieee80211_sta_debugfs_add

void ieee80211_sta_debugfs_add(struct sta_info *sta)
{
	char buf[3*6];
	struct dentry *stations_dir = sta->local->debugfs.stations;

	if (!stations_dir)
		return;

	sprintf(buf, MAC_FMT, MAC_ARG(sta->addr));

	sta->debugfs.dir = debugfs_create_dir(buf, stations_dir);
	if (!sta->debugfs.dir)
		return;

	DEBUGFS_ADD(flags);
	DEBUGFS_ADD(num_ps_buf_frames);
	DEBUGFS_ADD(last_ack_rssi);
	DEBUGFS_ADD(last_ack_ms);
	DEBUGFS_ADD(inactive_ms);
	DEBUGFS_ADD(last_seq_ctrl);
#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
	DEBUGFS_ADD(wme_rx_queue);
	DEBUGFS_ADD(wme_tx_queue);
#endif
}
开发者ID:cilynx,项目名称:dd-wrt,代码行数:25,代码来源:debugfs_sta.c


示例8: _rtw_drv_register_netdev

static int _rtw_drv_register_netdev(struct rtw_adapter *padapter, char *name)
{
	struct net_device *pnetdev = padapter->pnetdev;
	int ret = _SUCCESS;

	/* alloc netdev name */
	rtw_init_netdev23a_name23a(pnetdev, name);

	ether_addr_copy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr);

	/* Tell the network stack we exist */
	if (register_netdev(pnetdev)) {
		DBG_8723A("%s(%s): Failed!\n", __func__, pnetdev->name);
		ret = _FAIL;
		goto error_register_netdev;
	}
	DBG_8723A("%s, MAC Address (if%d) = " MAC_FMT "\n", __func__,
		  (padapter->iface_id + 1), MAC_ARG(pnetdev->dev_addr));
	return ret;

error_register_netdev:

	if (padapter->iface_id > IFACE_ID0) {
		rtw_free_drv_sw23a(padapter);

		free_netdev(pnetdev);
	}
	return ret;
}
开发者ID:abhinav90,项目名称:linux,代码行数:29,代码来源:os_intfs.c


示例9: rtw_os_ksocket_send

static void rtw_os_ksocket_send(struct adapter *padapter, union recv_frame *precv_frame)
{
	_pkt *skb = precv_frame->u.hdr.pkt;
	struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
	struct sta_info *psta = precv_frame->u.hdr.psta;

	DBG_871X("eth rx: got eth_type = 0x%x\n", pattrib->eth_type);

	if (psta && psta->isrc && psta->pid > 0) {
		u16 rx_pid;

		rx_pid = *(u16 *)(skb->data+ETH_HLEN);

		DBG_871X("eth rx(pid = 0x%x): sta("MAC_FMT") pid = 0x%x\n",
			rx_pid, MAC_ARG(psta->hwaddr), psta->pid);

		if (rx_pid == psta->pid) {
			int i;
			u16 len = *(u16 *)(skb->data+ETH_HLEN+2);
			/* u16 ctrl_type = *(u16*)(skb->data+ETH_HLEN+4); */

			/* DBG_871X("eth, RC: len = 0x%x, ctrl_type = 0x%x\n", len, ctrl_type); */
			DBG_871X("eth, RC: len = 0x%x\n", len);

			for (i = 0; i < len; i++)
				DBG_871X("0x%x\n", *(skb->data+ETH_HLEN+4+i));
				/* DBG_871X("0x%x\n", *(skb->data+ETH_HLEN+6+i)); */

			DBG_871X("eth, RC-end\n");
		}

	}

}
开发者ID:RainMark,项目名称:rtl8723bs,代码行数:34,代码来源:recv_linux.c


示例10: dump_ts_list

void dump_ts_list(struct list_head * ts_list)
{
	PTS_COMMON_INFO	pRet = NULL;
	u8 i=0;
	list_for_each_entry(pRet, ts_list, List){
		printk("i=%d ADD:"MAC_FMT", TID:%d, dir:%d\n",i,MAC_ARG(pRet->Addr), pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
		i++;
 	}
开发者ID:ArthySundaram,项目名称:firstrepo,代码行数:8,代码来源:rtl819x_TSProc.c


示例11: rtw_android_get_macaddr

int rtw_android_get_macaddr(struct net_device *net, char *command, int total_len)
{
	_adapter *adapter = (_adapter *)rtw_netdev_priv(net);
	int bytes_written = 0;
	
	bytes_written = snprintf(command, total_len, "Macaddr = "MAC_FMT, MAC_ARG(net->dev_addr));
	return bytes_written;
}
开发者ID:AustinKwang,项目名称:rtl8192eu,代码行数:8,代码来源:rtw_android.c


示例12: _rtw_mi_hal_dump_macaddr

static u8 _rtw_mi_hal_dump_macaddr(_adapter *padapter, void *data)
{
    u8 mac_addr[ETH_ALEN] = {0};

    rtw_hal_get_macaddr_port(padapter, mac_addr);
    RTW_INFO(ADPT_FMT"MAC Address ="MAC_FMT"\n", ADPT_ARG(padapter), MAC_ARG(mac_addr));
    return _TRUE;
}
开发者ID:plathome,项目名称:debian_based_firmware,代码行数:8,代码来源:rtw_mi.c


示例13: proc_get_survey_info

int proc_get_survey_info(struct seq_file *m, void *v)
{
	struct net_device *dev = m->private;
	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
	struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
	struct __queue	*queue	= &(pmlmepriv->scanned_queue);
	struct wlan_network	*pnetwork = NULL;
	struct list_head	*plist, *phead;
	s32 notify_signal;
	s16 notify_noise = 0;
	u16  index = 0;

	critical_enter_bh(&(pmlmepriv->scanned_queue.lock));
	phead = get_list_head(queue);
	plist = phead ? get_next(phead) : NULL;
	plist = get_next(phead);
	if ((!phead) || (!plist)) {
		critical_exit_bh(&(pmlmepriv->scanned_queue.lock));
		return 0;
	}

	DBG_871X_SEL_NL(m, "%5s  %-17s  %3s  %-3s  %-4s  %-4s  %5s  %s\n","index", "bssid", "ch", "RSSI", "SdBm", "Noise", "age", "ssid");
	while (1)
	{
		if (phead == plist)
			break;

		pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
                if (!pnetwork)
			break;

		if (check_fwstate(pmlmepriv, _FW_LINKED) == true &&
			is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network, 0)) {
			notify_signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);//dbm
		} else {
			notify_signal = translate_percentage_to_dbm(pnetwork->network.PhyInfo.SignalStrength);//dbm
		}

		#if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
		rtw_hal_get_odm_var(padapter, HAL_ODM_NOISE_MONITOR,&(pnetwork->network.Configuration.DSConfig), &(notify_noise));
		#endif

		DBG_871X_SEL_NL(m, "%5d  "MAC_FMT"  %3d  %3d  %4d  %4d  %5d  %s\n",
			++index,
			MAC_ARG(pnetwork->network.MacAddress),
			pnetwork->network.Configuration.DSConfig,
			(int)pnetwork->network.Rssi,
			notify_signal,
			notify_noise,
			jiffies_to_msecs(jiffies - pnetwork->last_scanned),
			//translate_percentage_to_dbm(pnetwork->network.PhyInfo.SignalStrength),
			pnetwork->network.Ssid.Ssid);
		plist = get_next(plist);
	}
	critical_exit_bh(&(pmlmepriv->scanned_queue.lock));

	return 0;
}
开发者ID:yaozhiman,项目名称:rtl8723bs,代码行数:58,代码来源:rtw_debug.c


示例14: proc_get_all_sta_info

int proc_get_all_sta_info(struct seq_file *m, void *data)
{
	_irqL irqL;
	struct sta_info *psta;
	struct net_device *dev = m->private;
	_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
	struct sta_priv *pstapriv = &padapter->stapriv;
	int i, j;
	_list	*plist, *phead;
	struct recv_reorder_ctrl *preorder_ctrl;
	seq_printf(m, "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);

	for(i=0; i< NUM_STA; i++)
	{
		phead = &(pstapriv->sta_hash[i]);
		plist = get_next(phead);
		
		while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
		{
			psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);

			plist = get_next(plist);

			//if(extra_arg == psta->aid)
			{
				seq_printf(m, "sta's macaddr:" MAC_FMT "\n", MAC_ARG(psta->hwaddr));
				seq_printf(m, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
				seq_printf(m, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);	
				seq_printf(m, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);	
				seq_printf(m, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);						
				seq_printf(m, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);									
				seq_printf(m, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
				seq_printf(m, "sleepq_len=%d\n", psta->sleepq_len);
				seq_printf(m, "capability=0x%x\n", psta->capability);
				seq_printf(m, "flags=0x%x\n", psta->flags);
				seq_printf(m, "wpa_psk=0x%x\n", psta->wpa_psk);
				seq_printf(m, "wpa2_group_cipher=0x%x\n", psta->wpa2_group_cipher);
				seq_printf(m, "wpa2_pairwise_cipher=0x%x\n", psta->wpa2_pairwise_cipher);
				seq_printf(m, "qos_info=0x%x\n", psta->qos_info);
				seq_printf(m, "dot118021XPrivacy=0x%x\n", psta->dot118021XPrivacy);
								
				for(j=0;j<16;j++)
				{							
					preorder_ctrl = &psta->recvreorder_ctrl[j];
					if(preorder_ctrl->enable)
					{
						seq_printf(m, "tid=%d, indicate_seq=%d\n", j, preorder_ctrl->indicate_seq);
					}
				}
			}
		}
	}
	_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
	return 0;
}
开发者ID:kolasa,项目名称:RTL8188C_8192C_USB,代码行数:57,代码来源:rtw_debug.c


示例15: proc_get_ap_info

int proc_get_ap_info(struct seq_file *m, void *data)
{
	struct sta_info *psta;
	struct net_device *dev = m->private;
	_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
	struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
	struct wlan_network *cur_network = &(pmlmepriv->cur_network);
	struct sta_priv *pstapriv = &padapter->stapriv;
	int len = 0;

	psta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
	if(psta)
	{
		int i;
		struct recv_reorder_ctrl *preorder_ctrl;
					
		seq_printf(m, "SSID=%s\n", cur_network->network.Ssid.Ssid);		
		seq_printf(m, "sta's macaddr:" MAC_FMT "\n", MAC_ARG(psta->hwaddr));
		seq_printf(m, "cur_channel=%d, cur_bwmode=%d, cur_ch_offset=%d\n", pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);		
		seq_printf(m, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
		seq_printf(m, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);	
		seq_printf(m, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);	
		seq_printf(m, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);						
		seq_printf(m, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);	
		seq_printf(m, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
					
		for(i=0;i<16;i++)
		{							
			preorder_ctrl = &psta->recvreorder_ctrl[i];
			if(preorder_ctrl->enable)
			{
				seq_printf(m, "tid=%d, indicate_seq=%d\n", i, preorder_ctrl->indicate_seq);
			}
		}	
		
	}
	else
	{
		seq_printf(m, "can't get sta's macaddr, cur_network's macaddr:" MAC_FMT "\n", MAC_ARG(cur_network->network.MacAddress));
	}
	return 0;
}
开发者ID:kolasa,项目名称:RTL8188C_8192C_USB,代码行数:43,代码来源:rtw_debug.c


示例16: rtl_action_proc

bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
{
	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data);
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	u16 fc = le16_to_cpu(hdr->frame_control);
	u8 *act = (u8 *) (((u8 *) skb->data + MAC80211_3ADDR_LEN));
	u8 category;

	if (!ieee80211_is_action(fc))
		return true;

	category = *act;
	act++;
	switch (category) {
	case ACT_CAT_BA:
		switch (*act) {
		case ACT_ADDBAREQ:
			if (mac->act_scanning)
				return false;

			RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
				 ("%s ACT_ADDBAREQ From :" MAC_FMT "\n",
				  is_tx ? "Tx" : "Rx", MAC_ARG(hdr->addr2)));
			break;
		case ACT_ADDBARSP:
			RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
				 ("%s ACT_ADDBARSP From :" MAC_FMT "\n",
				  is_tx ? "Tx" : "Rx", MAC_ARG(hdr->addr2)));
			break;
		case ACT_DELBA:
			RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
				 ("ACT_ADDBADEL From :" MAC_FMT "\n",
				  MAC_ARG(hdr->addr2)));
			break;
		}
		break;
	default:
		break;
	}

	return true;
}
开发者ID:ArthySundaram,项目名称:firstrepo,代码行数:43,代码来源:base.c


示例17: proc_get_survey_info

int proc_get_survey_info(struct seq_file *m, void *v)
{
	_irqL irqL;
	struct net_device *dev = m->private;
	_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
	struct mlme_priv	*pmlmepriv = &(padapter->mlmepriv);
	_queue	*queue	= &(pmlmepriv->scanned_queue);
	struct wlan_network	*pnetwork = NULL;
	_list	*plist, *phead;
	s32 notify_signal;
	u16  index = 0;

	_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);	
	phead = get_list_head(queue);
	plist = get_next(phead);
	if ((!phead) || (!plist))
		return 0;

	DBG_871X_SEL_NL(m, "%5s  %-17s  %3s  %-3s  %-4s  %5s  %s\n","index", "bssid", "ch", "dBm", "SdBm", "age", "ssid");
	while(1)
	{
		if (rtw_end_of_queue_search(phead,plist)== _TRUE)
			break;

		pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
                if (!pnetwork)
			break;
	
		if ( check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE &&
			is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network, 0)) {
			notify_signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);//dbm
		} else {
			notify_signal = translate_percentage_to_dbm(pnetwork->network.PhyInfo.SignalStrength);//dbm
		}
	
		DBG_871X_SEL_NL(m, "%5d  "MAC_FMT"  %3d  %3d  %4d  %5d  %s\n", 
			++index,
			MAC_ARG(pnetwork->network.MacAddress), 
			pnetwork->network.Configuration.DSConfig,
			(int)pnetwork->network.Rssi,
			notify_signal,
			rtw_get_passing_time_ms((u32)pnetwork->last_scanned),
			//translate_percentage_to_dbm(pnetwork->network.PhyInfo.SignalStrength),
			pnetwork->network.Ssid.Ssid);
		plist = get_next(plist);
	}
	_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);

	return 0;
}
开发者ID:NotKit,项目名称:android-ia_kernel_intel_baytrail,代码行数:50,代码来源:rtw_debug.c


示例18: rtl_op_sta_remove

static int rtl_op_sta_remove(struct ieee80211_hw *hw,
				struct ieee80211_vif *vif,
				struct ieee80211_sta *sta)
{
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	struct rtl_sta_info *sta_entry;
	if (sta) {
		RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG,
			("Remove sta addr is "MAC_FMT"\n", MAC_ARG(sta->addr)));
		sta_entry = (struct rtl_sta_info *) sta->drv_priv;
		sta_entry->wireless_mode = 0;
		sta_entry->ratr_index = 0;
	}
	return 0;
}
开发者ID:Druboo666,项目名称:Xperia-2011-Kernel-2.6.32.9-KRsH,代码行数:15,代码来源:core.c


示例19: rtw_macaddr_cfg

void rtw_macaddr_cfg(u8 *mac_addr)
{
    u8 mac[ETH_ALEN];

    if(mac_addr == NULL)    return;

    if ( rtw_initmac )
    {   //  Users specify the mac address
        int jj,kk;

        for( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 )
        {
            mac[jj] = key_2char2num(rtw_initmac[kk], rtw_initmac[kk+ 1]);
        }
        _rtw_memcpy(mac_addr, mac, ETH_ALEN);
    }
    else
    {
        printk("Wifi Efuse Mac => %02x:%02x:%02x:%02x:%02x:%02x\n", mac_addr[0], mac_addr[1],
            mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
        if (!rockchip_wifi_mac_addr(mac)) {
            printk("=========> get mac address from flash=[%02x:%02x:%02x:%02x:%02x:%02x]\n", mac[0], mac[1],
                mac[2], mac[3], mac[4], mac[5]);
            _rtw_memcpy(mac_addr, mac, ETH_ALEN);
        } else {
            //  Use the mac address stored in the Efuse
            _rtw_memcpy(mac, mac_addr, ETH_ALEN);
        }
    }

    if (((mac[0]==0xff) &&(mac[1]==0xff) && (mac[2]==0xff) &&
         (mac[3]==0xff) && (mac[4]==0xff) &&(mac[5]==0xff)) ||
        ((mac[0]==0x0) && (mac[1]==0x0) && (mac[2]==0x0) &&
         (mac[3]==0x0) && (mac[4]==0x0) &&(mac[5]==0x0)))
    {
        mac[0] = 0x00;
        mac[1] = 0xe0;
        mac[2] = 0x4c;
        mac[3] = 0x87;
        mac[4] = 0x00;
        mac[5] = 0x00;
        // use default mac addresss
        _rtw_memcpy(mac_addr, mac, ETH_ALEN);
        DBG_871X("MAC Address from efuse error, assign default one !!!\n");
    }

    DBG_871X("rtw_macaddr_cfg MAC Address  = "MAC_FMT"\n", MAC_ARG(mac_addr));
}
开发者ID:jasonleeee,项目名称:Firefly_OC,代码行数:48,代码来源:rtw_ieee80211.c


示例20: mgnt_netdev_open

static int mgnt_netdev_open(struct net_device *pnetdev)
{
	struct hostapd_priv *phostapdpriv = rtw_netdev_priv(pnetdev);

	DBG_871X("mgnt_netdev_open: MAC Address:" MAC_FMT "\n", MAC_ARG(pnetdev->dev_addr));


	init_usb_anchor(&phostapdpriv->anchored);

	rtw_netif_wake_queue(pnetdev);

	netif_carrier_on(pnetdev);

	//rtw_write16(phostapdpriv->padapter, 0x0116, 0x0100);//only excluding beacon

	return 0;
}
开发者ID:Fjodor42,项目名称:rtl8812AU_8821AU_linux,代码行数:17,代码来源:mlme_linux.c



注:本文中的MAC_ARG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MAC_ASSERT函数代码示例发布时间:2022-05-30
下一篇:
C++ MAC_ADDR_EQUAL函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap