(1)    Exercise of recoupment or setoff. Except as otherwise provided in sub. (3), a bank with which a deposit account is maintained may exercise any right of recoupment or setoff against a secured party that holds a security interest in the deposit account.
   (2)   Recoupment or setoff not affected by security interest. Except as otherwise provided in sub. (3), the application of this chapter to a security interest in a deposit account does not affect a right of recoupment or setoff of the secured party as to a deposit account maintained with the secured party.
   (3)   When setoff ineffective. The exercise by a bank of a setoff against a deposit account is ineffective against a secured party that holds a security interest in the deposit account which is perfected by control under s. 409.104 (1) (c), if the setoff is based on a claim against the debtor.