Commit 4e7fb829 authored by Rupesh Gujare's avatar Rupesh Gujare Committed by Greg Kroah-Hartman

staging: ozwpan: Fix Documentation style.

This patch fixes Kernel Documentation style.
Signed-off-by: default avatarRupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dfc065f1
......@@ -18,8 +18,7 @@
#include "ozpd.h"
#include "ozproto.h"
#include "ozcdev.h"
/*------------------------------------------------------------------------------
*/
#define OZ_RD_BUF_SZ 256
struct oz_cdev {
dev_t devnum;
......@@ -39,12 +38,11 @@ struct oz_serial_ctx {
int rd_in;
int rd_out;
};
/*------------------------------------------------------------------------------
*/
static struct oz_cdev g_cdev;
static struct class *g_oz_class;
/*------------------------------------------------------------------------------
/*
* Context: process and softirq
*/
static struct oz_serial_ctx *oz_cdev_claim_ctx(struct oz_pd *pd)
......@@ -59,7 +57,7 @@ static struct oz_serial_ctx *oz_cdev_claim_ctx(struct oz_pd *pd)
return ctx;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq or process
*/
static void oz_cdev_release_ctx(struct oz_serial_ctx *ctx)
......@@ -70,7 +68,7 @@ static void oz_cdev_release_ctx(struct oz_serial_ctx *ctx)
}
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static int oz_cdev_open(struct inode *inode, struct file *filp)
......@@ -83,7 +81,7 @@ static int oz_cdev_open(struct inode *inode, struct file *filp)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static int oz_cdev_release(struct inode *inode, struct file *filp)
......@@ -91,7 +89,7 @@ static int oz_cdev_release(struct inode *inode, struct file *filp)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static ssize_t oz_cdev_read(struct file *filp, char __user *buf, size_t count,
......@@ -144,7 +142,7 @@ static ssize_t oz_cdev_read(struct file *filp, char __user *buf, size_t count,
return count;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static ssize_t oz_cdev_write(struct file *filp, const char __user *buf,
......@@ -202,7 +200,7 @@ static ssize_t oz_cdev_write(struct file *filp, const char __user *buf,
return count;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static int oz_set_active_pd(const u8 *addr)
......@@ -237,7 +235,7 @@ static int oz_set_active_pd(const u8 *addr)
return rc;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static long oz_cdev_ioctl(struct file *filp, unsigned int cmd,
......@@ -305,7 +303,7 @@ static long oz_cdev_ioctl(struct file *filp, unsigned int cmd,
return rc;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static unsigned int oz_cdev_poll(struct file *filp, poll_table *wait)
......@@ -329,7 +327,7 @@ static unsigned int oz_cdev_poll(struct file *filp, poll_table *wait)
return ret;
}
/*------------------------------------------------------------------------------
/*
*/
static const struct file_operations oz_fops = {
.owner = THIS_MODULE,
......@@ -341,7 +339,7 @@ static const struct file_operations oz_fops = {
.poll = oz_cdev_poll
};
/*------------------------------------------------------------------------------
/*
* Context: process
*/
int oz_cdev_register(void)
......@@ -386,7 +384,7 @@ int oz_cdev_register(void)
return err;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
int oz_cdev_deregister(void)
......@@ -400,7 +398,7 @@ int oz_cdev_deregister(void)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
int oz_cdev_init(void)
......@@ -409,7 +407,7 @@ int oz_cdev_init(void)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
void oz_cdev_term(void)
......@@ -417,7 +415,7 @@ void oz_cdev_term(void)
oz_app_enable(OZ_APPID_SERIAL, 0);
}
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
int oz_cdev_start(struct oz_pd *pd, int resume)
......@@ -455,7 +453,7 @@ int oz_cdev_start(struct oz_pd *pd, int resume)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq or process
*/
void oz_cdev_stop(struct oz_pd *pd, int pause)
......@@ -485,7 +483,7 @@ void oz_cdev_stop(struct oz_pd *pd, int pause)
oz_dbg(ON, "Serial service stopped\n");
}
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
void oz_cdev_rx(struct oz_pd *pd, struct oz_elt *elt)
......
......@@ -11,11 +11,10 @@
#include "ozeltbuf.h"
#include "ozpd.h"
/*------------------------------------------------------------------------------
*/
#define OZ_ELT_INFO_MAGIC_USED 0x35791057
#define OZ_ELT_INFO_MAGIC_FREE 0x78940102
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
int oz_elt_buf_init(struct oz_elt_buf *buf)
......@@ -29,7 +28,7 @@ int oz_elt_buf_init(struct oz_elt_buf *buf)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq or process
*/
void oz_elt_buf_term(struct oz_elt_buf *buf)
......@@ -62,7 +61,7 @@ void oz_elt_buf_term(struct oz_elt_buf *buf)
buf->free_elts = 0;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq or process
*/
struct oz_elt_info *oz_elt_info_alloc(struct oz_elt_buf *buf)
......@@ -96,7 +95,7 @@ struct oz_elt_info *oz_elt_info_alloc(struct oz_elt_buf *buf)
return ei;
}
/*------------------------------------------------------------------------------
/*
* Precondition: oz_elt_buf.lock must be held.
* Context: softirq or process
*/
......@@ -133,8 +132,6 @@ void oz_elt_info_free_chain(struct oz_elt_buf *buf, struct list_head *list)
spin_unlock_bh(&buf->lock);
}
/*------------------------------------------------------------------------------
*/
int oz_elt_stream_create(struct oz_elt_buf *buf, u8 id, int max_buf_count)
{
struct oz_elt_stream *st;
......@@ -154,8 +151,6 @@ int oz_elt_stream_create(struct oz_elt_buf *buf, u8 id, int max_buf_count)
return 0;
}
/*------------------------------------------------------------------------------
*/
int oz_elt_stream_delete(struct oz_elt_buf *buf, u8 id)
{
struct list_head *e;
......@@ -194,15 +189,11 @@ int oz_elt_stream_delete(struct oz_elt_buf *buf, u8 id)
return 0;
}
/*------------------------------------------------------------------------------
*/
void oz_elt_stream_get(struct oz_elt_stream *st)
{
atomic_inc(&st->ref_count);
}
/*------------------------------------------------------------------------------
*/
void oz_elt_stream_put(struct oz_elt_stream *st)
{
if (atomic_dec_and_test(&st->ref_count)) {
......@@ -211,7 +202,7 @@ void oz_elt_stream_put(struct oz_elt_stream *st)
}
}
/*------------------------------------------------------------------------------
/*
* Precondition: Element buffer lock must be held.
* If this function fails the caller is responsible for deallocating the elt
* info structure.
......@@ -275,8 +266,6 @@ int oz_queue_elt_info(struct oz_elt_buf *buf, u8 isoc, u8 id,
return 0;
}
/*------------------------------------------------------------------------------
*/
int oz_select_elts_for_tx(struct oz_elt_buf *buf, u8 isoc, unsigned *len,
unsigned max_len, struct list_head *list)
{
......@@ -322,15 +311,11 @@ int oz_select_elts_for_tx(struct oz_elt_buf *buf, u8 isoc, unsigned *len,
return count;
}
/*------------------------------------------------------------------------------
*/
int oz_are_elts_available(struct oz_elt_buf *buf)
{
return buf->order_list.next != &buf->order_list;
}
/*------------------------------------------------------------------------------
*/
void oz_trim_elt_pool(struct oz_elt_buf *buf)
{
struct list_head *free = NULL;
......
This diff is collapsed.
......@@ -18,7 +18,7 @@
unsigned int oz_dbg_mask = OZ_DEFAULT_DBG_MASK;
/*------------------------------------------------------------------------------
/*
* The name of the 802.11 mac device. Empty string is the default value but a
* value can be supplied as a parameter to the module. An empty string means
* bind to nothing. '*' means bind to all netcards - this includes non-802.11
......@@ -26,7 +26,7 @@ unsigned int oz_dbg_mask = OZ_DEFAULT_DBG_MASK;
*/
static char *g_net_dev = "";
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static int __init ozwpan_init(void)
......@@ -38,7 +38,7 @@ static int __init ozwpan_init(void)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static void __exit ozwpan_exit(void)
......@@ -48,8 +48,6 @@ static void __exit ozwpan_exit(void)
oz_cdev_deregister();
}
/*------------------------------------------------------------------------------
*/
module_param(g_net_dev, charp, S_IRUGO);
module_init(ozwpan_init);
module_exit(ozwpan_exit);
......
This diff is collapsed.
......@@ -23,8 +23,6 @@
#include <linux/uaccess.h>
#include <net/psnap.h>
/*------------------------------------------------------------------------------
*/
#define OZ_CF_CONN_SUCCESS 1
#define OZ_CF_CONN_FAILURE 2
......@@ -33,15 +31,13 @@
#define OZ_MAX_TIMER_POOL_SIZE 16
/*------------------------------------------------------------------------------
*/
struct oz_binding {
struct packet_type ptype;
char name[OZ_MAX_BINDING_LEN];
struct list_head link;
};
/*------------------------------------------------------------------------------
/*
* Static external variables.
*/
static DEFINE_SPINLOCK(g_polling_lock);
......@@ -53,7 +49,7 @@ static u8 g_session_id;
static u16 g_apps = 0x1;
static int g_processing_rx;
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
static u8 oz_get_new_session_id(u8 exclude)
......@@ -67,7 +63,7 @@ static u8 oz_get_new_session_id(u8 exclude)
return g_session_id;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
static void oz_send_conn_rsp(struct oz_pd *pd, u8 status)
......@@ -113,7 +109,7 @@ static void oz_send_conn_rsp(struct oz_pd *pd, u8 status)
return;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
static void pd_set_keepalive(struct oz_pd *pd, u8 kalive)
......@@ -139,7 +135,7 @@ static void pd_set_keepalive(struct oz_pd *pd, u8 kalive)
oz_dbg(ON, "Keepalive = %lu mSec\n", pd->keep_alive);
}
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
static void pd_set_presleep(struct oz_pd *pd, u8 presleep, u8 start_timer)
......@@ -156,7 +152,7 @@ static void pd_set_presleep(struct oz_pd *pd, u8 presleep, u8 start_timer)
oz_dbg(ON, "Presleep time = %lu mSec\n", pd->presleep);
}
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
static struct oz_pd *oz_connect_req(struct oz_pd *cur_pd, struct oz_elt *elt,
......@@ -291,7 +287,7 @@ static struct oz_pd *oz_connect_req(struct oz_pd *cur_pd, struct oz_elt *elt,
return pd;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
static void oz_add_farewell(struct oz_pd *pd, u8 ep_num, u8 index,
......@@ -323,7 +319,7 @@ static void oz_add_farewell(struct oz_pd *pd, u8 ep_num, u8 index,
kfree(f2);
}
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
static void oz_rx_frame(struct sk_buff *skb)
......@@ -445,7 +441,7 @@ static void oz_rx_frame(struct sk_buff *skb)
consume_skb(skb);
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
void oz_protocol_term(void)
......@@ -483,7 +479,7 @@ void oz_protocol_term(void)
oz_dbg(ON, "Protocol stopped\n");
}
/*------------------------------------------------------------------------------
/*
* Context: softirq
*/
void oz_pd_heartbeat_handler(unsigned long data)
......@@ -500,7 +496,7 @@ void oz_pd_heartbeat_handler(unsigned long data)
oz_pd_put(pd);
}
/*------------------------------------------------------------------------------
/*
* Context: softirq
*/
void oz_pd_timeout_handler(unsigned long data)
......@@ -522,7 +518,7 @@ void oz_pd_timeout_handler(unsigned long data)
oz_pd_put(pd);
}
/*------------------------------------------------------------------------------
/*
* Context: Interrupt
*/
enum hrtimer_restart oz_pd_heartbeat_event(struct hrtimer *timer)
......@@ -537,7 +533,7 @@ enum hrtimer_restart oz_pd_heartbeat_event(struct hrtimer *timer)
return HRTIMER_RESTART;
}
/*------------------------------------------------------------------------------
/*
* Context: Interrupt
*/
enum hrtimer_restart oz_pd_timeout_event(struct hrtimer *timer)
......@@ -550,7 +546,7 @@ enum hrtimer_restart oz_pd_timeout_event(struct hrtimer *timer)
return HRTIMER_NORESTART;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq or process
*/
void oz_timer_add(struct oz_pd *pd, int type, unsigned long due_time)
......@@ -581,7 +577,7 @@ void oz_timer_add(struct oz_pd *pd, int type, unsigned long due_time)
spin_unlock_bh(&g_polling_lock);
}
/*------------------------------------------------------------------------------
/*
* Context: softirq or process
*/
void oz_pd_request_heartbeat(struct oz_pd *pd)
......@@ -590,7 +586,7 @@ void oz_pd_request_heartbeat(struct oz_pd *pd)
pd->pulse_period : OZ_QUANTUM);
}
/*------------------------------------------------------------------------------
/*
* Context: softirq or process
*/
struct oz_pd *oz_pd_find(const u8 *mac_addr)
......@@ -611,7 +607,7 @@ struct oz_pd *oz_pd_find(const u8 *mac_addr)
return NULL;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
void oz_app_enable(int app_id, int enable)
......@@ -626,7 +622,7 @@ void oz_app_enable(int app_id, int enable)
}
}
/*------------------------------------------------------------------------------
/*
* Context: softirq
*/
static int oz_pkt_recv(struct sk_buff *skb, struct net_device *dev,
......@@ -661,7 +657,7 @@ static int oz_pkt_recv(struct sk_buff *skb, struct net_device *dev,
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
void oz_binding_add(const char *net_dev)
......@@ -695,7 +691,7 @@ void oz_binding_add(const char *net_dev)
}
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static void pd_stop_all_for_device(struct net_device *net_dev)
......@@ -720,7 +716,7 @@ static void pd_stop_all_for_device(struct net_device *net_dev)
}
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
void oz_binding_remove(const char *net_dev)
......@@ -749,7 +745,7 @@ void oz_binding_remove(const char *net_dev)
}
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
static char *oz_get_next_device_name(char *s, char *dname, int max_size)
......@@ -764,7 +760,7 @@ static char *oz_get_next_device_name(char *s, char *dname, int max_size)
return s;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
int oz_protocol_init(char *devs)
......@@ -783,7 +779,7 @@ int oz_protocol_init(char *devs)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: process
*/
int oz_get_pd_list(struct oz_mac_addr *addr, int max_count)
......@@ -803,15 +799,11 @@ int oz_get_pd_list(struct oz_mac_addr *addr, int max_count)
return count;
}
/*------------------------------------------------------------------------------
*/
void oz_polling_lock_bh(void)
{
spin_lock_bh(&g_polling_lock);
}
/*------------------------------------------------------------------------------
*/
void oz_polling_unlock_bh(void)
{
spin_unlock_bh(&g_polling_lock);
......
......@@ -10,15 +10,11 @@
#include "ozurbparanoia.h"
/*-----------------------------------------------------------------------------
*/
#define OZ_MAX_URBS 1000
struct urb *g_urb_memory[OZ_MAX_URBS];
int g_nb_urbs;
DEFINE_SPINLOCK(g_urb_mem_lock);
/*-----------------------------------------------------------------------------
*/
void oz_remember_urb(struct urb *urb)
{
unsigned long irq_state;
......@@ -33,7 +29,7 @@ void oz_remember_urb(struct urb *urb)
spin_unlock_irqrestore(&g_urb_mem_lock, irq_state);
}
/*------------------------------------------------------------------------------
/*
*/
int oz_forget_urb(struct urb *urb)
{
......
......@@ -28,7 +28,7 @@
#include "ozhcd.h"
#include "ozusbsvc.h"
/*------------------------------------------------------------------------------
/*
* This is called once when the driver is loaded to initialise the USB service.
* Context: process
*/
......@@ -37,7 +37,7 @@ int oz_usb_init(void)
return oz_hcd_init();
}
/*------------------------------------------------------------------------------
/*
* This is called once when the driver is unloaded to terminate the USB service.
* Context: process
*/
......@@ -46,7 +46,7 @@ void oz_usb_term(void)
oz_hcd_term();
}
/*------------------------------------------------------------------------------
/*
* This is called when the USB service is started or resumed for a PD.
* Context: softirq
*/
......@@ -111,7 +111,7 @@ int oz_usb_start(struct oz_pd *pd, int resume)
return rc;
}
/*------------------------------------------------------------------------------
/*
* This is called when the USB service is stopped or paused for a PD.
* Context: softirq or process
*/
......@@ -152,7 +152,7 @@ void oz_usb_stop(struct oz_pd *pd, int pause)
}
}
/*------------------------------------------------------------------------------
/*
* This increments the reference count of the context area for a specific PD.
* This ensures this context area does not disappear while still in use.
* Context: softirq
......@@ -164,7 +164,7 @@ void oz_usb_get(void *hpd)
atomic_inc(&usb_ctx->ref_count);
}
/*------------------------------------------------------------------------------
/*
* This decrements the reference count of the context area for a specific PD
* and destroys the context area if the reference count becomes zero.
* Context: irq or process
......@@ -180,7 +180,7 @@ void oz_usb_put(void *hpd)
}
}
/*------------------------------------------------------------------------------
/*
* Context: softirq
*/
int oz_usb_heartbeat(struct oz_pd *pd)
......@@ -205,7 +205,7 @@ int oz_usb_heartbeat(struct oz_pd *pd)
return rc;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq
*/
int oz_usb_stream_create(void *hpd, u8 ep_num)
......@@ -227,7 +227,7 @@ int oz_usb_stream_create(void *hpd, u8 ep_num)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq
*/
int oz_usb_stream_delete(void *hpd, u8 ep_num)
......@@ -250,7 +250,7 @@ int oz_usb_stream_delete(void *hpd, u8 ep_num)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq or process
*/
void oz_usb_request_heartbeat(void *hpd)
......
......@@ -22,11 +22,9 @@
#include "ozhcd.h"
#include "ozusbsvc.h"
/*------------------------------------------------------------------------------
*/
#define MAX_ISOC_FIXED_DATA (253-sizeof(struct oz_isoc_fixed))
/*------------------------------------------------------------------------------
/*
* Context: softirq
*/
static int oz_usb_submit_elt(struct oz_elt_buf *eb, struct oz_elt_info *ei,
......@@ -53,7 +51,7 @@ static int oz_usb_submit_elt(struct oz_elt_buf *eb, struct oz_elt_info *ei,
return ret;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq
*/
int oz_usb_get_desc_req(void *hpd, u8 req_id, u8 req_type, u8 desc_type,
......@@ -90,7 +88,7 @@ int oz_usb_get_desc_req(void *hpd, u8 req_id, u8 req_type, u8 desc_type,
return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0);
}
/*------------------------------------------------------------------------------
/*
* Context: tasklet
*/
static int oz_usb_set_config_req(void *hpd, u8 req_id, u8 index)
......@@ -113,7 +111,7 @@ static int oz_usb_set_config_req(void *hpd, u8 req_id, u8 index)
return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0);
}
/*------------------------------------------------------------------------------
/*
* Context: tasklet
*/
static int oz_usb_set_interface_req(void *hpd, u8 req_id, u8 index, u8 alt)
......@@ -137,7 +135,7 @@ static int oz_usb_set_interface_req(void *hpd, u8 req_id, u8 index, u8 alt)
return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0);
}
/*------------------------------------------------------------------------------
/*
* Context: tasklet
*/
static int oz_usb_set_clear_feature_req(void *hpd, u8 req_id, u8 type,
......@@ -163,7 +161,7 @@ static int oz_usb_set_clear_feature_req(void *hpd, u8 req_id, u8 type,
return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0);
}
/*------------------------------------------------------------------------------
/*
* Context: tasklet
*/
static int oz_usb_vendor_class_req(void *hpd, u8 req_id, u8 req_type,
......@@ -192,7 +190,7 @@ static int oz_usb_vendor_class_req(void *hpd, u8 req_id, u8 req_type,
return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0);
}
/*------------------------------------------------------------------------------
/*
* Context: tasklet
*/
int oz_usb_control_req(void *hpd, u8 req_id, struct usb_ctrlrequest *setup,
......@@ -241,7 +239,7 @@ int oz_usb_control_req(void *hpd, u8 req_id, struct usb_ctrlrequest *setup,
return rc;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq
*/
int oz_usb_send_isoc(void *hpd, u8 ep_num, struct urb *urb)
......@@ -313,7 +311,7 @@ int oz_usb_send_isoc(void *hpd, u8 ep_num, struct urb *urb)
return 0;
}
/*------------------------------------------------------------------------------
/*
* Context: softirq-serialized
*/
static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx,
......@@ -357,7 +355,7 @@ static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx,
}
/*------------------------------------------------------------------------------
/*
* This is called when the PD has received a USB element. The type of element
* is determined and is then passed to an appropriate handler function.
* Context: softirq-serialized
......@@ -430,7 +428,7 @@ void oz_usb_rx(struct oz_pd *pd, struct oz_elt *elt)
oz_usb_put(usb_ctx);
}
/*------------------------------------------------------------------------------
/*
* Context: softirq, process
*/
void oz_usb_farewell(struct oz_pd *pd, u8 ep_num, u8 *data, u8 len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment