Source
* This call blocks; on successful return, the device has completed the
/*
* Linux WiMAX
* Implement and export a method for resetting a WiMAX device
*
*
* Copyright (C) 2008 Intel Corporation <linux-wimax@intel.com>
* Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version
* 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*
* This implements a simple synchronous call to reset a WiMAX device.
*
* Resets aim at being warm, keeping the device handles active;
* however, when that fails, it falls back to a cold reset (that will
* disconnect and reconnect the device).
*/
/**
* wimax_reset - Reset a WiMAX device
*
* @wimax_dev: WiMAX device descriptor
*
* Returns:
*
* %0 if ok and a warm reset was done (the device still exists in
* the system).
*
* -%ENODEV if a cold/bus reset had to be done (device has
* disconnected and reconnected, so current handle is not valid
* any more).
*
* -%EINVAL if the device is not even registered.
*
* Any other negative error code shall be considered as
* non-recoverable.
*
* Description:
*
* Called when wanting to reset the device for any reason. Device is