*
********************************************************************/
-#include <linux/config.h>
#include <asm/byteorder.h>
#include <net/irda/irda.h>
#include <net/irda/parameters.h>
#include <net/irda/qos.h>
#include <net/irda/irlap.h>
+#include <net/irda/irlap_frame.h>
/*
* Maximum values of the baud rate we negociate with the other end.
* able to check precisely what's going on. If a end user sees this,
* it's very likely the peer. - Jean II */
if (word == 0) {
- WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n",
+ IRDA_WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n",
__FUNCTION__);
/* The only safe choice (we don't know the array size) */
word = 0x1;
*/
void irda_qos_compute_intersection(struct qos_info *qos, struct qos_info *new)
{
- ASSERT(qos != NULL, return;);
- ASSERT(new != NULL, return;);
+ IRDA_ASSERT(qos != NULL, return;);
+ IRDA_ASSERT(new != NULL, return;);
/* Apply */
qos->baud_rate.bits &= new->baud_rate.bits;
if (sysctl_min_tx_turn_time > qos->min_turn_time.value) {
int i;
- WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n",
+ IRDA_WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n",
__FUNCTION__, sysctl_min_tx_turn_time);
/* We don't really need bits, but easier this way */
}
#else /* Use method described in section 6.6.11 of IrLAP */
while (irlap_requested_line_capacity(qos) > line_capacity) {
- ASSERT(index != 0, return;);
+ IRDA_ASSERT(index != 0, return;);
/* Must be able to send at least one frame */
if (qos->window_size.value > 1) {
IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
__FUNCTION__, qos->data_size.value);
} else {
- WARNING("%s(), nothing more we can do!\n",
- __FUNCTION__);
+ IRDA_WARNING("%s(), nothing more we can do!\n",
+ __FUNCTION__);
}
}
#endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
struct irlap_cb *self = (struct irlap_cb *) instance;
- ASSERT(self != NULL, return -1;);
- ASSERT(self->magic == LAP_MAGIC, return -1;);
+ IRDA_ASSERT(self != NULL, return -1;);
+ IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
if (get) {
param->pv.i = self->qos_rx.baud_rate.bits;
struct irlap_cb *self = (struct irlap_cb *) instance;
- ASSERT(self != NULL, return -1;);
- ASSERT(self->magic == LAP_MAGIC, return -1;);
+ IRDA_ASSERT(self != NULL, return -1;);
+ IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
if (get)
param->pv.i = self->qos_rx.link_disc_time.bits;
{
struct irlap_cb *self = (struct irlap_cb *) instance;
- ASSERT(self != NULL, return -1;);
- ASSERT(self->magic == LAP_MAGIC, return -1;);
+ IRDA_ASSERT(self != NULL, return -1;);
+ IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
if (get)
param->pv.i = self->qos_rx.max_turn_time.bits;
{
struct irlap_cb *self = (struct irlap_cb *) instance;
- ASSERT(self != NULL, return -1;);
- ASSERT(self->magic == LAP_MAGIC, return -1;);
+ IRDA_ASSERT(self != NULL, return -1;);
+ IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
if (get)
param->pv.i = self->qos_rx.data_size.bits;
{
struct irlap_cb *self = (struct irlap_cb *) instance;
- ASSERT(self != NULL, return -1;);
- ASSERT(self->magic == LAP_MAGIC, return -1;);
+ IRDA_ASSERT(self != NULL, return -1;);
+ IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
if (get)
param->pv.i = self->qos_rx.window_size.bits;
{
struct irlap_cb *self = (struct irlap_cb *) instance;
- ASSERT(self != NULL, return -1;);
- ASSERT(self->magic == LAP_MAGIC, return -1;);
+ IRDA_ASSERT(self != NULL, return -1;);
+ IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
if (get)
param->pv.i = self->qos_rx.additional_bofs.bits;
{
struct irlap_cb *self = (struct irlap_cb *) instance;
- ASSERT(self != NULL, return -1;);
- ASSERT(self->magic == LAP_MAGIC, return -1;);
+ IRDA_ASSERT(self != NULL, return -1;);
+ IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
if (get)
param->pv.i = self->qos_rx.min_turn_time.bits;
i = value_index(speed, baud_rates, 10);
j = value_index(max_turn_time, max_turn_times, 4);
- ASSERT(((i >=0) && (i <10)), return 0;);
- ASSERT(((j >=0) && (j <4)), return 0;);
+ IRDA_ASSERT(((i >=0) && (i <10)), return 0;);
+ IRDA_ASSERT(((j >=0) && (j <4)), return 0;);
line_capacity = max_line_capacities[i][j];
{
int index;
- ASSERT(qos != NULL, return;);
+ IRDA_ASSERT(qos != NULL, return;);
index = msb_index(qos->baud_rate.bits);
qos->baud_rate.value = baud_rates[index];