Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
[firefly-linux-kernel-4.4.55.git] / include / net / wpan-phy.h
index b52bda8d13b183a953b88cb90700a1ee8cf08e23..10ab0fc6d4f79a8a608d0ce642aae294636dcecc 100644 (file)
@@ -37,15 +37,22 @@ struct wpan_phy {
        struct mutex pib_lock;
 
        /*
-        * This is a PIB according to 802.15.4-2006.
+        * This is a PIB according to 802.15.4-2011.
         * We do not provide timing-related variables, as they
         * aren't used outside of driver
         */
        u8 current_channel;
        u8 current_page;
        u32 channels_supported[32];
-       u8 transmit_power;
+       s8 transmit_power;
        u8 cca_mode;
+       u8 min_be;
+       u8 max_be;
+       u8 csma_retries;
+       s8 frame_retries;
+
+       bool lbt;
+       s32 cca_ed_level;
 
        struct device dev;
        int idx;
@@ -54,6 +61,14 @@ struct wpan_phy {
                                        const char *name, int type);
        void (*del_iface)(struct wpan_phy *phy, struct net_device *dev);
 
+       int (*set_txpower)(struct wpan_phy *phy, int db);
+       int (*set_lbt)(struct wpan_phy *phy, bool on);
+       int (*set_cca_mode)(struct wpan_phy *phy, u8 cca_mode);
+       int (*set_cca_ed_level)(struct wpan_phy *phy, int level);
+       int (*set_csma_params)(struct wpan_phy *phy, u8 min_be, u8 max_be,
+                              u8 retries);
+       int (*set_frame_retries)(struct wpan_phy *phy, s8 retries);
+
        char priv[0] __attribute__((__aligned__(NETDEV_ALIGN)));
 };