Revert "ANDROID: fix up rndis ABI breakage"

This reverts commit fc94364a70.

It is no longer needed as we can modify the KABI at this point in time.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icb196c5ca88a1bb2dca12e132f012be16b2be11e
This commit is contained in:
Greg Kroah-Hartman
2022-03-16 15:52:27 +01:00
committed by Todd Kjos
parent af2ae8657c
commit 97e323626c
2 changed files with 9 additions and 9 deletions

View File

@@ -63,8 +63,6 @@ MODULE_PARM_DESC (rndis_debug, "enable debugging");
static DEFINE_IDA(rndis_ida);
static DEFINE_SPINLOCK(resp_lock);
/* Driver Version */
static const __le32 rndis_driver_version = cpu_to_le32(1);
@@ -924,6 +922,7 @@ struct rndis_params *rndis_register(void (*resp_avail)(void *v), void *v)
params->resp_avail = resp_avail;
params->v = v;
INIT_LIST_HEAD(&params->resp_queue);
spin_lock_init(&params->resp_lock);
pr_debug("%s: configNr = %d\n", __func__, i);
return params;
@@ -1017,14 +1016,14 @@ void rndis_free_response(struct rndis_params *params, u8 *buf)
{
rndis_resp_t *r, *n;
spin_lock(&resp_lock);
spin_lock(&params->resp_lock);
list_for_each_entry_safe(r, n, &params->resp_queue, list) {
if (r->buf == buf) {
list_del(&r->list);
kfree(r);
}
}
spin_unlock(&resp_lock);
spin_unlock(&params->resp_lock);
}
EXPORT_SYMBOL_GPL(rndis_free_response);
@@ -1034,17 +1033,17 @@ u8 *rndis_get_next_response(struct rndis_params *params, u32 *length)
if (!length) return NULL;
spin_lock(&resp_lock);
spin_lock(&params->resp_lock);
list_for_each_entry_safe(r, n, &params->resp_queue, list) {
if (!r->send) {
r->send = 1;
*length = r->length;
spin_unlock(&resp_lock);
spin_unlock(&params->resp_lock);
return r->buf;
}
}
spin_unlock(&resp_lock);
spin_unlock(&params->resp_lock);
return NULL;
}
EXPORT_SYMBOL_GPL(rndis_get_next_response);
@@ -1061,9 +1060,9 @@ static rndis_resp_t *rndis_add_response(struct rndis_params *params, u32 length)
r->length = length;
r->send = 0;
spin_lock(&resp_lock);
spin_lock(&params->resp_lock);
list_add_tail(&r->list, &params->resp_queue);
spin_unlock(&resp_lock);
spin_unlock(&params->resp_lock);
return r;
}

View File

@@ -174,6 +174,7 @@ typedef struct rndis_params {
void (*resp_avail)(void *v);
void *v;
struct list_head resp_queue;
spinlock_t resp_lock;
} rndis_params;
/* RNDIS Message parser and other useless functions */