如何將 driver value傳到user space - Linux

By Candice
at 2015-09-22T20:30
at 2015-09-22T20:30
Table of Contents
最近想把 802.11 driver 檢查CRC封包 error counter的結果
送到user space
Linux/drivers/net/wireless/ath/ath9k/recv.c
int wifi_frame_recv_counter = 0;
int wifi_frame_error_counter = 0;
static bool ath9k_rx_accept()
{
if(ieee80211_is_data(fc))
{
wifi_frame_recv_counter++;
printk("frame_recv_counter: %d\n",wifi_frame_recv_counter);
if(rx_stats->rs_status & ATH9k_RXERR_CRC)
{
wifi_frame_error_counter++;
}
}
}
想要把
wifi_frame_error_counter
wifi_frame_recv_counter
傳到 user space 不曉得要怎麼傳上去
我用copy_to_user不行= =
謝謝!!
--
送到user space
Linux/drivers/net/wireless/ath/ath9k/recv.c
int wifi_frame_recv_counter = 0;
int wifi_frame_error_counter = 0;
static bool ath9k_rx_accept()
{
if(ieee80211_is_data(fc))
{
wifi_frame_recv_counter++;
printk("frame_recv_counter: %d\n",wifi_frame_recv_counter);
if(rx_stats->rs_status & ATH9k_RXERR_CRC)
{
wifi_frame_error_counter++;
}
}
}
想要把
wifi_frame_error_counter
wifi_frame_recv_counter
傳到 user space 不曉得要怎麼傳上去
我用copy_to_user不行= =
謝謝!!
--
Tags:
Linux
All Comments

By John
at 2015-09-25T17:29
at 2015-09-25T17:29

By Ina
at 2015-09-29T09:50
at 2015-09-29T09:50

By Skylar DavisLinda
at 2015-09-29T17:39
at 2015-09-29T17:39

By Brianna
at 2015-10-02T00:34
at 2015-10-02T00:34
Related Posts
FreeNAS安裝plugin問題

By Jacob
at 2015-09-22T00:13
at 2015-09-22T00:13
對付GFW用的openVPN有哪些設定?

By Sarah
at 2015-09-20T21:50
at 2015-09-20T21:50
新手問磁碟分割

By Damian
at 2015-09-20T15:48
at 2015-09-20T15:48
mac終端機

By Michael
at 2015-09-20T02:12
at 2015-09-20T02:12
LXDE無法設定桌布

By George
at 2015-09-18T16:56
at 2015-09-18T16:56