Lines Matching defs:state

22  * initial state and then every time it changes. See wimax.h:struct
38 * wimax_report_rfkill_sw() Driver reports state change
41 * wimax_report_rfkill_hw() Driver reports state change
64 * @state: New state of the RF Kill switch. %WIMAX_RF_ON radio on,
67 * When the device detects a change in the state of thehardware RF
69 * know that the state has changed so it can be properly propagated.
71 * The WiMAX stack caches the state (the driver doesn't need to). As
73 * change the software state to mirror the hardware state.
79 enum wimax_rf_state state)
85 d_fnstart(3, dev, "(wimax_dev %p state %u)\n", wimax_dev, state);
86 BUG_ON(state == WIMAX_RF_QUERY);
87 BUG_ON(state != WIMAX_RF_ON && state != WIMAX_RF_OFF);
94 if (state != wimax_dev->rf_hw) {
95 wimax_dev->rf_hw = state;
103 state == WIMAX_RF_OFF);
109 d_fnend(3, dev, "(wimax_dev %p state %u) = void [%d]\n",
110 wimax_dev, state, result);
120 * @state: New state of the RF kill switch. %WIMAX_RF_ON radio on,
123 * Reports changes in the software RF switch state to the WiMAX stack.
126 * device for its current software radio kill switch state and feed it
129 * On the side, the device does not change the software state by
134 enum wimax_rf_state state)
140 d_fnstart(3, dev, "(wimax_dev %p state %u)\n", wimax_dev, state);
141 BUG_ON(state == WIMAX_RF_QUERY);
142 BUG_ON(state != WIMAX_RF_ON && state != WIMAX_RF_OFF);
149 if (state != wimax_dev->rf_sw) {
150 wimax_dev->rf_sw = state;
157 rfkill_set_sw_state(wimax_dev->rfkill, state == WIMAX_RF_OFF);
161 d_fnend(3, dev, "(wimax_dev %p state %u) = void [%d]\n",
162 wimax_dev, state, result);
175 * here so the software RF Kill switch state is changed to reflect
176 * the hardware switch state.
178 * - When the user sets the state through sysfs' rfkill/state file
185 * state 0!
191 enum wimax_rf_state state)
198 d_fnstart(3, dev, "(wimax_dev %p state %u)\n", wimax_dev, state);
199 if (wimax_dev->rf_sw == state)
202 result = wimax_dev->op_rfkill_sw_toggle(wimax_dev, state);
203 else if (state == WIMAX_RF_OFF) /* No op? can't turn off */
209 wimax_dev->rf_sw = state;
210 wimax_state = state == WIMAX_RF_ON ?
215 d_fnend(3, dev, "(wimax_dev %p state %u) = %d\n",
216 wimax_dev, state, result);
222 * Translate from rfkill state to wimax state
224 * NOTE: Special state handling rules here
226 * Just pretend the call didn't happen if we are in a state where
245 if (wimax_dev->state <= __WIMAX_ST_QUIESCING)
260 * wimax_rfkill - Set the software RF switch state for a WiMAX device
264 * @state: New RF state.
268 * >= 0 toggle state if ok, < 0 errno code on error. The toggle state
269 * is returned as a bitmap, bit 0 being the hardware RF state, bit 1
270 * the software RF state.
279 * %WIMAX_RF_QUERY, just the current state is returned.
285 int wimax_rfkill(struct wimax_dev *wimax_dev, enum wimax_rf_state state)
290 d_fnstart(3, dev, "(wimax_dev %p state %u)\n", wimax_dev, state);
298 if (result == -ENOMEDIUM && state == WIMAX_RF_QUERY)
302 switch (state) {
305 result = __wimax_rf_toggle_radio(wimax_dev, state);
308 rfkill_set_sw_state(wimax_dev->rfkill, state == WIMAX_RF_OFF);
320 d_fnend(3, dev, "(wimax_dev %p state %u) = %d\n",
321 wimax_dev, state, result);
394 * Only one attribute: the new state requested (on, off or no change,