从无线设备驱动程序获取比特率的值. [英] Getting the value of bitrate from a wireless device driver.

查看:86
本文介绍了从无线设备驱动程序获取比特率的值.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个内核模块,该模块需要从该联合中读取bitrate的值:

I'm writing a kernel module that needs to read the value of bitrate from this union:

union   iwreq_data
{==
    .......
    struct iw_param bitrate;    /* default bit rate */

     ....
}

此代码的格式为wireless.h有人知道我如何获得它的价值吗? (我使用的是Linux内核2.6.35)

This code is form wireless.h Does anyone know how I can access it's value? (I'm using linux kernel 2.6.35)

推荐答案

不幸的是,没有办法做到这一点...

There's no way to do that, unfortunately ...

仔细查看我们找到的iw_param结构

taking a closer look at the iw_param struct we find

struct  iw_param
{
  __s32     value;      /* The value of the parameter itself */
  __u8      fixed;      /* Hardware should not use auto select */
  __u8      disabled;   /* Disable the feature */
  __u16     flags;      /* Various specifc flags (if any) */
};

现在,这是wireless.h

union   iwreq_data
{
    /* Config - generic */
    char        name[IFNAMSIZ];
    /* Name : used to verify the presence of  wireless extensions.
     * Name of the protocol/provider... */

    struct iw_point essid;      /* Extended network name */
    struct iw_param nwid;       /* network id (or domain - the cell) */
    struct iw_freq  freq;       /* frequency or channel :
                     * 0-1000 = channel
                     * > 1000 = frequency in Hz */

    struct iw_param sens;       /* signal level threshold */
    struct iw_param bitrate;    /* default bit rate */
    struct iw_param txpower;    /* default transmit power */
    struct iw_param rts;        /* RTS threshold threshold */
    struct iw_param frag;       /* Fragmentation threshold */
    __u32       mode;       /* Operation mode */
    struct iw_param retry;      /* Retry limits & lifetime */

    struct iw_point encoding;   /* Encoding stuff : tokens */
    struct iw_param power;      /* PM duration/timeout */
    struct iw_quality qual;     /* Quality part of statistics */

    struct sockaddr ap_addr;    /* Access point address */
    struct sockaddr addr;       /* Destination address (hw/mac) */

    struct iw_param param;      /* Other small parameters */
    struct iw_point data;       /* Other large parameters */
};

除了bitrate->value

这篇关于从无线设备驱动程序获取比特率的值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆